[FIX] account: in bank statement reconciliation widget, searching on a given amount now also return blue lines with that amount (previously it was only looking on payable/receivable lines)

This commit is contained in:
qdp-odoo
2016-06-16 14:26:46 +02:00
parent 9114d36414
commit 26dfe8944d
+8 -1
View File
@@ -583,7 +583,14 @@ class AccountMoveLine(models.Model):
]
try:
amount = float(str)
amount_domain = ['|', ('amount_residual', '=', amount), '|', ('amount_residual_currency', '=', amount), '|', ('amount_residual', '=', -amount), ('amount_residual_currency', '=', -amount)]
amount_domain = [
'|', ('amount_residual', '=', amount),
'|', ('amount_residual_currency', '=', amount),
'|', ('amount_residual', '=', -amount),
'|', ('amount_residual_currency', '=', -amount),
'&', ('account_id.internal_type', '=', 'liquidity'),
'|', '|', ('debit', '=', amount), ('credit', '=', amount), ('amount_currency', '=', amount),
]
str_domain = expression.OR([str_domain, amount_domain])
except:
pass