From fa57ce878ec6b3499e7fce9f06626c4bbcca7c10 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 17 Jun 2015 11:53:58 +0200 Subject: [PATCH] [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 --- addons/account/account_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 53b3136b075..52babde17af 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -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')