[FIX] purchase: _get_po_line_values_from_proc-sig
Introduced by eefc76f Only the supplier taxes of the company set in the procurement must be set in the PO. Backport from f5989bc3d8f10a0354a7d085576276d4e1778fbd opw:671449
This commit is contained in:
parent
f6a62fa6e1
commit
13c33264e6
|
@ -1423,6 +1423,7 @@ class procurement_order(osv.osv):
|
||||||
new_context.update({'lang': partner.lang, 'partner_id': partner.id})
|
new_context.update({'lang': partner.lang, 'partner_id': partner.id})
|
||||||
product = prod_obj.browse(cr, uid, procurement.product_id.id, context=new_context)
|
product = prod_obj.browse(cr, uid, procurement.product_id.id, context=new_context)
|
||||||
taxes_ids = procurement.product_id.supplier_taxes_id
|
taxes_ids = procurement.product_id.supplier_taxes_id
|
||||||
|
taxes_ids = taxes_ids.filtered(lambda x: x.company_id.id == procurement.company_id.id)
|
||||||
# It is necessary to have the appropriate fiscal position to get the right tax mapping
|
# It is necessary to have the appropriate fiscal position to get the right tax mapping
|
||||||
fiscal_position = False
|
fiscal_position = False
|
||||||
fiscal_position_id = po_obj.onchange_partner_id(cr, uid, None, partner.id, context=context)['value']['fiscal_position']
|
fiscal_position_id = po_obj.onchange_partner_id(cr, uid, None, partner.id, context=context)['value']['fiscal_position']
|
||||||
|
|
Loading…
Reference in New Issue