diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-08-02 13:26:32 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2019-08-05 08:18:34 +0000 |
| commit | 91399aed95f21fa3148c19db1f48a94897feb95e (patch) | |
| tree | 5f958181a83352f6ce25de1958d49ec762daa425 /addons/web | |
| parent | 6236ed1a5b138c5165929aa3f5c1d1f4f6aa061c (diff) | |
[FIX] web: RTL on list view
- Set the user language to a RTL language, e.g. Arabic
- Open a list view containing float or monetary fields, e.g. the invoice
list view
The numbers are left aligned while the corresponding columns headers are
right aligned, making the list view confusing.
The header alignment is hardcoded at rendering rather than in the SCSS.
Therefore, `rtlcss` doesn't affect it.
Instead of hardcoding the alignment, we use a proper CSS class so it is
adapted by `rtlcss`.
opw-2044019
closes odoo/odoo#35414
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web')
| -rw-r--r-- | addons/web/static/src/js/views/list/list_renderer.js | 2 | ||||
| -rw-r--r-- | addons/web/static/src/scss/list_view.scss | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/list/list_renderer.js b/addons/web/static/src/js/views/list/list_renderer.js index b343f044bc2..ed224598f76 100644 --- a/addons/web/static/src/js/views/list/list_renderer.js +++ b/addons/web/static/src/js/views/list/list_renderer.js @@ -560,7 +560,7 @@ var ListRenderer = BasicRenderer.extend({ } if (field.type === 'float' || field.type === 'integer' || field.type === 'monetary') { - $th.css({ textAlign: 'right' }); + $th.addClass('o_list_number_th'); } if (config.debug) { diff --git a/addons/web/static/src/scss/list_view.scss b/addons/web/static/src/scss/list_view.scss index 2933850b9f4..5b0f4cd9200 100644 --- a/addons/web/static/src/scss/list_view.scss +++ b/addons/web/static/src/scss/list_view.scss @@ -31,6 +31,9 @@ &:not(.o_column_sortable):hover { cursor: default; } + &.o_list_number_th { + text-align: right; + } } } |
