Skip to content

Commit

Permalink
[FIX] project_timesheet_time_control: Avoid access error with ir.model
Browse files Browse the repository at this point in the history
Only "advanced" users have read access to ir.model, for this reason, we need to apply .sudo()
  • Loading branch information
victoralmau committed Aug 29, 2024
1 parent b8d9160 commit 9ba5614
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def button_end_work(self):
self._timesheet_running_domain(),
)
if not running_lines:
model = self.env["ir.model"].search([("model", "=", self._name)])
model = self.env["ir.model"].sudo().search([("model", "=", self._name)])
message = _(
"No running timer found in %(model)s %(record)s. "
"Refresh the page and check again."
Expand Down

0 comments on commit 9ba5614

Please sign in to comment.