[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
This commit is contained in:
Goffin Simon
2016-01-19 09:48:31 +01:00
parent 434fa814db
commit eefc76fdee
+2
View File
@@ -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: