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

Hello, i am running odoo with the config file but my CSS and js file not loading. I try so many ways like installing the node package, clearing cache but nothing works for me.

Any one have any solution for this ?

Imagine profil
Abandonează
Cel mai bun răspuns

Did you try to load js and css file in the manifest or in xml?

Imagine profil
Abandonează
Cel mai bun răspuns

Hello priyank.s.paththa,

Please find code in comment.

I hope this will help you.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Imagine profil
Abandonează

you can add bellow code in manifest file

'assets': {
'web.assets_backend': [
'path/test.css',
],
},

Cel mai bun răspuns

Hello, there can be multiple reasons why your CSS and JS files are not loading in Odoo, some of the common causes include:

  1. Incorrect file path: Check if the file paths in your Odoo configuration file are correct and the files are located in the specified directory.

  2. CORS policy: Make sure your server is not blocking the CSS and JS files due to CORS (Cross-Origin Resource Sharing) policy restrictions.

  3. Asset management: Ensure that the assets are being correctly managed by Odoo, you may need to run the asset management command to recompile the assets.

  4. Browser cache: Clear your browser cache and try reloading the page to see if that fixes the issue.

  5. Module dependency: If your CSS and JS files are part of a module, make sure that the dependencies for that module are installed and enabled.

  6. Debug mode: Try running Odoo in debug mode to see if there are any error messages related to the missing CSS and JS files.

I hope I have helped


Imagine profil
Abandonează