summaryrefslogtreecommitdiff
path: root/addons/base/static/src/js/base.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2011-03-31 10:58:06 +0200
committerXavier Morel <xmo@openerp.com>2011-03-31 10:58:06 +0200
commit3fc0ef57bb72869df3dc2846b28a7973e749ebf4 (patch)
tree500715e4dc7ebb4b2e65fe7c0f79a8796a4a276f /addons/base/static/src/js/base.js
parent0add303a603cfc74e89d4cacd6fed66b882d49ed (diff)
[IMP] remove useless files in tests, make setup of sections explicit
bzr revid: xmo@openerp.com-20110331085806-j5yd1syvvos47yfj
Diffstat (limited to 'addons/base/static/src/js/base.js')
-rw-r--r--addons/base/static/src/js/base.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/addons/base/static/src/js/base.js b/addons/base/static/src/js/base.js
index b0a2237c2b2..4833551c24e 100644
--- a/addons/base/static/src/js/base.js
+++ b/addons/base/static/src/js/base.js
@@ -74,6 +74,7 @@
return;
var session_counter = 0;
+ /** @lends openerp */
var openerp = this.openerp = {
// element_ids registry linked to all controllers on the page
// TODO rename to elements, or keep gtk naming?
@@ -82,8 +83,12 @@
// openerp.<module> will map to
// openerp.sessions.sessionname.<module> using a closure
sessions: {},
- // openerp instance constructor
- init: function() {
+ /**
+ * OpenERP instance constructor
+ *
+ * @param {Boolean} skip_init if true, skips the built-in initialization
+ */
+ init: function(skip_init) {
var new_instance = {
// links to the global openerp
_openerp: openerp,
@@ -98,7 +103,8 @@
base: {}
};
openerp.sessions[new_instance._session_id] = new_instance;
- openerp.base(new_instance);
+ if (!skip_init)
+ openerp.base(new_instance);
return new_instance;
}
};