[14.0][FIX] rma_sale: compatibility with refunds free of charge

This commit is contained in:
AaronHForgeFlow
2023-01-05 11:11:41 +01:00
committed by JasminSForgeFlow
parent 9f100b2a03
commit 3807cd329f

View File

@@ -14,6 +14,8 @@ class RmaRefund(models.TransientModel):
def _get_refund_price_unit(self, rma):
price_unit = super(RmaRefund, self)._get_refund_price_unit(rma)
if rma.operation_id.refund_free_of_charge:
return price_unit
if rma.type == "customer":
if rma.account_move_line_id:
price_unit = rma.account_move_line_id.price_unit