diff options
| author | Christophe Simonis <chs@openerp.com> | 2012-07-18 15:10:04 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2012-07-18 15:10:04 +0200 |
| commit | 5a918cf01de012e45ac580b3fb55d010001129b7 (patch) | |
| tree | 72b1ef9fb042969bf7cd253898be6d82cf6b95ec /addons/web/static/src/js/boot.js | |
| parent | c7491d99d873eb6159091cea7e0cbd65d03e6882 (diff) | |
[IMP] session_bind is done by openerp.init(). As result, Clients can have template like any other widget as qweb template are loaded. This make the code cleaner as show_common() does not return a deferred anymore.
bzr revid: chs@openerp.com-20120718131004-gvn63r3ihzxyzvy3
Diffstat (limited to 'addons/web/static/src/js/boot.js')
| -rw-r--r-- | addons/web/static/src/js/boot.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/web/static/src/js/boot.js b/addons/web/static/src/js/boot.js index 86f8077b151..9f426ee787c 100644 --- a/addons/web/static/src/js/boot.js +++ b/addons/web/static/src/js/boot.js @@ -21,10 +21,10 @@ * * @param {Array} modules list of modules to initialize */ - init: function(modules) { + init: function(modules, origin) { // By default only web will be loaded, the rest will be by loaded // by openerp.web.Session on the first session_authenticate - modules = modules || ["web"]; + modules = _.union(['web'], modules || []); var new_instance = { // links to the global openerp _openerp: openerp, @@ -39,6 +39,9 @@ for(var i=0; i < modules.length; i++) { openerp[modules[i]](new_instance,new_instance[modules[i]]); } + new_instance.connection.synchronized_mode(function() { + new_instance.connection.session_bind(origin); + }); return new_instance; } }; |
