You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
652 B
23 lines
652 B
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;
|
|
|
|
});
|