[IMP] hr_expense: made little changes in code

bzr revid: cha@tinyerp.com-20120817084242-79xf2pa2souihp8d
This commit is contained in:
Ajay Chauhan (OpenERP) 2012-08-17 14:12:42 +05:30
parent b478264bde
commit 5458cc1d92
2 changed files with 2 additions and 3 deletions

View File

@ -296,8 +296,7 @@ class hr_expense_line(osv.osv):
uom = self.pool.get('product.uom').browse(cr, uid, uom_id, context=context)
if uom.category_id.id != product.uom_id.category_id.id:
res['warning'] = {'title': _('Warning'), 'message': _('Selected Unit of Measure does not belong to the same category as the product Unit of Measure')}
uom_id = product.uom_id.id
res['value'].update({'uom_id': uom_id})
res['value'].update({'uom_id': product.uom_id.id})
return res
hr_expense_line()

View File

@ -108,7 +108,7 @@
<field name="sequence" invisible="1"/>
<field name="product_id" on_change="onchange_product_id(product_id, context)" context="{'default_hr_expense_ok':1}"/>
<field name="date_value" string="Expense Date"/>
<field name="name" invisible="1"/>
<field name="name"/>
<field name="ref"/>
<field domain="[('type','in',['normal','contract']), ('parent_id','!=',False)]" name="analytic_account" groups="analytic.group_analytic_accounting"/>
<field name="uom_id" on_change="onchange_uom(product_id, uom_id, context)"/>