From 2d54dec94002ce68a868ac82bfe0ae38cd010e6d Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 12 Jul 2017 15:43:22 +0200 Subject: [PATCH] [FIX] website: Impossibe to open website admin with some languages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- addons/website/static/src/js/website.backendDashboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/js/website.backendDashboard.js b/addons/website/static/src/js/website.backendDashboard.js index 5caad853fcf..18307bba466 100644 --- a/addons/website/static/src/js/website.backendDashboard.js +++ b/addons/website/static/src/js/website.backendDashboard.js @@ -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;