[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:
Kirti Savalia (OpenERP) 2011-11-28 17:49:40 +05:30
parent 7505b3952b
commit 073244191a
1 changed files with 1 additions and 1 deletions

View File

@ -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)