Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
11203 Lượt xem

I got an issue where Odoo doesn't find / generate the css & js files properly.
All works fine when I use debug=assets but in the "normal" mode the website & odoo backend is just totally messed up.

Things I've tried without success:
- Update all / base
- Delete all .css and .js  files from ir_attachments
- Clear cache

Is there any way that I can tell odoo to regenerate the website_backend.js, web.assets_backend.0.css or even all css/js in non-debug mode?
Or does someone have another tip how this could be fixed?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

I also Face this issue....


Really appreciate any help

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

In normal case, we are using the following code to load the js and css.

                        


<template id="assets_backend_dashboard" name="Hr Dashboard assets inherit" inherit_id="web.assets_backend">
<xpath =".">
<link rel="stylesheet" href="/hrms_dashboard/static/src/css/hrms_dashboard.css"/>
</xpath>
</template>

Now remove this line
<link rel="stylesheet" href="/hrms_dashboard/static/src/css/hrms_dashboard.css"/>
 and paste it in the template in which your are using.
 By doing this i got my css loaded even in the normal mode. Not in debugging mode with Assets.


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 4 19
3142
4
thg 4 18
5178
0
thg 1 16
3753
3
thg 11 21
5945
2
thg 5 21
3007