[FIX] Pass the context to the parent method

lp bug: https://launchpad.net/bugs/319172 fixed

bzr revid: stephane@tinyerp.com-20090120112921-a6nwvapv64ur9e93
This commit is contained in:
Stephane Wirtel 2009-01-20 12:29:21 +01:00
parent 5efacb33f0
commit 464e716420
1 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ class purchase_order(osv.osv):
_description = "Purchase order"
_order = "name desc"
def unlink(self, cr, uid, ids):
def unlink(self, cr, uid, ids, context=None):
purchase_orders = self.read(cr, uid, ids, ['state'])
unlink_ids = []
for s in purchase_orders:
@ -208,7 +208,7 @@ class purchase_order(osv.osv):
unlink_ids.append(s['id'])
else:
raise osv.except_osv(_('Invalid action !'), _('Cannot delete Purchase Order(s) which are in %s State!' % s['state']))
return osv.osv.unlink(self, cr, uid, unlink_ids)
return super(purchase_order, self).unlink(cr, uid, unlink_ids, context=context)
def button_dummy(self, cr, uid, ids, context={}):
return True