From b30e4ef101bd50f79cf46aa6385c86fa1c2f6f66 Mon Sep 17 00:00:00 2001 From: "Julien Alardot (jual)" Date: Fri, 21 Oct 2022 11:22:46 +0000 Subject: [PATCH] [FIX] account_report: fix IndentationError in formulas As the shortcut formulas don't use the normal way of defining expressions, some formulas may start with characters that would be considered as indentation by the literal_eval. This removes such characters closes odoo/odoo#103968 X-original-commit: b39db297f25d71fdd7122e0d16bb92c7372f9617 Related: odoo/enterprise#33143 Signed-off-by: Quentin De Paoli Signed-off-by: Julien Alardot (jual) --- addons/account/models/account_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_report.py b/addons/account/models/account_report.py index b33204bf885..7fbea7404b2 100644 --- a/addons/account/models/account_report.py +++ b/addons/account/models/account_report.py @@ -357,7 +357,7 @@ class AccountReportLine(models.Model): 'report_line_id': report_line.id, 'label': 'balance', 'engine': engine, - 'formula': formula, + 'formula': formula.lstrip(' \t\n'), # Avoid IndentationError in evals 'subformula': subformula } vals_list.append(vals)