[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
parent 6d3dbb3f0b
commit deb9c63546

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