İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
6860 Görünümler

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 ?

Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
En İyi Yanıt

Hello priyank.s.paththa,

Please find code in comment.

I hope this will help you.

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

Avatar
Vazgeç

you can add bellow code in manifest file

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

En İyi Yanıt

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


Avatar
Vazgeç