[IMP] hr_expense : added condition to function

bzr revid: cha@tinyerp.com-20120809105103-tm0m7g854zglxfrg
This commit is contained in:
Ajay Chauhan (OpenERP) 2012-08-09 16:21:03 +05:30
parent 1a36733f5b
commit 4cc8dce4ec
1 changed files with 8 additions and 7 deletions

View File

@ -294,6 +294,7 @@ class hr_expense_line(osv.osv):
def onchange_uom(self, cr, uid, ids, product_id, uom_id, context=None):
res = {'value':{}}
if uom_id:
if product_id:
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
uom = self.pool.get('product.uom').browse(cr, uid, uom_id, context=context)