Skip to content

Commit

Permalink
[FIX] account_financial_risk: Sudo on ir.model.data search
Browse files Browse the repository at this point in the history
Only superadmins have access to this model, so let's do the operation
with sudo for getting the ID, which is the only intention of that code.

TT50264
  • Loading branch information
pedrobaeza committed Jul 22, 2024
1 parent 47328bb commit 1e76549
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion account_financial_risk/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Account Financial Risk",
"summary": "Manage customer risk",
"version": "15.0.1.7.2",
"version": "15.0.1.7.3",
"category": "Accounting",
"license": "AGPL-3",
"author": "Tecnativa, Odoo Community Association (OCA)",
Expand Down
1 change: 1 addition & 0 deletions account_financial_risk/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ def open_risk_pivot_info(self):
view_name = "financial_risk_{}_pivot_view".format(model_name.replace(".", "_"))
view_id = (
self.env["ir.model.data"]
.sudo()
.search(
[("name", "=", view_name), ("model", "=", "ir.ui.view")],
limit=1,
Expand Down
1 change: 0 additions & 1 deletion account_financial_risk/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down

0 comments on commit 1e76549

Please sign in to comment.