[FIX] merge clear_cache call within 'ir.model.data' unlink - as there is not support...
[odoo/odoo.git] / 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):