mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[14.0][IMP] rma_account: make refund policy editable in approved rmas
* small fix in tests
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user