From 78ce64a6a79a41e673196939f2bb60a44db27f55 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 3 May 2018 10:49:23 +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 Backport of 8e73023f689d76dc6d545e617ab1c7ce18334068 --- 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 1c0bec65626..c8931900ac9 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -905,8 +905,6 @@ class AccountMoveLine(models.Model): raise UserError(_('Entries are not of the same account!')) if not all_accounts[0].reconcile: 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()