Skip to content

Commit

Permalink
[FIX] mis_builder: use sudo when calling ir.ui.view
Browse files Browse the repository at this point in the history
  • Loading branch information
cav-adhoc committed Jun 3, 2024
1 parent 3cb7ab9 commit bf4e806
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mis_builder/models/mis_report_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,10 @@ def _get_drilldown_views_and_orders(self):
@api.model
def _get_drilldown_model_views(self, model_name):
self.ensure_one()
types = self.env["ir.ui.view"]._read_group(
[("model", "=", model_name)], ["type"], ["type"]
types = (
self.env["ir.ui.view"]
.sudo()
._read_group([("model", "=", model_name)], ["type"], ["type"])
)
views_order = self._get_drilldown_views_and_orders()
views = {type["type"] for type in types if type["type"] in views_order}
Expand Down

0 comments on commit bf4e806

Please sign in to comment.