Files
odoo_source/addons/web
Loan (lse) 31bf052491 [FIX] web: JS traceback when trying to load unexisting field
To reproduce (V16):
 1. Force modify a view with an unexisting field
    For example `res.users.tree` with:
    `<field name="unexisting_field"/>`
    ( note that odoo won't allow to do so,
      you will have to do it in raw PSQL * )
 2. Open Settings > User & Companies > Users
=> JS traceback error:
```js
UncaughtPromiseError > TypeError
Uncaught Promise > Cannot read properties of undefined (reading 'string')

TypeError: Cannot read properties of undefined (reading 'string')
    at http://localhost:8069/web/assets/debug/web.assets_backend.js:67523:84 (/web/static/src/legacy/legacy_load_views.js:67)
    ...
```
* : In practice, it happens to Odoo customers after
incorrect installations/removal of apps

After this commit:
 The JS traceback is much clearer regarding the error:
 ```js
 UncaughtPromiseError
 Uncaught Promise > Missing field string information for the field 'unexisting_field' from the 'res.users' model
 ```

OPW-3071843

closes odoo/odoo#113345

X-original-commit: 33f82a60cd3bb64e67d939795b774cd332ab0508
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-22 11:42:05 +01:00
..
…