[FIX] warning: Impossible to set UoM if product is not selected in purchase order line. (Maintenance Case: 593702)

bzr revid: rgo@tinyerp.com-20130612112146-fvu2jeyvkfqp56gj
This commit is contained in:
Ravi Gohil (OpenERP) 2013-06-12 16:51:46 +05:30
parent e532701d28
commit b49fe3aa34
1 changed files with 1 additions and 1 deletions

View File

@ -288,7 +288,7 @@ class purchase_order_line(osv.osv):
name=False, price_unit=False, notes=False, context=None):
warning = {}
if not product:
return {'value': {'price_unit': 0.0, 'name':'','notes':'', 'product_uom' : False}, 'domain':{'product_uom':[]}}
return {'value': {'price_unit': price_unit or 0.0, 'name': name or '', 'notes': notes or '', 'product_uom' : uom or False}, 'domain':{'product_uom':[]}}
product_obj = self.pool.get('product.product')
product_info = product_obj.browse(cr, uid, product)
title = False