[IMP] kpi_dashboard: Allow to set a context on the action

This commit is contained in:
Enric Tobella
2020-07-16 16:55:06 +02:00
parent 698138ca3f
commit 841f590edb
4 changed files with 14 additions and 7 deletions

View File

@@ -187,15 +187,17 @@ class KpiKpiAction(models.Model):
('ir.actions.client', 'ir.actions.client')],
required=True,
)
context = fields.Char()
def read_dashboard(self):
result = []
result = {}
for r in self:
result.append({
result[r.id] = {
'id': r.action.id,
'type': r.action._name,
'name': r.action.name
})
'name': r.action.name,
'context': safe_eval(r.context or '{}')
}
return result