From aaf9e28ce7ffc3ea5a3f1a8c3e112275bd6e3f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 15 Nov 2015 12:41:13 -0300 Subject: [PATCH] Construct the Record.expr_eval context the same way as tryton issue5122 review23641002 --- src/model.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/model.js b/src/model.js index 065dd5a063..3887986f17 100644 --- a/src/model.js +++ b/src/model.js @@ -1019,8 +1019,9 @@ }, expr_eval: function(expr) { if (typeof(expr) != 'string') return expr; - var ctx = jQuery.extend({}, this.get_context()); - ctx.context = jQuery.extend({}, this.model.session.context, ctx); + var ctx = jQuery.extend({}, this.model.session.context); + ctx.context = jQuery.extend({}, ctx.context); + jQuery.extend(ctx.context, this.get_context()); jQuery.extend(ctx, this.get_eval()); ctx.active_model = this.model.name; ctx.active_id = this.id;