Skip to content
Snippets Groups Projects
Commit 574d7847 authored by Nasreddin Boulif (bon)'s avatar Nasreddin Boulif (bon)
Browse files

[FIX] website: allow to translate appointment page on website


Steps to reproduce:

  - Install `website_appointment` module
  - Activate a second language on main website
  - Activate debug mode
  - Go to Website -> Configuration -> Online Appointments
  - Share multiple appointment and copy the link
  - Open the link in a new tab
  - Switch to second language
  - Open editor and click on `Translate` button

Issue:

  Traceback is raised.

Cause:

  When sharing multiple appointment and opening the shared link, we are
  redirected on the page to select the right appointment and we have the
  key `filter_appointment_type_ids` (with the IDs of the appointments)
  with the value already encoded.
  e.g: `[1, 3]` => `%5B1%2C+3%5D`.

  When translating a page by redirecting to the same URL (but encoded)
  with param `edit_translations` set to 1, the URL is re-encoded and
  therefore the value of the key `filter_appointment_type_ids` is double
  'encoded' and broken/not possible to parse.
  e.g: `%5B1%2C+3%5D` => `%255B1%252C%2B3%255D`.

Solution:

  Don't re-encode the updated URL; `goToWebsite` is expecting a non
  encoded path and is in charge of the re-encoding it.

opw-3409757

closes odoo/odoo#130175

Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
parent 8bf4d70d
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