[FIX] account: wrong domain for UoM

This allows to reset correctly the domain of UoM if the product is not set.
Without this patch, the domain used is the domain of the previous product in
the list.

opw-642074
This commit is contained in:
Nicolas Martinelli 2015-06-17 11:53:58 +02:00
parent d566558a6c
commit fa57ce878e
1 changed files with 2 additions and 2 deletions

View File

@ -1482,9 +1482,9 @@ class account_invoice_line(osv.osv):
raise osv.except_osv(_('No Partner Defined!'),_("You must first select a partner!") )
if not product:
if type in ('in_invoice', 'in_refund'):
return {'value': {}, 'domain':{'product_uom':[]}}
return {'value': {}, 'domain':{'uos_id':[]}}
else:
return {'value': {'price_unit': 0.0}, 'domain':{'product_uom':[]}}
return {'value': {'price_unit': 0.0}, 'domain':{'uos_id':[]}}
part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
product_uom_obj = self.pool.get('product.uom')
fpos_obj = self.pool.get('account.fiscal.position')