mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[12.0][ADD] kpi_dashboard
This commit is contained in:
committed by
Brian McMaster
parent
efa05ba33b
commit
7085393bbc
23
kpi_dashboard/static/src/js/dashboard_model.js
Normal file
23
kpi_dashboard/static/src/js/dashboard_model.js
Normal file
@@ -0,0 +1,23 @@
|
||||
odoo.define('kpi_dashboard.DashboardModel', function (require) {
|
||||
"use strict";
|
||||
|
||||
var BasicModel = require('web.BasicModel');
|
||||
|
||||
var DashboardModel = BasicModel.extend({
|
||||
_fetchRecord: function (record, options) {
|
||||
return this._rpc({
|
||||
model: record.model,
|
||||
method: 'read_dashboard',
|
||||
args: [[record.res_id]],
|
||||
context: _.extend({}, record.getContext(), {bin_size: true}),
|
||||
})
|
||||
.then(function (result) {
|
||||
record.specialData = result;
|
||||
return result
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
return DashboardModel;
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user