pad_dashboard.js
1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
odoo.define('idg_dashboard.pad_dashboard', function (require) {
"use strict";
var AbstractAction = require('web.AbstractAction');
var core = require('web.core');
var QWeb = core.qweb;
var PadDashboard = AbstractAction.extend({
template: 'Dashboard',
init: function(parent, context) {
this._super(parent, context);
this.dashboard_templates = [
'DashboardTop',
];
this.pad_total_nasional = [];
},
start: function() {
var self = this;
this.set("title", "Dashboard");
return this._super().then(function() {
self.render_dashboards();
});
},
render_dashboards: function() {
var self = this;
_.each(this.dashboard_templates, function(template) {
self.$('.o_pad_dashboard').append(QWeb.render(template, {widget: self}));
});
},
fetch_data: function() {
// to do : fetching the data
},
});
core.action_registry.add('pad_dashboard_tag', PadDashboard);
return PadDashboard;
});