From d30663503d67e3d23cfdc0574ad81f693df2487f Mon Sep 17 00:00:00 2001 From: Lavish Chhatwani Date: Tue, 12 Jan 2021 11:49:59 +0000 Subject: [PATCH] [IMP] sms: autofocus on "body" for valid phone number in single mode Before Commit: When users wants to send an SMS to someone with help of the phone widget, the composer is opened, and users expect to be able to write the message right away. The issue is that the default focus is on the phone number, so if users start writing, it will corrupt the phone nubmber, and they have to discard the changes and have to click the body to finally start typing SMS content. After Commit: When the composer is opened, if the phone number is valid, 'body' field is focused automatically so that users can start typing right away. If number is not valid, the focus will still be on the phone number. This is managed by providing 'default_focus' attibute on the body field, which appears or is hidden as needed. For the mass mode also, we simply focus on the body field to enable user to start writing content right away. closes odoo/odoo#65443 Task-id: 2394488 Signed-off-by: Thibault Delavallee (tde) --- addons/sms/wizard/sms_composer_views.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/sms/wizard/sms_composer_views.xml b/addons/sms/wizard/sms_composer_views.xml index 3ef5820bb8a..90f293317d3 100644 --- a/addons/sms/wizard/sms_composer_views.xml +++ b/addons/sms/wizard/sms_composer_views.xml @@ -48,7 +48,8 @@ - + +