[IMP] Basic implementation of FormView.stop()

bzr revid: fme@openerp.com-20110711161546-b030c361iqvg3wyr
This commit is contained in:
Fabien Meghazi 2011-07-11 18:15:46 +02:00
parent 19a27dbd9a
commit b25d3dc26b
1 changed files with 8 additions and 0 deletions

View File

@ -51,6 +51,11 @@ openerp.base.FormView = openerp.base.View.extend( /** @lends openerp.base.FormV
toolbar:!!this.flags.sidebar, context: context}, this.on_loaded);
}
},
stop: function() {
_.each(this.widgets, function(w) {
w.stop();
});
},
on_loaded: function(data) {
var self = this;
this.fields_view = data.fields_view;
@ -532,6 +537,9 @@ openerp.base.form.Widget = openerp.base.Controller.extend({
start: function() {
this.$element = $('#' + this.element_id);
},
stop: function() {
this.$element.remove();
},
process_modifiers: function() {
var compute_domain = openerp.base.form.compute_domain;
for (var a in this.modifiers) {