diff --git a/addons/account/models/account_report.py b/addons/account/models/account_report.py index 9562fcb0651..506aeb29b13 100644 --- a/addons/account/models/account_report.py +++ b/addons/account/models/account_report.py @@ -448,11 +448,18 @@ class AccountReportExpression(models.Model): " in case the carryover destination requires more complex logic." ) - _sql_constraints = [( - "domain_engine_subformula_required", - "CHECK(engine != 'domain' OR subformula IS NOT NULL)", - "Expressions using 'domain' engine should all have a subformula." - )] + _sql_constraints = [ + ( + "domain_engine_subformula_required", + "CHECK(engine != 'domain' OR subformula IS NOT NULL)", + "Expressions using 'domain' engine should all have a subformula." + ), + ( + "line_label_uniq", + "UNIQUE(report_line_id,label)", + "The expression label must be unique per report line." + ), + ] @api.depends('engine') def _compute_auditable(self):