[14.0][FIX] kpi_dashboard report_label: fix read

This commit is contained in:
Núria Sancho
2023-02-09 10:25:22 +01:00
parent 7be0499c7b
commit 99e7e2a0a2
2 changed files with 10 additions and 7 deletions

View File

@@ -23,10 +23,11 @@ class IrActionsServer(models.Model):
def report_label_associated_view(self):
"""View the associated qweb templates"""
self.ensure_one()
action = self.env.ref("base.action_ui_view", raise_if_not_found=False)
if not action or len(self.label_template.split(".")) < 2:
res = self.env["ir.actions.act_window"]._for_xml_id(
"base.action_ui_view", raise_if_not_found=False
)
if not res or len(self.label_template.split(".")) < 2:
return False
res = action.read()[0]
res["domain"] = [
("type", "=", "qweb"),
"|",