From 8e73023f689d76dc6d545e617ab1c7ce18334068 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 3 May 2018 12:15:40 +0200 Subject: [PATCH] [FIX] account: do not block reconciliation on different partners This constraint was added during the Great Accounting Reform of v9, in an attempt to help users avoid reconciliation mistakes. It turns out that such mistakes are difficult to make in normal situations, since the system only offers matching entries to reconcile, so the constraint is largely redundant. On the other hand, it does block legit cases of reconciliation, such as those where a large number of lines with different partners are reconciled together. This often happens when reversing a Journal Entry that encompasses multiple customers, such as a POS closing entry, or a manual entry. To make the system more flexible, let's consider that when a manual reconciliation breaks the "single partner" rule explicitly, it's for a good reason, so we should allow it. OPW: 1840437 --- addons/account/models/account_move.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index b2daa735434..f8b46f43dc0 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1015,8 +1015,6 @@ class AccountMoveLine(models.Model): raise UserError(_('Entries are not of the same account!')) if not (all_accounts[0].reconcile or all_accounts[0].internal_type == 'liquidity'): raise UserError(_('The account %s (%s) is not marked as reconciliable !') % (all_accounts[0].name, all_accounts[0].code)) - if len(partners) > 1: - raise UserError(_('The partner has to be the same on all lines for receivable and payable accounts!')) #reconcile everything that can be remaining_moves = self.auto_reconcile_lines()