[FIX] correctly propagate the action_data context (in a do_execute_action) to the...
authorXavier Morel <xmo@openerp.com>
Fri, 14 Oct 2011 12:20:20 +0000 (14:20 +0200)
committerXavier Morel <xmo@openerp.com>
Fri, 14 Oct 2011 12:20:20 +0000 (14:20 +0200)
This is mainly of use for buttons: the context they set should apply not only to fetching and executing the initial action, but to all calls within the popup they open, if any

lp bug: https://launchpad.net/bugs/873202 fixed

bzr revid: xmo@openerp.com-20111014122020-n3uz31ilemt1lvro

addons/web/static/src/js/views.js

index 3cc7d7e..0ec286f 100644 (file)
@@ -859,7 +859,8 @@ db.web.View = db.web.Widget.extend(/** @lends db.web.View# */{
                     }],
                     domains: []
                 }).pipe(function (results) {
-                    action.context = results.context
+                    action.context = new db.web.CompoundContext(
+                        results.context, action_data.context);
                     return self.do_action(action, result_handler);
                 });
             } else {