diff --git a/addons/account/models/account_report.py b/addons/account/models/account_report.py index 382261f45e5..fa80755a5f3 100644 --- a/addons/account/models/account_report.py +++ b/addons/account/models/account_report.py @@ -312,7 +312,7 @@ class AccountReportLine(models.Model): aggregation_formula = fields.Char(string="Aggregation Formula Shortcut", help="Internal field to shorten expression_ids creation for the aggregation engine", inverse='_inverse_aggregation_formula', store=False) _sql_constraints = [ - ('code_uniq', 'unique (code)', "A report line with the same code already exists."), + ('code_uniq', 'unique (report_id, code)', "A report line with the same code already exists."), ] @api.depends('parent_id.hierarchy_level')