diff --git a/rma_account/models/rma_order_line.py b/rma_account/models/rma_order_line.py index cfdedfb6..745c0dac 100644 --- a/rma_account/models/rma_order_line.py +++ b/rma_account/models/rma_order_line.py @@ -93,8 +93,7 @@ class RmaOrderLine(models.Model): string="Refund Policy", required=True, default="no", - readonly=True, - states={"draft": [("readonly", False)], "approved": [("readonly", False)]}, + readonly=False, ) qty_to_refund = fields.Float( string="Qty To Refund", diff --git a/rma_account/tests/test_rma_account.py b/rma_account/tests/test_rma_account.py index b970ed34..b86eb3bd 100644 --- a/rma_account/tests/test_rma_account.py +++ b/rma_account/tests/test_rma_account.py @@ -220,7 +220,7 @@ class TestRmaAccount(common.SingleTransactionCase): {"customer": True, "active_ids": rma.ids, "active_model": "rma.order.line"} ).create({"description": "Test refund"}) make_refund.invoice_refund() - rma.refund_line_ids.move_id.post() + rma.refund_line_ids.move_id.action_post() rma._compute_refund_count() self.assertEqual(rma.refund_count, 1) self.assertEqual(rma.qty_to_refund, 0.0) @@ -258,7 +258,7 @@ class TestRmaAccount(common.SingleTransactionCase): {"customer": True, "active_ids": rma.ids, "active_model": "rma.order.line"} ).create({"description": "Test refund"}) make_refund.invoice_refund() - rma.refund_line_ids.move_id.post() + rma.refund_line_ids.move_id.action_post() rma._compute_refund_count() self.assertEqual( self.operation_1.refund_journal_id, rma.refund_line_ids.journal_id