[FIX] rma_account: maintain refund_line_id

This commit is contained in:
Jordi Ballester
2022-03-02 13:11:20 +01:00
committed by AlexPForgeFlow
parent a6f2e5c3d7
commit f3bf3f3b3f

View File

@@ -279,12 +279,10 @@ class TestAccountMoveLineRmaOrderLine(common.SavepointCase):
}
)
make_refund.invoice_refund()
rma_line.move_line_ids.move_id.filtered(
rma_line.refund_line_ids.move_id.filtered(
lambda x: x.state != "posted"
).action_post()
for aml in rma_line.move_line_ids.move_id.filtered(
lambda x: x.move_type in ("out_refund", "in_refund")
).invoice_line_ids:
for aml in rma_line.refund_line_ids.move_id.invoice_line_ids:
if aml.product_id == rma_line.product_id and aml.move_id:
self.assertEqual(
aml.rma_line_id,