[FIX] account: reverse pair
Commit b6d4cd5deb introduced the auto-reconciliation when reversing
an entry. However, we should make sure to only reconcile non-reconciled
entries. Such an entry can be generated from an exchange rate entry.
opw-1826024
This commit is contained in:
committed by
Nicolas Martinelli
parent
a52a6b865c
commit
1dbc655676
@@ -220,7 +220,7 @@ class AccountMove(models.Model):
|
||||
|
||||
# Do not forward port in >= saas-14
|
||||
def _reconcile_reversed_pair(self, move, reversed_move):
|
||||
amls_to_reconcile = move.line_ids + reversed_move.line_ids
|
||||
amls_to_reconcile = (move.line_ids + reversed_move.line_ids).filtered(lambda l: not l.reconciled)
|
||||
accounts_reconcilable = amls_to_reconcile.mapped('account_id').filtered(lambda a: a.reconcile)
|
||||
for account in accounts_reconcilable:
|
||||
amls_for_account = amls_to_reconcile.filtered(lambda l: l.account_id.id == account.id)
|
||||
|
||||
Reference in New Issue
Block a user