mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[IMP] kpi_dashboard: Allow to set a context on the action
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user