[IMP] Do not link to openerp.screen when unecessary

bzr revid: fme@openerp.com-20110531154338-d0ill7s23oqz79pq
This commit is contained in:
Fabien Meghazi 2011-05-31 17:43:38 +02:00
parent 358f6881f3
commit fe421b4108
1 changed files with 3 additions and 1 deletions

View File

@ -162,7 +162,9 @@ openerp.base.BasicController = Class.extend( /** @lends openerp.base.BasicContro
init: function(element_id) {
this.element_id = element_id;
this.$element = $('#' + element_id);
openerp.screen[element_id] = this;
if (element_id) {
openerp.screen[element_id] = this;
}
// Transform on_* method into openerp.base.callbacks
for (var name in this) {