From b567c569c0e8d60158f4001282f505c4f85c8d93 Mon Sep 17 00:00:00 2001 From: Ariel Barreiros Date: Thu, 22 Aug 2024 10:34:16 +0100 Subject: [PATCH] [16.0][FIX] sale_commission_product_criteria --- sale_commission_product_criteria/models/account_move.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sale_commission_product_criteria/models/account_move.py b/sale_commission_product_criteria/models/account_move.py index 2b8cda490..60e710daa 100644 --- a/sale_commission_product_criteria/models/account_move.py +++ b/sale_commission_product_criteria/models/account_move.py @@ -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 else: res = super(AccountInvoiceLineAgent, line)._compute_amount() return res