From 912d50545233c8560c8151105041a0c426d9a278 Mon Sep 17 00:00:00 2001 From: Dorin Hongu Date: Wed, 28 Feb 2024 18:35:34 +0200 Subject: [PATCH] fix test prin adaugare skip_account_move_synchronization --- deltatech_expenses/models/deltatech_expenses_deduction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deltatech_expenses/models/deltatech_expenses_deduction.py b/deltatech_expenses/models/deltatech_expenses_deduction.py index a9d318ab6d..ce076e06a8 100644 --- a/deltatech_expenses/models/deltatech_expenses_deduction.py +++ b/deltatech_expenses/models/deltatech_expenses_deduction.py @@ -329,6 +329,7 @@ def validate_expenses(self): for payment in payments: for payment_line in payment.move_id.line_ids: + payment_line = payment_line.with_context(skip_account_move_synchronization=True) if payment_line.account_id == self.company_id.account_journal_payment_credit_account_id: # ( # payment.journal_id.default_account_id, @@ -349,7 +350,7 @@ def validate_expenses(self): if aml.account_id.internal_type == "payable": move_lines |= aml - move_lines.reconcile() + move_lines.with_context(skip_account_move_synchronization=True).reconcile() # change state for vouchers without residual. If not in statement, remains "in_payment" vouchers.set_paid()