summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/pyeval.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-10-10 16:59:45 +0200
committerXavier Morel <xmo@openerp.com>2012-10-10 16:59:45 +0200
commit1fa00288b269e68a47849eaa3fefc090759a357d (patch)
treebf48448882928681356796b1c7afdf98a4050924 /addons/web/static/src/js/pyeval.js
parent894bd34e6275fe838bb0de30e25de4b0e09d4636 (diff)
[FIX] add 'context' free variable in evaluation contexts for domains and contexts
bzr revid: xmo@openerp.com-20121010145945-16shdry3udum0mn1
Diffstat (limited to 'addons/web/static/src/js/pyeval.js')
-rw-r--r--addons/web/static/src/js/pyeval.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/static/src/js/pyeval.js b/addons/web/static/src/js/pyeval.js
index 8b56d17c14e..a00fd186d58 100644
--- a/addons/web/static/src/js/pyeval.js
+++ b/addons/web/static/src/js/pyeval.js
@@ -307,7 +307,9 @@ openerp.web.pyeval = function (instance) {
* @param {Object} [context] evaluation context
*/
instance.web.pyeval.eval = function (type, object, context) {
- if (!context) { context = instance.web.pyeval.context()}
+ context = _.extend(instance.web.pyeval.context(), context || {});
+ context['context'] = py.dict.fromJSON(context);
+
switch(type) {
case 'contexts': return eval_contexts(object, context);
case 'domains': return eval_domains(object, context);