[IMP] rma: Refactor all rma modules in order to consider using the correct price unit in moves

Otherwise the inventory accounting will be completely wrong.
This commit is contained in:
Jordi Ballester
2022-03-02 11:35:08 +01:00
committed by AlexPForgeFlow
parent d50fbfe7d0
commit a6f2e5c3d7

View File

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