diff options
| author | Goffin Simon <sig@odoo.com> | 2016-01-18 14:21:25 +0100 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2016-01-19 09:48:31 +0100 |
| commit | eefc76fdee2dbdfb09efb21e52f0a163228c5aba (patch) | |
| tree | fb436cf7e8a47ef0cce78e97278a2c2eed8359bc /addons | |
| parent | 434fa814db7eadd86908403bc218a81976ede4d2 (diff) | |
[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
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/purchase/purchase.py | 2 |
1 files changed, 2 insertions, 0 deletions
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: |
