diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js
index ed393d667b7..00a4532c2e1 100644
--- a/addons/web/static/src/js/fields/basic_fields.js
+++ b/addons/web/static/src/js/fields/basic_fields.js
@@ -1079,7 +1079,9 @@ var FieldText = InputField.extend(TranslatableFieldMixin, {
reset: function () {
var self = this;
return $.when(this._super.apply(this, arguments)).then(function () {
- self.$input.trigger('change');
+ if (self.mode === 'edit') {
+ self.$input.trigger('change');
+ }
});
},
//--------------------------------------------------------------------------
diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js
index 15499234c49..e5a0ad43a70 100644
--- a/addons/web/static/tests/fields/relational_fields_tests.js
+++ b/addons/web/static/tests/fields/relational_fields_tests.js
@@ -9491,7 +9491,7 @@ QUnit.module('relational_fields', {
form.destroy();
});
- QUnit.test('one2many with sequence field, fetch name_get from empty list', function (assert) {
+ QUnit.test('one2many with sequence field, fetch name_get from empty list, field text', function (assert) {
// There was a bug where a RPC would fail because no route was set.
// The scenario is:
// - create a new parent model, which has a one2many
@@ -9501,6 +9501,11 @@ QUnit.module('relational_fields', {
// - reorder the lines with the handle
// -> This will call a resequence, which calls a name_get.
// -> With the bug that would fail, if it's ok the test will pass.
+
+ // This test will also make sure lists with
+ // FieldText (turtle_description) can be reordered with a handle.
+ // More specifically this will trigger a reset on a FieldText
+ // while the field is not in editable mode.
assert.expect(4);
this.data.turtle.fields.turtle_int.default = 10;
@@ -9521,6 +9526,7 @@ QUnit.module('relational_fields', {
'' +
'' +
'' +
+ '' +
'' +
'' +
'',