Skip to content

Commit

Permalink
[17.0][FIX] sale_fixed_discount: Fixed discount consideration for por…
Browse files Browse the repository at this point in the history
…tal orders
  • Loading branch information
fd-oerp committed Dec 23, 2024
1 parent 2dd2294 commit be2e3bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sale_fixed_discount/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ def _compute_discount(self):
lines_with_discount_fixed = self.filtered(lambda sol: sol.discount_fixed)
for line in lines_with_discount_fixed:
line.discount = line._get_discount_from_fixed_discount()
return super(SaleOrderLine, self - lines_with_discount_fixed)
return super(
SaleOrderLine, self - lines_with_discount_fixed
)._compute_discount()

def _get_discount_from_fixed_discount(self):
"""Calculate the discount percentage from the fixed discount amount."""
Expand Down

0 comments on commit be2e3bc

Please sign in to comment.