[IMP] allow modification of options of action of EmbedClient
authorChristophe Simonis <chs@openerp.com>
Tue, 13 Dec 2011 16:34:46 +0000 (17:34 +0100)
committerChristophe Simonis <chs@openerp.com>
Tue, 13 Dec 2011 16:34:46 +0000 (17:34 +0100)
bzr revid: chs@openerp.com-20111213163446-h6sy1yti92mcgg1f

addons/web/static/src/js/embed.js

index ce6ad8b..1c26106 100644 (file)
@@ -20,9 +20,10 @@ openerp.web.embed = function(session) {
     
     session.web.EmbedClient = session.web.Widget.extend({
         template: 'EmptyComponent',
-        init: function(action_id) {
+        init: function(action_id, options) {
             this._super();
             this.action_id = action_id;
+            this.options = options || {};
             this.am = new session.web.ActionManager();
         },
 
@@ -39,7 +40,7 @@ openerp.web.embed = function(session) {
                     action_buttons : false,
                     sidebar : false
                     //pager : false
-                }, action.flags || {});
+                }, self.options, action.flags || {});
 
                 self.am.do_action(action);
             });