[FIX] base,web: fix address widgets in reports for RTL

Address widget has `o_force_ltr` class [1] since Odoo 14 [2]. Somehow, it didn't
work in Sale Order report and everything was RTL. But since Odoo 16 address part
actually became LTR. It mixes things up, because partner name and phone number
in the billing/delivery sections is still RTL [0].

This commit fix it by forcing whole address block to LTR. Alternative solution
could be removing `o_force_ltr` class, but this approach looks more risky and
should be done in master instead.

[0]: opw-3053457

[1]: https://github.com/odoo/odoo/blob/1666ee5515996fab8a843b36b4fd93b776172f75/odoo/addons/base/views/ir_qweb_widget_templates.xml#L26

[2]: https://github.com/odoo/odoo/commit/5b7c3805a045d8824dd1b4fa0de07d90b17392c1

closes odoo/odoo#106750

X-original-commit: a63f616c280ff464e331e3ba97265a8c29a86871
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
This commit is contained in:
Ivan Yelizariev
2022-11-29 10:31:22 +01:00
parent 80576925e9
commit 255e5c5804
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -287,7 +287,7 @@
<div class="address row">
<t t-if="information_block">
<t t-set="colclass" t-value="'col-5 offset-1'"/>
<div name="information_block" class="col-6">
<div name="information_block" class="col-6 o_force_ltr ">
<t t-out="information_block"/>
</div>
</t>
@@ -1,6 +1,6 @@
<odoo>
<template id="contact_name">
<div t-if="'name' in fields">
<div t-if="'name' in fields" class="o_force_ltr">
<t t-if="object.name">
<span itemprop="name" t-esc="name"/>
</t>