Skip to content

Commit

Permalink
[FIX]sale_three_discounts: product update with with_discount policy
Browse files Browse the repository at this point in the history
closes #774

X-original-commit: 4e46828
Signed-off-by: lav-adhoc <lav@adhoc.com.ar>
Signed-off-by: jok-adhoc <jok@adhoc.com.ar>
  • Loading branch information
jok-adhoc committed Jan 23, 2024
1 parent de4da63 commit 226b221
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sale_three_discounts/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@ def _compute_discounts(self):
def _onchange_discounts(self):
self._compute_discount()
for rec in self:
rec.discount1 = rec.discount
if not (
rec.order_id.pricelist_id
and rec.order_id.pricelist_id.discount_policy == 'without_discount'
):
continue
else:
rec.discount1 = rec.discount

def _prepare_invoice_line(self, **optional_values):
res = super()._prepare_invoice_line(**optional_values)
Expand Down

0 comments on commit 226b221

Please sign in to comment.