[IMP]replace callbackenable from on_select_elements.
bzr revid: vme@tinyerp.com-20121011070439-vzcua4yoiwlz2evk
This commit is contained in:
parent
f44ea704fe
commit
43217cc2b4
|
@ -2877,7 +2877,7 @@ instance.web.form.CompletionFieldMixin = {
|
|||
self.build_domain(),
|
||||
new instance.web.CompoundContext(self.build_context(), context || {})
|
||||
);
|
||||
pop.on_select_elements.add(function(element_ids) {
|
||||
pop.on("select_elements",self,function(element_ids) {
|
||||
self.add_id(element_ids[0]);
|
||||
self.focus();
|
||||
});
|
||||
|
@ -3598,7 +3598,7 @@ instance.web.form.One2ManyViewManager = instance.web.ViewManager.extend({
|
|||
form_view_options: {'not_interactible_on_create':true},
|
||||
readonly: self.o2m.get("effective_readonly")
|
||||
});
|
||||
pop.on_select_elements.add_last(function() {
|
||||
pop.on("select_elements", self, function() {
|
||||
self.o2m.reload_current_view();
|
||||
});
|
||||
},
|
||||
|
@ -3684,7 +3684,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
|
|||
self.o2m.build_domain(),
|
||||
self.o2m.build_context()
|
||||
);
|
||||
pop.on_select_elements.add_last(function() {
|
||||
pop.on("select_elements", self, function() {
|
||||
self.o2m.reload_current_view();
|
||||
});
|
||||
}
|
||||
|
@ -4121,7 +4121,7 @@ instance.web.form.Many2ManyListView = instance.web.ListView.extend(/** @lends in
|
|||
this.m2m_field.build_context()
|
||||
);
|
||||
var self = this;
|
||||
pop.on_select_elements.add(function(element_ids) {
|
||||
pop.on("select_elements", self, function(element_ids) {
|
||||
_.each(element_ids, function(one_id) {
|
||||
if(! _.detect(self.dataset.ids, function(x) {return x == one_id;})) {
|
||||
self.dataset.set_ids([].concat(self.dataset.ids, [one_id]));
|
||||
|
@ -4236,7 +4236,7 @@ instance.web.form.FieldMany2ManyKanban = instance.web.form.AbstractField.extend(
|
|||
new instance.web.CompoundDomain(this.build_domain(), ["!", ["id", "in", this.dataset.ids]]),
|
||||
this.build_context()
|
||||
);
|
||||
pop.on_select_elements.add(function(element_ids) {
|
||||
pop.on("select_elements", self, function(element_ids) {
|
||||
_.each(element_ids, function(one_id) {
|
||||
if(! _.detect(self.dataset.ids, function(x) {return x == one_id;})) {
|
||||
self.dataset.set_ids([].concat(self.dataset.ids, [one_id]));
|
||||
|
@ -4457,6 +4457,7 @@ instance.web.form.AbstractFormPopup = instance.web.Widget.extend({
|
|||
});
|
||||
},
|
||||
on_select_elements: function(element_ids) {
|
||||
this.trigger("select_elements",element_ids);
|
||||
},
|
||||
check_exit: function(no_destroy) {
|
||||
if (this.created_elements.length > 0) {
|
||||
|
|
|
@ -273,7 +273,7 @@ instance.web.DiagramView = instance.web.View.extend({
|
|||
self.dataset.domain,
|
||||
self.context || self.dataset.context
|
||||
);
|
||||
pop.on_select_elements.add_last(function(element_ids) {
|
||||
pop.on("select_elements", self, function(element_ids) {
|
||||
self.dataset.read_index(_.keys(self.fields_view.fields)).pipe(self.on_diagram_loaded);
|
||||
});
|
||||
|
||||
|
@ -325,8 +325,7 @@ instance.web.DiagramView = instance.web.View.extend({
|
|||
this.dataset.domain,
|
||||
this.context || this.dataset.context
|
||||
);
|
||||
|
||||
pop.on_select_elements.add_last(function(element_ids) {
|
||||
pop.on("select_elements", self, function(element_ids) {
|
||||
self.dataset.read_index(_.keys(self.fields_view.fields)).pipe(self.on_diagram_loaded);
|
||||
});
|
||||
// We want to destroy the dummy edge after a creation cancel. This destroys it even if we save the changes.
|
||||
|
|
|
@ -222,7 +222,7 @@ instance.web_gantt.GanttView = instance.web.View.extend({
|
|||
on_task_create: function() {
|
||||
var self = this;
|
||||
var pop = new instance.web.form.SelectCreatePopup(this);
|
||||
pop.on_select_elements.add_last(function() {
|
||||
pop.on("select_elements", self, function() {
|
||||
self.reload();
|
||||
});
|
||||
pop.select_element(
|
||||
|
|
|
@ -1067,7 +1067,7 @@ instance.web_kanban.QuickCreate = instance.web.Widget.extend({
|
|||
[],
|
||||
{"default_name": self.$input.val()}
|
||||
);
|
||||
pop.on_select_elements.add(function(element_ids) {
|
||||
pop.on("select_elements", self, function(element_ids) {
|
||||
self.$input.val("");
|
||||
self.trigger('added', element_ids[0]);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue