[FIX] web: Allow user to display demo data in Vietnamese
Install the CRM app and the Vietnamese locale
Go to the CRM App > Reporting > Activities
Switch to Vietnamese (User icon > Preferences > Language)
The following error will appear :
```
UncaughtPromiseError > TypeError
Uncaught Promise > Cannot read properties of undefined (reading 'length')
TypeError: Cannot read properties of undefined (reading 'length')
at parseDigits (http://localhost:8069/web/assets/debug/web.assets_backend.js:32038:31) (/web/static/lib/luxon/luxon.js:5117)
at Object.deser (http://localhost:8069/web/assets/debug/web.assets_backend.js:32084:21) (/web/static/lib/luxon/luxon.js:5163)
at match (http://localhost:8069/web/assets/debug/web.assets_backend.js:32423:37) (/web/static/lib/luxon/luxon.js:5502)
at explainFromTokens (http://localhost:8069/web/assets/debug/web.assets_backend.js:32591:20) (/web/static/lib/luxon/luxon.js:5670)
at parseFromTokens (http://localhost:8069/web/assets/debug/web.assets_backend.js:32614:30) (/web/static/lib/luxon/luxon.js:5693)
at Function.fromFormat (http://localhost:8069/web/assets/debug/web.assets_backend.js:33592:30) (/web/static/lib/luxon/luxon.js:6671)
at parseDateTime (http://localhost:8069/web/assets/debug/web.assets_backend.js:5814:32) (/web/static/src/core/l10n/dates.js:282)
at parseDate (http://localhost:8069/web/assets/debug/web.assets_backend.js:5743:12) (/web/static/src/core/l10n/dates.js:211)
at http://localhost:8069/web/assets/debug/web.assets_backend.js:20162:28 (/web/static/src/views/helpers/sample_server.js:460)
at http://localhost:8069/web/assets/debug/web.assets_backend.js:10968:19 (/web/static/src/core/utils/arrays.js:96)
```
This is a issue with luxon
Issue: https://github.com/moment/luxon/issues/1169
Luxon update (2.4.0): https://github.com/moment/luxon/releases/tag/2.4.0
Fix: https://github.com/moment/luxon/pull/1194
PR to update luxon to 2.4.0 in master: https://github.com/odoo/odoo/pull/92036
closes odoo/odoo#92109
X-original-commit: 354433e7ba5b5f81f83368e497a8bed5059c91d5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
This commit is contained in:
@@ -5105,7 +5105,7 @@ var luxon = (function (exports) {
|
||||
}
|
||||
|
||||
var NBSP = String.fromCharCode(160);
|
||||
var spaceOrNBSP = "( |" + NBSP + ")";
|
||||
var spaceOrNBSP = "[ " + NBSP + "]";
|
||||
var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g");
|
||||
|
||||
function fixListRegex(s) {
|
||||
|
||||
Reference in New Issue
Block a user