تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
6640 أدوات العرض

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:

  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


الصورة الرمزية
إهمال