From 97fdf7bc6da8ae519f08908983a04a54cc9d23c1 Mon Sep 17 00:00:00 2001 From: Juan Jose Scarafia Date: Thu, 6 Aug 2015 11:51:54 -0300 Subject: [PATCH] [IMP] sale: call product_id_change with company_id from wizard Add company when calling product_id_change from _prepare_advance_invoice_vals on sale.advance.payment.inv wizard. This way we have same on change call as the one called from account_invoice (e.g. on uos_id_change and onchange_account_id). Closes #7939 --- addons/sale/wizard/sale_make_invoice_advance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index ef88ed3e76c..4ddf1e6bee9 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -82,7 +82,8 @@ class sale_advance_payment_inv(osv.osv_memory): result = [] for sale in sale_obj.browse(cr, uid, sale_ids, context=context): val = inv_line_obj.product_id_change(cr, uid, [], wizard.product_id.id, - False, partner_id=sale.partner_id.id, fposition_id=sale.fiscal_position.id) + False, partner_id=sale.partner_id.id, fposition_id=sale.fiscal_position.id, + company_id=sale.company_id.id) res = val['value'] # determine and check income account