From eefc76fdee2dbdfb09efb21e52f0a163228c5aba Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 18 Jan 2016 14:21:25 +0100 Subject: [PATCH] [FIX] purchase: taxes_id in PO line When a PO line is created from procurement, the supplier taxes set on the PO line must be visible in the company set on the procurement. opw:666875 --- addons/purchase/purchase.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 773cae9d0c5..9f7ebafc18b 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -1449,6 +1449,8 @@ 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) # 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: