[FIX] web: reset active_model, id, ids on executing button of type object
authorDenis Ledoux <dle@openerp.com>
Wed, 30 Apr 2014 12:37:27 +0000 (14:37 +0200)
committerDenis Ledoux <dle@openerp.com>
Wed, 30 Apr 2014 12:37:27 +0000 (14:37 +0200)
bzr revid: dle@openerp.com-20140430123727-cnz6k8is2sqe65w0

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

index e3e9175..8701663 100644 (file)
@@ -1443,6 +1443,7 @@ instance.web.View = instance.web.Widget.extend({
                     console.error("Could not JSON.parse arguments", action_data.args);
                 }
             }
+            context.add({'active_model': dataset.model, 'active_ids': [record_id], 'active_id': record_id})
             args.push(context);
             return dataset.call_button(action_data.name, args).then(handler).then(function () {
                 if (instance.webclient) {