[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
This commit is contained in:
Juan Jose Scarafia 2015-08-06 11:51:54 -03:00 committed by Nicolas Martinelli
parent 5844fa4a2a
commit 97fdf7bc6d
1 changed files with 2 additions and 1 deletions

View File

@ -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