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 ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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 ?
Did you try to load js and css file in the manifest or in xml?
Hello priyank.s.paththa,
Please find code in comment.
I hope this will help you.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
you can add bellow code in manifest file
'assets': {
'web.assets_backend': [
'path/test.css',
],
},
Hello, there can be multiple reasons why your CSS and JS files are not loading in Odoo, some of the common causes include:
Incorrect file path: Check if the file paths in your Odoo configuration file are correct and the files are located in the specified directory.
CORS policy: Make sure your server is not blocking the CSS and JS files due to CORS (Cross-Origin Resource Sharing) policy restrictions.
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.
Browser cache: Clear your browser cache and try reloading the page to see if that fixes the issue.
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.
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
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up