From 073244191af89ae8fc7e2be38067af064b48a7a1 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Mon, 28 Nov 2011 17:49:40 +0530 Subject: [PATCH] [FIX]:wrong check for browse record to integer lp bug: https://launchpad.net/bugs/894434 fixed bzr revid: ksa@tinyerp.com-20111128121940-7rhez036lhgd090y --- addons/product/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/product.py b/addons/product/product.py index ecf1761318e..c67b1f6c029 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -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)