summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2019-09-13 09:28:31 +0000
committerJulien Mougenot <jum@odoo.com>2019-09-18 08:24:13 +0000
commitbb85f963b556ff033f74d785ed42747bed0bcc80 (patch)
tree816190cf5754c5bd015bfe16204b70df74cd618f /addons/web/static/src
parent3b4cc84c1c9233303281699a15de16e97897bddf (diff)
[FIX] web: list: multi edit boolean with ENTER
This rev. solves the similar issue as 801c603218, but with boolean fields. Scenario: select several records, select a boolean cell, press enter to change the boolean value. Task 2068280
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/fields/basic_fields.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js
index abdd3e57c37..9eddfbf320e 100644
--- a/addons/web/static/src/js/fields/basic_fields.js
+++ b/addons/web/static/src/js/fields/basic_fields.js
@@ -884,6 +884,8 @@ var FieldBoolean = AbstractField.extend({
_onKeydown: function (ev) {
switch (ev.which) {
case $.ui.keyCode.ENTER:
+ // prevent subsequent 'click' event (see _onKeydown of AbstractField)
+ ev.preventDefault();
this.$input.prop('checked', !this.value);
this._setValue(!this.value);
return;