[FIX] web: readonly fields not transferred from dialog to 2many field
Transfer options to 'data_create' and 'data_update' Add tour to check the fix
This commit is contained in:
@@ -4364,7 +4364,7 @@ instance.web.form.One2ManyViewManager = instance.web.ViewManager.extend({
|
||||
});
|
||||
},
|
||||
write_function: function(id, data, options) {
|
||||
return self.o2m.dataset.write(id, data, {}).done(function() {
|
||||
return self.o2m.dataset.write(id, data, options).done(function() {
|
||||
self.o2m.reload_current_view();
|
||||
});
|
||||
},
|
||||
@@ -4488,8 +4488,8 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
|
||||
var pop = new instance.web.form.FormOpenPopup(self);
|
||||
pop.show_element(self.o2m.field.relation, id, self.o2m.build_context(), {
|
||||
title: _t("Open: ") + self.o2m.string,
|
||||
write_function: function(id, data) {
|
||||
return self.o2m.dataset.write(id, data, {}).done(function() {
|
||||
write_function: function(id, data, options) {
|
||||
return self.o2m.dataset.write(id, data, options).done(function() {
|
||||
self.o2m.reload_current_view();
|
||||
});
|
||||
},
|
||||
@@ -5104,7 +5104,7 @@ instance.web.form.FieldMany2ManyKanban = instance.web.form.AbstractField.extend(
|
||||
pop.show_element(self.field.relation, id, self.build_context(), {
|
||||
title: _t("Open: ") + self.string,
|
||||
write_function: function(id, data, options) {
|
||||
return self.dataset.write(id, data, {}).done(function() {
|
||||
return self.dataset.write(id, data, options).done(function() {
|
||||
self.render_value();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -1361,7 +1361,7 @@ openerp.web_calendar = function(instance) {
|
||||
pop.show_element(this.field.relation, id, this.build_context(), {
|
||||
title: _t("Open: ") + this.string,
|
||||
write_function: function(id, data, _options) {
|
||||
return self.dataset.write(id, data, {}).done(function() {
|
||||
return self.dataset.write(id, data, _options).done(function() {
|
||||
// Note that dataset will trigger itself the
|
||||
// ``dataset_changed`` signal
|
||||
self.calendar_view.refresh_event(id);
|
||||
|
||||
Reference in New Issue
Block a user