From b53cf339e4e3728672ad2a8d505878274f4294c4 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Thu, 26 Mar 2020 10:30:55 +0000 Subject: [PATCH] [FIX] web,*: phone number ltr even in rtl language Currently there is two ways in view to have a phone number displayed in LTR in a RTL language: - have `widget="phone"` on a field - have a class o_force_ltr on the field But this is currently done very rarely and fail in list view because the direction of data cells is used, eg.: ```
/tr>
+1 2 3
+4 5 6
``` will be displayed as: +1 2 3 6 5 4+ In this commit, we use unicode-bidi* to optionally add an additional level of embedding so direction is taken into account by the bidirectional algorithm. This commit also adds o_force_ltr class or phone widget on phone fields where it is not already defined. *: https://drafts.csswg.org/css-writing-modes-3/#propdef-unicode-bidi opw-2224828 closes #48425 closes odoo/odoo#48588 X-original-commit: ab067218e069f0a92610c3f0d4137e563e47755c Signed-off-by: Nicolas Lempereur (nle) --- addons/crm/views/crm_lead_views.xml | 4 ++-- addons/crm/wizard/crm_merge_opportunities_views.xml | 2 +- addons/event/views/event_views.xml | 4 ++-- addons/event_sale/wizard/event_edit_registration.xml | 4 ++-- addons/hr/views/hr_employee_public_views.xml | 4 ++-- addons/hr/views/hr_employee_views.xml | 10 +++++----- addons/hr/views/res_users.xml | 4 ++-- addons/hr_recruitment/views/hr_recruitment_views.xml | 2 +- addons/lunch/views/lunch_supplier_views.xml | 4 ++-- .../mass_mailing_sms/views/mailing_contact_views.xml | 4 ++-- addons/web/static/src/scss/ui.scss | 1 + addons/website/views/website_visitor_views.xml | 2 +- addons/website_event_track/views/event_track_views.xml | 2 +- addons/website_sms/views/website_visitor_views.xml | 2 +- odoo/addons/base/views/res_bank_views.xml | 2 +- odoo/addons/base/views/res_company_views.xml | 6 +++--- odoo/addons/base/views/res_partner_views.xml | 2 +- 17 files changed, 30 insertions(+), 29 deletions(-) diff --git a/addons/crm/views/crm_lead_views.xml b/addons/crm/views/crm_lead_views.xml index 7664bbe958f..b7d86291efb 100644 --- a/addons/crm/views/crm_lead_views.xml +++ b/addons/crm/views/crm_lead_views.xml @@ -324,7 +324,7 @@ - + @@ -602,7 +602,7 @@ - + diff --git a/addons/crm/wizard/crm_merge_opportunities_views.xml b/addons/crm/wizard/crm_merge_opportunities_views.xml index 2eabe079cb9..175cf2583cc 100644 --- a/addons/crm/wizard/crm_merge_opportunities_views.xml +++ b/addons/crm/wizard/crm_merge_opportunities_views.xml @@ -18,7 +18,7 @@ - + diff --git a/addons/event/views/event_views.xml b/addons/event/views/event_views.xml index 7637cded0d5..bfb1815c8ff 100644 --- a/addons/event/views/event_views.xml +++ b/addons/event/views/event_views.xml @@ -553,8 +553,8 @@ - - + + diff --git a/addons/event_sale/wizard/event_edit_registration.xml b/addons/event_sale/wizard/event_edit_registration.xml index 4630417a1c0..d897db8cca5 100644 --- a/addons/event_sale/wizard/event_edit_registration.xml +++ b/addons/event_sale/wizard/event_edit_registration.xml @@ -15,8 +15,8 @@ - - + +