From 9c81dfc4911ded6da59a614cbc14a63e53a0cedf Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Tue, 21 Feb 2023 14:01:32 +0000 Subject: [PATCH] [FIX] website_sale: clean RTL mess with Comparison Price feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Odoo 16 has new feature *Comparison Price*. It allows to show striked price after the main price. E.g. `$555 -$666-`. It doesn't work well however on using RTL languages because of *Unicode Bidirectional Algorithm*. For example, in Egyptian localizations it shows some mess of striked and not striked characters: `LE -LE-666- 555`. The correct display should be `-LE-666- LE 555`. (Examples are even more complicated with symbol E£ that is currently used by default for EGP). As a solution, use `` element to isolate stiked value. Also we have to use attribute `dir="inherit"` to avoid changing direction for currencies that use LTR characters, otherwise the result would be `-666-LE- LE 555`. STEPS: - Go to settings > website: Activate *Comparison Price* - Go to Sales > Pricelist: add extra pricelists with EGP currency and mark it as **Selectable** - Go to Setting > Languages: activate the Arabic language and add it to the website. - Go to the product form: add **Compare to Price** - Go to the website > products, select pricelist EGP opw-3188129 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi closes odoo/odoo#120102 X-original-commit: 26b2c5caa8c339ca6b341de317ae289b0d201b01 Signed-off-by: Antoine Vandevenne (anv) Signed-off-by: Ivan Elizaryev (iel) --- addons/website_sale/views/templates.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index 9b49327b010..358e50b421a 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -1163,12 +1163,14 @@ /> + +

@@ -1179,12 +1181,14 @@ }'/> + +