diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index cd1f41af3dc..be431c9b2e7 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -54,7 +54,7 @@ - + diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 712d000b02e..09e8304340c 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -1388,7 +1388,12 @@ class account_invoice_line(osv.osv): res_final['value']['price_unit'] = new_price return res_final - def uos_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): + def uos_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None): + if context is None: + context = {} + company_id = company_id if company_id != None else context.get('company_id',False) + context = dict(context) + context.update({'company_id': company_id}) warning = {} res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context) if 'uos_id' in res['value']: