Skip to content

Commit

Permalink
[FIX] delivery: Dont add other companies taxes deliveries
Browse files Browse the repository at this point in the history
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 odoo#8311
  • Loading branch information
JosDeGraeve authored and beledouxdenis committed Sep 9, 2015
1 parent 2f8d6e7 commit ca47d41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/delivery/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def delivery_set(self, cr, uid, ids, context=None):

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)
Expand Down

0 comments on commit ca47d41

Please sign in to comment.