Skip to content

Commit

Permalink
[16.0][FIX] sale_commission_product_criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
arielbarreiros96 committed Aug 22, 2024
1 parent d5dacae commit b567c56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sale_commission_product_criteria/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def _compute_amount(self):
inv_line.product_id,
inv_line.quantity,
)
if line.invoice_id.move_type and "refund" in line.invoice_id.move_type:
line.amount = -line.amount

Check warning on line 29 in sale_commission_product_criteria/models/account_move.py

View check run for this annotation

Codecov / codecov/patch

sale_commission_product_criteria/models/account_move.py#L29

Added line #L29 was not covered by tests
else:
res = super(AccountInvoiceLineAgent, line)._compute_amount()
return res

0 comments on commit b567c56

Please sign in to comment.