From f5989bc3d8f10a0354a7d085576276d4e1778fbd Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 9 Mar 2016 12:10:39 +0100 Subject: [PATCH] [FIX] purchase: _get_po_line_values_from_procs Introduced by eefc76fdee2dbdfb09efb21e52f0a163228c5aba Only the supplier taxes of the company set in the procurement must be set in the PO. opw:666875 --- addons/purchase/purchase.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 57590f8d034..2cecbe9c2f2 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -1453,8 +1453,7 @@ class procurement_order(osv.osv): names_dict[id] = name for procurement in procurements: taxes_ids = procurement.product_id.supplier_taxes_id - companies = self.pool['res.company'].search(cr, uid, [('id', 'child_of', procurement.company_id.id)]) - taxes_ids = taxes_ids.filtered(lambda x: x.company_id.id in companies) + 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 fp = acc_pos_obj.get_fiscal_position(cr, uid, None, partner.id, context=context) if fp: