I applied CSS and js in odoo14 below it is completely worked:
template id="assets_frontend" inherit_id="website.assets_frontend" name="Custom Assets">
xpath expr="//link[last()]" position="inside">
link rel="stylesheet" type="text/css" href="/custom_module/static/src/css/style.css" />
/xpath>
xpath expr="//script[last()]" position="after">
script type="text/javascript" src="/custom_module/static/src/js/test.js" />
/xpath>
/template>
when I applied in odoo16 in the manifest below but it is not worked:
'assets': {
'web.assets_frontend': [
'custom_module/static/src/css/style.css',
'custom_module/static/src/js/test.js',
],
},
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
3115
أدوات العرض
issue is solved when I put the code this way:
<record id="custom_moule.custom_style_css" model="ir.asset">
<field name="key">custom_moule.custom_style_css</field>
<field name="name">Custom effect CSS</field>
<field name="bundle">web.assets_frontend</field>
<field name="path">custom_moule/static/src/css/style.css</field>
<field name="active" eval="True"/>
</record>
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
2
مارس 24
|
2811 | ||
|
4
يونيو 23
|
3883 | ||
|
2
يناير 25
|
2154 | ||
|
2
أبريل 24
|
4755 | ||
|
2
فبراير 24
|
1638 |
I converted your comment into an answer