[IMP]replace callenabled for on_controller_inited

bzr revid: vja@tinyerp.com-20121011104341-7r4fr4l687bn9qqe
This commit is contained in:
Vishmita 2012-10-11 16:13:41 +05:30
parent 70afbd796e
commit b13ee21296
2 changed files with 3 additions and 2 deletions

View File

@ -3372,7 +3372,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
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")) {

View File

@ -409,6 +409,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
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
@ -532,7 +533,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
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) {