diff --git a/analytic_tag_dimension/models/account_analytic_dimension.py b/analytic_tag_dimension/models/account_analytic_dimension.py index 533aa53689..253bc19562 100644 --- a/analytic_tag_dimension/models/account_analytic_dimension.py +++ b/analytic_tag_dimension/models/account_analytic_dimension.py @@ -57,8 +57,10 @@ def _update_invoice_report(self, field_to_update, value): @api.model def create(self, values): res = super().create(values) - _models = self.env["ir.model"].search( - [("model", "in", self.get_model_names())], order="id" + _models = ( + self.env["ir.model"] + .sudo() + .search([("model", "in", self.get_model_names())], order="id") ) _models.write( {