From 7d26f9e4b9284d8deefb20aaa01df7add0e90c59 Mon Sep 17 00:00:00 2001 From: "Hubert Van de Walle (huvw)" Date: Fri, 5 May 2023 15:21:20 +0000 Subject: [PATCH] [FIX] web: allow to use the hour:minute on mobile for FloatTimeField Steps to reproduce ================== - Use an android phone - Go to Timesheets - Click on Add a line - Click on the Hours Spent input The keyboard is missing the colon `:` symbol It is then only possible the enter a time in the float format. Cause of the issue ================== The inputmode=decimal attribute prevents a user from entering a `:` symbol Note that this doesn't happen on IOS, since the inputmode is ignored for other reasons. opw-3278089 closes odoo/odoo#120824 X-original-commit: 8b919ae51d7deb34169b7c6970964056ef2eb632 Signed-off-by: Aaron Bohy (aab) Signed-off-by: Hubert Van De Walle --- .../views/fields/float_time/float_time_field.xml | 2 +- .../tests/views/fields/float_time_field_tests.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/views/fields/float_time/float_time_field.xml b/addons/web/static/src/views/fields/float_time/float_time_field.xml index a5cecd7816f..6db8ab2d0f2 100644 --- a/addons/web/static/src/views/fields/float_time/float_time_field.xml +++ b/addons/web/static/src/views/fields/float_time/float_time_field.xml @@ -3,7 +3,7 @@ - + diff --git a/addons/web/static/tests/views/fields/float_time_field_tests.js b/addons/web/static/tests/views/fields/float_time_field_tests.js index e9b9b59f313..544736dc327 100644 --- a/addons/web/static/tests/views/fields/float_time_field_tests.js +++ b/addons/web/static/tests/views/fields/float_time_field_tests.js @@ -176,4 +176,19 @@ QUnit.module("Fields", (hooks) => { "Placeholder" ); }); + + QUnit.test("float_time field does not have an inputmode attribute", async function (assert) { + await makeView({ + serverData, + type: "form", + resModel: "partner", + arch: ` +
+ + `, + }); + + const input = target.querySelector(".o_field_widget[name='qux'] input"); + assert.notOk(input.attributes.inputMode); + }); });