[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
committed by Brian McMaster
parent 7e569a270d
commit 55d83caf72
2 changed files with 7 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
"name": "Kpi Dashboard",
"summary": """
Create Dashboards using kpis""",
"version": "14.0.1.1.0",
"version": "14.0.1.1.1",
"license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",

View File

@@ -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,