[FIX] website: Impossibe to open website admin with some languages

When clicking on the app website admin with the arabic language,
it raised an error because this.date_from.format('YYYY-MM-DD') in
function fetch_data returned an arabic date "٢٠١٧-٠٧-٠٥".

opw:751960
This commit is contained in:
Goffin Simon
2017-07-12 16:12:43 +02:00
parent f5753886b2
commit 2d54dec940
@@ -54,8 +54,8 @@ var Dashboard = Widget.extend(ControlPanelMixin, {
fetch_data: function() {
var self = this;
return ajax.jsonRpc('/website/fetch_dashboard_data', 'call', {
'date_from': this.date_from.format('YYYY-MM-DD'),
'date_to': this.date_to.format('YYYY-MM-DD'),
'date_from': this.date_from.year()+'-'+(this.date_from.month()+1)+'-'+this.date_from.date(),
'date_to': this.date_to.year()+'-'+(this.date_to.month()+1)+'-'+this.date_to.date(),
}).done(function(result) {
self.data = result;
self.dashboards_data = result.dashboards;