[FIX] purchase: _get_po_line_values_from_procs

Introduced by eefc76fdee
Only the supplier taxes of the company set in the procurement
must be set in the PO.

opw:666875
This commit is contained in:
Goffin Simon
2016-03-09 12:10:39 +01:00
parent 6d56d02d05
commit f5989bc3d8
+1 -2
View File
@@ -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: