[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:
@@ -949,7 +949,7 @@ var X2ManyViewManager = ViewManager.extend({
|
||||
return self.x2m.data_create(data, options);
|
||||
},
|
||||
write_function: function(id, data, options) {
|
||||
return self.x2m.data_update(id, data, {}).done(function() {
|
||||
return self.x2m.data_update(id, data, options).done(function() {
|
||||
self.x2m.reload_current_view();
|
||||
});
|
||||
},
|
||||
@@ -1113,8 +1113,8 @@ var One2ManyListView = X2ManyListView.extend({
|
||||
res_id: id,
|
||||
context: self.x2m.build_context(),
|
||||
title: _t("Open: ") + self.x2m.string,
|
||||
write_function: function(id, data) {
|
||||
return self.x2m.data_update(id, data, {}).done(function() {
|
||||
write_function: function(id, data, options) {
|
||||
return self.x2m.data_update(id, data, options).done(function() {
|
||||
self.x2m.reload_current_view();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -224,7 +224,7 @@ Tour.register({
|
||||
// change message a
|
||||
|
||||
{
|
||||
title: "create new message aaa",
|
||||
title: "edit message a",
|
||||
waitNot: '.modal',
|
||||
waitFor: '.oe_list_field_cell:containsExact(e)',
|
||||
element: '.oe_list_field_cell:containsExact(a)'
|
||||
@@ -240,6 +240,44 @@ Tour.register({
|
||||
element: '.o_formdialog_save'
|
||||
},
|
||||
|
||||
// change message e
|
||||
|
||||
{
|
||||
title: "edit message e",
|
||||
waitNot: '.modal',
|
||||
waitFor: '.oe_list_field_text:contains(aaa)',
|
||||
element: '.oe_list_field_cell:containsExact(e)'
|
||||
},
|
||||
|
||||
{
|
||||
title: "open the many2one to select an other user",
|
||||
element: '.modal .oe_m2o_drop_down_button',
|
||||
},
|
||||
{
|
||||
title: "select an other user",
|
||||
element: '.ui-autocomplete li:contains(Demo User)',
|
||||
},
|
||||
{
|
||||
title: "test one2many's line onchange after many2one",
|
||||
waitFor: '.oe_form_char_content:contains([test_trigger] Demo User)',
|
||||
},
|
||||
{
|
||||
title: "test one2many field not triggered onchange",
|
||||
waitFor: 'textarea[name="message_concat"]:propValueContains([test_trigger] Administrator:e)',
|
||||
},
|
||||
{
|
||||
title: "save changes",
|
||||
element: '.o_formdialog_save'
|
||||
},
|
||||
{
|
||||
title: "test one2many triggered the onchange on save for the line",
|
||||
waitFor: '.oe_list_content td.oe_list_field_cell.oe_readonly:contains([test_trigger] Demo User)',
|
||||
},
|
||||
{
|
||||
title: "test one2many triggered the onchange on save",
|
||||
waitFor: 'textarea[name="message_concat"]:propValueContains([test_trigger] Demo User:e)',
|
||||
},
|
||||
|
||||
// remove
|
||||
|
||||
{
|
||||
|
||||
@@ -62,8 +62,8 @@ var Many2ManyKanbanView = X2ManyKanbanView.extend({
|
||||
res_id: event.data.id,
|
||||
context: this.x2m.build_context(),
|
||||
title: _t("Open: ") + this.x2m.string,
|
||||
write_function: function(id, data) {
|
||||
return self.x2m.data_update(id, data, {}).done(function() {
|
||||
write_function: function(id, data, options) {
|
||||
return self.x2m.data_update(id, data, options).done(function() {
|
||||
self.x2m.reload_current_view();
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user