summaryrefslogtreecommitdiff
path: root/addons/sale_coupon_delivery
diff options
context:
space:
mode:
authorNicolás Mac Rouillon <nmr@adhoc.com.ar>2020-12-21 14:52:04 +0000
committerVictor Feyens <vfe@odoo.com>2021-03-17 12:52:49 +0000
commiteb6ba44a6bfd0ebfce887edc307e0306765e5183 (patch)
treee44cbdd78ba82657c2a49ae286735e6de6ec6a15 /addons/sale_coupon_delivery
parent1efece5e44c2a69435184b98cb7a984acc881e90 (diff)
[FIX] sale_coupon(_delivery): Filter the taxes by company.
In this case for scenario with multi-company, the new line of the reward product, should be set with the taxes for company of the current sale order. Before this change the taxes that are selected were for the all companies setted in the product. closes odoo/odoo#68014 X-original-commit: c1bbc53f5c61b3c6b99ad97e05407fd28b522046 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Diffstat (limited to 'addons/sale_coupon_delivery')
-rw-r--r--addons/sale_coupon_delivery/models/sale_order.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/sale_coupon_delivery/models/sale_order.py b/addons/sale_coupon_delivery/models/sale_order.py
index f7762a7256d..79c0e6033e4 100644
--- a/addons/sale_coupon_delivery/models/sale_order.py
+++ b/addons/sale_coupon_delivery/models/sale_order.py
@@ -26,7 +26,8 @@ class SaleOrder(models.Model):
def _get_reward_values_free_shipping(self, program):
delivery_line = self.order_line.filtered(lambda x: x.is_delivery)
- taxes = self.fiscal_position_id.map_tax(delivery_line.product_id.taxes_id)
+ taxes = delivery_line.product_id.taxes_id.filtered(lambda t: t.company_id.id == self.company_id.id)
+ taxes = self.fiscal_position_id.map_tax(taxes)
return {
'name': _("Discount: %s", program.name),
'product_id': program.discount_line_product_id.id,