[FIX] merge clear_cache call within 'ir.model.data' unlink - as there is not support...
authorXavier ALT <xal@openerp.com>
Wed, 12 Dec 2012 10:04:36 +0000 (11:04 +0100)
committerXavier ALT <xal@openerp.com>
Wed, 12 Dec 2012 10:04:36 +0000 (11:04 +0100)
bzr revid: xal@openerp.com-20121212100436-ex9j3xkkd8a2squ0

bin/addons/base/ir/ir_model.py

index 80ae768..11a9bf7 100644 (file)
@@ -630,18 +630,10 @@ class ir_model_data(osv.osv):
             id = False
         return id
 
-    def clear_caches(self, cr):
-        """ Clears all orm caches on the object's methods
-
-        :returns: itself
-        """
-        self._get_id.clear_cache(cr.dbname)
-        self.get_object_reference.clear_cache(cr.dbname)
-        return self
-
     def unlink(self, cr, uid, ids, context=None):
         """ Regular unlink method, but make sure to clear the caches. """
-        self.clear_caches(cr)
+        self._get_id.clear_cache(cr.dbname)
+        self.get_object_reference.clear_cache(cr.dbname)
         return super(ir_model_data,self).unlink(cr, uid, ids, context=context)
 
     def _update(self,cr, uid, model, module, values, xml_id=False, store=True, noupdate=False, mode='init', res_id=False, context=None):