From 3dd26e22f299ea58d10b544ba1528b269c0d08b2 Mon Sep 17 00:00:00 2001 From: Jordi Ballester Alomar Date: Mon, 21 Nov 2022 15:13:06 +0100 Subject: [PATCH] [FIX] include anglo-saxon price unit calculation in refunds. Otherwise the anglo saxon entries won't be correct. For example, the Interim (Delivered) account should balance after receiving and triggering a refund on a customer rma. --- .../tests/test_rma_account_unreconciled.py | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/rma_account_unreconciled/tests/test_rma_account_unreconciled.py b/rma_account_unreconciled/tests/test_rma_account_unreconciled.py index 27082e0d..42ce79dd 100644 --- a/rma_account_unreconciled/tests/test_rma_account_unreconciled.py +++ b/rma_account_unreconciled/tests/test_rma_account_unreconciled.py @@ -96,25 +96,6 @@ class TestRmaAccountUnreconciled(TestRma): lambda x: x.state != "posted" ).action_post() for rma_line in self.rma_customer_id.rma_line_ids: - rma_line._compute_unreconciled() - self.assertTrue(rma_line.unreconciled) - - self.assertEqual( - self.env["rma.order.line"].search_count( - [ - ("type", "=", "customer"), - ("unreconciled", "=", True), - ("rma_id", "=", self.rma_customer_id.id), - ] - ), - 3, - ) - for rma_line in self.rma_customer_id.rma_line_ids: - aml_domain = rma_line.sudo().action_view_unreconciled().get("domain") - aml_lines = ( - aml_domain and self.env["account.move.line"].search(aml_domain) or False - ) - if aml_lines: - aml_lines.reconcile() + # The debits and credits are reconciled automatically rma_line._compute_unreconciled() self.assertFalse(rma_line.unreconciled)