[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#69100 X-original-commit: f0a1bb3692e17334850fed4f22444f47992adb78 Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
@@ -3713,7 +3713,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:
|
||||
|
||||
Reference in New Issue
Block a user