Files
odoo_source/addons/web/controllers
Xavier ALT 6633a1102f [FIX] web, survey: fix js 'translation error' for databases upgraded to 17.0
When a user connects to its database that has been freshly upgraded
to 17.0 database, he gets the following JS crash:

```
TypeError: can't access property "defineLocale", moment is undefined
    @http://www.odoo.test/web/webclient/locale/fr_FR:13:10
    @http://www.odoo.test/web/webclient/locale/fr_FR:9:4
    @http://www.odoo.test/web/webclient/locale/fr_FR:10:2
```

Before 17.0, the `/web/webclient/locale/<string:lang>` route was used
to get the appropriate `momentjs` locale and was cached for a duration
of 1 week.

So when connecting to the upgraded database we will get the cached
file, but as `momentjs` has been removed (see odoo/odoo@4327c062d8)
it will crash.

Now as `luxon` is using browser's `Intl` to get the translations, we
can safely remove the call to that endpoint (it will always return an
empty file anyway)

closes odoo/odoo#145733

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2024-01-09 23:04:41 +00:00
..
…
…
…
…
…
…
…
…
…
…
…