[FIX]:wrong check for browse record to integer
lp bug: https://launchpad.net/bugs/894434 fixed bzr revid: ksa@tinyerp.com-20111128121940-7rhez036lhgd090y
This commit is contained in:
parent
7505b3952b
commit
073244191a
|
@ -171,7 +171,7 @@ class product_uom(osv.osv):
|
|||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if 'category_id' in vals:
|
||||
for uom in self.browse(cr, uid, ids, context=context):
|
||||
if uom.category_id != vals['category_id']:
|
||||
if uom.category_id.id != vals['category_id']:
|
||||
raise osv.except_osv(_('Warning'),_("Cannot change the category of existing UoM '%s'.") % (uom.name,))
|
||||
return super(product_uom, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue