var def = $.Deferred().then(function() {
self.initial_is_loaded.resolve();
});
- this.viewmanager.on_controller_inited.add_last(function(view_type, controller) {
+ this.viewmanager.on("controller_inited", self, function(view_type, controller) {
controller.o2m = self;
if (view_type == "list") {
if (self.get("effective_readonly")) {
this.flags = flags || {};
this.registry = instance.web.views;
this.views_history = [];
+ this.on("controller_inited",this.on_controller_inited);
},
/**
* @returns {jQuery.Deferred} initial view loading promise
this.views[view_type].controller = controller;
this.views[view_type].deferred.resolve(view_type);
return $.when(view_promise).then(function() {
- self.on_controller_inited(view_type, controller);
+ self.trigger("controller_inited",view_type, controller);
if (self.searchview
&& self.flags.auto_search
&& view.controller.searchable !== false) {