[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 8e73023f68
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user