summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authoremilkholod <emil.kholod@gmail.com>2021-04-11 07:00:32 +0000
committeremilkholod <emil.kholod@gmail.com>2021-04-11 07:12:59 +0000
commitf0a1bb3692e17334850fed4f22444f47992adb78 (patch)
tree33f74c15d1626bf7a8a6d006bed55987fc9e1a2f /addons
parent58649ef6ab7476b90c7deb5a9a2acc2553e1bb62 (diff)
[FIX] account : Fix error on `search_read` for `account.move.line`
* If `where_clause` is empty, then there will be an error. This commit fixes that. closes odoo/odoo#66978 Signed-off-by: William André (wan) <wan@odoo.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/account/models/account_move.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index 3d0c034cd41..b4d32f3371b 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -3605,7 +3605,7 @@ class AccountMoveLine(models.Model):
)
FROM %(from)s
WHERE %(where)s
- """ % {'from': from_clause, 'where': where_clause, 'order_by': order_string}
+ """ % {'from': from_clause, 'where': where_clause or 'TRUE', 'order_by': order_string}
self.env.cr.execute(sql, where_clause_params)
result = {r[0]: r[1] for r in self.env.cr.fetchall()}
for record in self: