Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
111 Vizualizări

hi, i hope someone can help me figure out this

i cannot open odoo settings

everytime i click the settings button, the page will display:

UncaughtPromiseError > TypeError

Uncaught Promise > Cannot read properties of undefined (reading 'relation')

TypeError: Cannot read properties of undefined (reading 'relation')

    at https:{hostname}/web/assets/32932-d29cb8f/web.assets_backend.min.js:6814:84

    at traverse (https://{hostname}/web/assets/32932-d29cb8f/web.assets_backend.min.js:6807:200)

    at https://{hostname}/web/assets/32932-d29cb8f/web.assets_backend.min.js:6807:242

    at _.<anonymous> (https://{hostname}/web/assets/32908-88f8b87/web.assets_common.min.js:63:404)

    at traverse (https://{hostname}/web/assets/32932-d29cb8f/web.assets_backend.min.js:6807:211)

    at https://{hostname}/web/assets/32932-d29cb8f/web.assets_backend.min.js:6807:242

    at _.<anonymous> (https://{hostname}id/web/assets/32908-88f8b87/web.assets_common.min.js:63:404)

    at traverse (https://{hostname}/web/assets/32932-d29cb8f/web.assets_backend.min.js:6807:211)

    at https://{hostname}/web/assets/32932-d29cb8f/web.assets_backend.min.js:6807:242

    at _.<anonymous> (https://{hostname}/web/assets/32908-88f8b87/web.assets_common.min.js:63:404)

Imagine profil
Abandonează
Cel mai bun răspuns

The "Uncaught Promise" error in Odoo usually happens when a field in the model references a non-existent or missing related model. To fix it:

  1. Enable Developer Mode by adding ?debug=1 to your Odoo URL.
  2. Check the field definitions in the model to ensure all references are correct and related models exist.
  3. Update the module or reinstall missing modules if needed.

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

Here’s a checklist to help you debug and solve the issue:

Enable Developer Mode via URL

If the UI doesn’t load:

Go directly to developer mode using this URL:

https://<your-odoo-domain>/web?debug=1

Then go to:

https://<your-odoo-domain>/web#action=base.action_res_config_settings


If it crashes here again, continue below.

Check Your Custom Modules

Did you recently:

  • Add or change a field in res.config.settings?
  • Add a Many2one or One2many field but forgot to define comodel_name?
  • Override a view and include an undefined field?

If yes, do this:

Look in res.config.settings model for:

some_field = fields.Many2one('missing.model')  # if 'missing.model' doesn't exist, JS will crash


Or check XML for:


<field name="some_field"/>  <!-- but 'some_field' does not exist in model -->


Use CLI to Diagnose

From your server terminal:

./odoo-bin -c odoo.conf -u all --stop-after-init


Or update only the suspected custom module:

./odoo-bin -c odoo.conf -u your_custom_module --stop-after-init

This will show Python tracebacks during model loading, often revealing the missing field or relation.

Clear Cache

After fixing any Python/XML issues:

# Stop Odoo

sudo systemctl stop odoo


# Clear cache

find . -name '*.pyc' -delete

rm -rf ./odoo/addons/web/static/lib/.web.assets_cache

rm -rf ./odoo/.local/share/Odoo/filestore/*

rm -rf ./odoo/.local/share/Odoo/web/assets/*


# Restart Odoo

sudo systemctl start odoo


Also clear browser cache or open in Incognito to test.

in this some method is used in ubuntu 

i hope it is usefull




Imagine profil
Abandonează