[MERGE/FIX] Merged Stephane's branch for disabling the cache for ir.rule
lp bug: https://launchpad.net/bugs/372747 fixed bzr revid: jvo@tinyerp.com-20100201091318-iq4x22fgp8ac96er
This commit is contained in:
commit
ee78cb215e
|
@ -43,24 +43,6 @@ class ir_rule_group(osv.osv):
|
|||
'global': lambda *a: True,
|
||||
}
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
res = super(ir_rule_group, self).unlink(cr, uid, ids, context=context)
|
||||
# Restart the cache on the domain_get method of ir.rule
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
return res
|
||||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
res = super(ir_rule_group, self).create(cr, user, vals, context=context)
|
||||
# Restart the cache on the domain_get method of ir.rule
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
return res
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
res = super(ir_rule_group, self).write(cr, uid, ids, vals, context=context)
|
||||
# Restart the cache on the domain_get method of ir.rule
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
return res
|
||||
|
||||
ir_rule_group()
|
||||
|
||||
|
||||
|
@ -210,27 +192,6 @@ class ir_rule(osv.osv):
|
|||
if query:
|
||||
query = '('+query+')'
|
||||
return query, val
|
||||
domain_get = tools.cache()(domain_get)
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
res = super(ir_rule, self).unlink(cr, uid, ids, context=context)
|
||||
# Restart the cache on the domain_get method of ir.rule
|
||||
self.domain_get.clear_cache(cr.dbname)
|
||||
return res
|
||||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
res = super(ir_rule, self).create(cr, user, vals, context=context)
|
||||
# Restart the cache on the domain_get method of ir.rule
|
||||
self.domain_get.clear_cache(cr.dbname)
|
||||
return res
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if not context:
|
||||
context={}
|
||||
res = super(ir_rule, self).write(cr, uid, ids, vals, context=context)
|
||||
# Restart the cache on the domain_get method
|
||||
self.domain_get.clear_cache(cr.dbname)
|
||||
return res
|
||||
|
||||
ir_rule()
|
||||
|
||||
|
|
|
@ -82,7 +82,6 @@ class res_company(osv.osv):
|
|||
def write(self, cr, *args, **argv):
|
||||
self.cache_restart(cr)
|
||||
# Restart the cache on the company_get method
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
return super(res_company, self).write(cr, *args, **argv)
|
||||
|
||||
def _get_euro(self, cr, uid, context={}):
|
||||
|
|
|
@ -48,7 +48,6 @@ class groups(osv.osv):
|
|||
_('The name of the group can not start with "-"'))
|
||||
res = super(groups, self).write(cr, uid, ids, vals, context=context)
|
||||
# Restart the cache on the company_get method
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
self.pool.get('ir.model.access').call_cache_clearing_methods(cr)
|
||||
return res
|
||||
|
||||
|
@ -185,7 +184,6 @@ class users(osv.osv):
|
|||
res = super(users, self).write(cr, uid, ids, values, *args, **argv)
|
||||
self.company_get.clear_cache(cr.dbname)
|
||||
# Restart the cache on the company_get method
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
self.pool.get('ir.model.access').call_cache_clearing_methods(cr)
|
||||
return res
|
||||
|
||||
|
|
Loading…
Reference in New Issue