[FIX] Import failure if element is not part of the domain

This commit is contained in:
Florian da Costa
2020-11-25 15:44:13 +01:00
parent ac89271d5b
commit 22e9234d23

View File

@@ -693,6 +693,7 @@ class AccountReconciliation(models.AbstractModel):
st_line, aml_accounts, partner_id,
excluded_ids=excluded_ids, search_str=search_str)
# We want to replace a domain item by another one
if ('payment_id', '<>', False) in domain:
position = domain.index(('payment_id', '<>', False))
domain[position] = ['journal_id', '=', st_line.journal_id.id]
return domain