[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 <qdp@odoo.com> Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user