[fix] lot of bugs with contollers due to merge

bzr revid: nicolas.vanhoren@openerp.com-20110722162701-me9jag18dp5m05wz
This commit is contained in:
niv-openerp
2011-07-22 18:27:01 +02:00
parent fb18826093
commit 7d0a18e84c
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -234,6 +234,7 @@ openerp.base.BaseWidget = openerp.base.Controller.extend({
if(this.$element != null) {
this.$element.remove();
}
this._super();
}
});
+2
View File
@@ -202,8 +202,10 @@ instance.base.Controller = instance.base.Class.extend( /** @lends instance.base.
stop: function() {
if (this.parent && this.parent.children) {
this.parent.children = _.without(this.parent.children, this);
this.parent.controller_children = this.parent.children;
}
this.parent = null;
this.controller_parent = null;
},
log: function() {
var args = Array.prototype.slice.call(arguments);
+3 -1
View File
@@ -863,7 +863,9 @@ openerp.base.search.ExtendedSearch = openerp.base.BaseWidget.extend({
},
check_last_element: function() {
_.each(this.children, function(x) {x.set_last_group(false);});
this.children[this.children.length - 1].set_last_group(true);
if (this.children.length >= 1) {
this.children[this.children.length - 1].set_last_group(true);
}
}
});