diff --git a/rma_account/models/account_move.py b/rma_account/models/account_move.py index d509aad1..81864c6e 100644 --- a/rma_account/models/account_move.py +++ b/rma_account/models/account_move.py @@ -235,6 +235,7 @@ class AccountMoveLine(models.Model): comodel_name="rma.order.line", string="RMA line", ondelete="set null", + index=True, help="This will contain the rma line that originated this line", ) diff --git a/rma_account/wizards/rma_refund.xml b/rma_account/wizards/rma_refund.xml index da9cc4d2..60b6da75 100644 --- a/rma_account/wizards/rma_refund.xml +++ b/rma_account/wizards/rma_refund.xml @@ -59,13 +59,13 @@ name="%(action_rma_refund)d" string="Create Refund" class="oe_highlight" - attrs="{'invisible':['|', '|', ('qty_to_refund', '=', 0), ('state', '!=', 'approved'), ('refund_policy', '=', 'no')]}" + attrs="{'invisible':['|', '|', '|', ('qty_to_refund', '=', 0), ('qty_to_refund', '<', 0), ('state', '!=', 'approved'), ('refund_policy', '=', 'no')]}" type="action" />