[FIX] delivery.carrier: write() failed to handle ids=int case

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

bzr revid: odo@openerp.com-20120210151649-xfwkf7xk1zv3s3nx
This commit is contained in:
Olivier Dony 2012-02-10 16:16:49 +01:00
parent d237ba0a2b
commit 83785b1eef
1 changed files with 4 additions and 2 deletions

View File

@ -149,9 +149,11 @@ class delivery_carrier(osv.osv):
return True
def write(self, cr, uid, ids, vals, context=None):
res_id = super(delivery_carrier, self).write(cr, uid, ids, vals, context=context)
if isinstance(ids, (int,long)):
ids = [ids]
res = super(delivery_carrier, self).write(cr, uid, ids, vals, context=context)
self.create_grid_lines(cr, uid, ids, vals, context=context)
return res_id
return res
def create(self, cr, uid, vals, context=None):
res_id = super(delivery_carrier, self).create(cr, uid, vals, context=context)