From ca47d4117f0c8d21d2fb4d6c4e8b38734adc98bf Mon Sep 17 00:00:00 2001 From: Jos De Graeve Date: Tue, 1 Sep 2015 12:23:12 +0200 Subject: [PATCH] [FIX] delivery: Dont add other companies taxes deliveries When delivery_set is called from the website_delivery module, the uid is set to SUPERUSER_ID. In a multi-company environment, this causes the linked taxes from the delivery product to be added to the sale_order_line. Closes #8311 --- addons/delivery/sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/delivery/sale.py b/addons/delivery/sale.py index 83744d56e0a..42fb1599070 100644 --- a/addons/delivery/sale.py +++ b/addons/delivery/sale.py @@ -77,7 +77,7 @@ class sale_order(osv.Model): grid = grid_obj.browse(cr, uid, grid_id, context=context) - taxes = grid.carrier_id.product_id.taxes_id + taxes = grid.carrier_id.product_id.taxes_id.filtered(lambda t: t.company_id.id == order.company_id.id) fpos = order.fiscal_position or False taxes_ids = acc_fp_obj.map_tax(cr, uid, fpos, taxes) price_unit = grid_obj.get_price(cr, uid, grid.id, order, time.strftime('%Y-%m-%d'), context)