From f669f5325cddde4f66b448d6ebc27d6e8e8a1aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 10 Aug 2015 11:11:00 +0200 Subject: [PATCH] The date_format must be set on all actions context issue4892 review16511002 --- src/action.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/action.js b/src/action.js index 219e9145b2..986fce6e0e 100644 --- a/src/action.js +++ b/src/action.js @@ -10,6 +10,13 @@ Sao.Action.exec_action = function(action, data, context) { if (context === undefined) { context = {}; + } else { + context = jQuery.extend({}, context); + } + if (!('date_format' in context)) { + if (session.context.locale && session.context.locale.date) { + context.date_format = session.context.locale.date; + } } if (data === undefined) { data = {}; @@ -50,11 +57,6 @@ ctx = jQuery.extend(ctx, params.context); ctx = jQuery.extend(ctx, context); params.context = jQuery.extend(params.context, context); - if (!('date_format' in params.context)) { - if (session.context.locale && session.context.locale.date) { - params.context.date_format = session.context.locale.date; - } - } var domain_context = jQuery.extend({}, ctx); domain_context.context = ctx;