Skip to content
Snippets Groups Projects
Commit 39967c6b authored by Hubert Van de Walle (huvw)'s avatar Hubert Van de Walle (huvw)
Browse files

[FIX] web: rtl assets in ltr language in debug mode


Steps to reproduce:

  - Switch to `?debug=assets`
  - Change the user language to Arabic and back to English
  -> The page is still displayed in rtl mode

Cause of the issue:

  The css is retrieved like this

  ```py
  >>> self.env['ir.attachment'].sudo().search([('url', '=like', '/web/assets/%/web.assets_common.css')])
  ir.attachment(212, 189)

  >>> self.env['ir.attachment'].sudo().search([('url', '=like', '/web/assets/%/web.assets_common.css')]).mapped('url')
  ['/web/assets/212-5d47380/rtl/web.assets_common.css', '/web/assets/189-5d47380/web.assets_common.css']
  ```
  Only the second one should be matched.

Solution:

  Check for the absence of an extra parameter in the url

opw-2892012

closes odoo/odoo#100882

Signed-off-by: default avatarJulien Castiaux <juc@odoo.com>
parent 66fddcf6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment