diff options
| author | IEL <iel@odoo.com> | 2020-11-04 13:48:50 +0000 |
|---|---|---|
| committer | IEL <iel@odoo.com> | 2020-11-05 13:20:26 +0000 |
| commit | 5b022f433a44e627541d30ae21d7a867f4a3a6ff (patch) | |
| tree | bce1c96eba0df7a0dcab9cd83fafd858bd4fa724 /addons/web/static/src/scss | |
| parent | 651da2fe8694ed0003a9dd0801c71f2ef26cedb9 (diff) | |
[FIX] web: force ltr for phone numbers in reports
FYI: while letters are written right to left in languages like hebrew, arabic,
persian, the numbers (including phone numbers) are written left to right
STEPS:
* via Odoo Studio add Address block (select "doc > Customer" for field
expression)
* create a sale order for customer with rtl language
* set phone number for the customer with plus sign, e.g. +1 222 33 44 55
* print Quotation / Order
BEFORE: 222 33 44 55 1+ or similar mess
AFTER: +1 222 33 44 55
WHY:
* css is copy-pasted from ui.scss:
https://github.com/odoo/odoo/blob/6ba81c99d0c7f8e57ae573318f5e3d1ff53fa561/addons/web/static/src/scss/ui.scss#L91-L98
* Address block already has o_force_ltr class
https://github.com/odoo/odoo/blob/6ba81c99d0c7f8e57ae573318f5e3d1ff53fa561/odoo/addons/base/views/ir_qweb_widget_templates.xml#L35-L36
DEPLOYMENT: to fix phone in footer, you need to upgrade ``web`` module
---
opw-2368525
closes odoo/odoo#61410
X-original-commit: 6f0957466165a418762d10ddac658d642547a9cb
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/scss')
| -rw-r--r-- | addons/web/static/src/scss/report.scss | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/web/static/src/scss/report.scss b/addons/web/static/src/scss/report.scss index 0edc31005f4..8e29f0ceacb 100644 --- a/addons/web/static/src/scss/report.scss +++ b/addons/web/static/src/scss/report.scss @@ -12,6 +12,16 @@ body { word-wrap: break-word; font-family: $o-default-report-font; } + +span.o_force_ltr { + display: inline-block; +} +.o_force_ltr, .o_field_phone { + unicode-bidi: embed; // ensure element has level of embedding for direction + /*rtl:ignore*/ + direction: ltr; +} + .border-black td, .border-black th { border-top: 1px solid black !important; } |
