From aece39ac830d2c4f949dce923513cc1c7633197f Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 22 Sep 2011 18:50:03 +0200 Subject: [PATCH] [IMP] TransientModel: unnecessary unlink() override Workflow instance deletion is taken care of by the regular Model.unlink() method, by calling workflow.trg_delete(). bzr revid: odo@openerp.com-20110922165003-ub5761gjlnebz4yh --- openerp/osv/osv.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/openerp/osv/osv.py b/openerp/osv/osv.py index f6d4223a0ad..7f2979be62e 100644 --- a/openerp/osv/osv.py +++ b/openerp/osv/osv.py @@ -288,14 +288,6 @@ class TransientModel(Model): self.vacuum(cr, uid) return super(TransientModel, self).create(cr, uid, vals, context) - def unlink(self, cr, uid, ids, context=None): - super(TransientModel, self).unlink(cr, uid, ids, context) - if isinstance(ids, (int, long)): - ids = [ids] - if ids: - cr.execute('delete from wkf_instance where res_type=%s and res_id IN %s', (self._name, tuple(ids))) - return True - def _search(self, cr, uid, domain, offset=0, limit=None, order=None, context=None, count=False, access_rights_uid=None): # Restrict acces to the current user, except for the super-user.