diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index 633a2d0ff41..f226767ba6f 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -1007,13 +1007,13 @@ class SaleOrderLine(models.Model): @api.onchange('product_id', 'price_unit', 'product_uom', 'product_uom_qty', 'tax_id') def _onchange_discount(self): - self.discount = 0.0 if not (self.product_id and self.product_uom and self.order_id.partner_id and self.order_id.pricelist_id and self.order_id.pricelist_id.discount_policy == 'without_discount' and self.env.user.has_group('sale.group_discount_per_so_line')): return + self.discount = 0.0 product = self.product_id.with_context( lang=self.order_id.partner_id.lang, partner=self.order_id.partner_id.id,