[FIX] web: disale autofill on input elements

with this commit we disables autofill of autocomplete by setting
autocomplete=off, this was previously done in commit: 64293fbdb0
but it was not working because we were setting autocomplete=none
it seems that none does not work all the time.

task-2462676

closes odoo/odoo#71016

X-original-commit: 9d6ef842902e9e192924fa0caba99514e1543352
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Mohammed Shekha
2021-05-19 08:31:15 +00:00
parent db12ed7cb1
commit d9f2eafdf2
2 changed files with 2 additions and 2 deletions
@@ -285,7 +285,7 @@ var InputField = DebouncedField.extend({
inputAttrs = _.extend(inputAttrs, { type: 'password', autocomplete: this.attrs.autocomplete || 'new-password' });
inputVal = this.value || '';
} else {
inputAttrs = _.extend(inputAttrs, { type: 'text', autocomplete: this.attrs.autocomplete || 'none'});
inputAttrs = _.extend(inputAttrs, { type: 'text', autocomplete: this.attrs.autocomplete || 'off'});
inputVal = this._formatValue(this.value);
}
+1 -1
View File
@@ -7398,7 +7398,7 @@ QUnit.module('Views', {
});
await testUtils.form.clickEdit(form);
assert.hasAttrValue(form.$('input[name="display_name"]'), 'autocomplete', 'none',
assert.hasAttrValue(form.$('input[name="display_name"]'), 'autocomplete', 'off',
"attribute autocomplete should be set to none by default");
form.destroy();
});