mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[14.0][FIX] kpi_dashboard report_label: fix read
This commit is contained in:
@@ -179,8 +179,9 @@ class KpiKpi(models.Model):
|
||||
|
||||
def show_value(self):
|
||||
self.ensure_one()
|
||||
action = self.env.ref("kpi_dashboard.kpi_kpi_act_window")
|
||||
result = action.read()[0]
|
||||
result = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"kpi_dashboard.kpi_kpi_act_window"
|
||||
)
|
||||
result.update(
|
||||
{
|
||||
"res_id": self.id,
|
||||
@@ -247,8 +248,9 @@ class KpiKpiHistory(models.Model):
|
||||
|
||||
def show_form(self):
|
||||
self.ensure_one()
|
||||
action = self.env.ref("kpi_dashboard.kpi_kpi_history_act_window")
|
||||
result = action.read()[0]
|
||||
result = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"kpi_dashboard.kpi_kpi_history_act_window"
|
||||
)
|
||||
result.update(
|
||||
{
|
||||
"res_id": self.id,
|
||||
|
||||
@@ -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"),
|
||||
"|",
|
||||
|
||||
Reference in New Issue
Block a user