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