[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:
parent
d566558a6c
commit
fa57ce878e
|
@ -1482,9 +1482,9 @@ class account_invoice_line(osv.osv):
|
||||||
raise osv.except_osv(_('No Partner Defined!'),_("You must first select a partner!") )
|
raise osv.except_osv(_('No Partner Defined!'),_("You must first select a partner!") )
|
||||||
if not product:
|
if not product:
|
||||||
if type in ('in_invoice', 'in_refund'):
|
if type in ('in_invoice', 'in_refund'):
|
||||||
return {'value': {}, 'domain':{'product_uom':[]}}
|
return {'value': {}, 'domain':{'uos_id':[]}}
|
||||||
else:
|
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)
|
part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
|
||||||
product_uom_obj = self.pool.get('product.uom')
|
product_uom_obj = self.pool.get('product.uom')
|
||||||
fpos_obj = self.pool.get('account.fiscal.position')
|
fpos_obj = self.pool.get('account.fiscal.position')
|
||||||
|
|
Loading…
Reference in New Issue