[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:
parent
d237ba0a2b
commit
83785b1eef
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue