İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3136 Görünümler

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',
],
},


Avatar
Vazgeç

I converted your comment into an answer

Üretici En İyi Yanıt

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>

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Mar 24
2828
4
Haz 23
3903
2
Oca 25
2160
2
Nis 24
4759
2
Şub 24
1645