コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4985 ビュー

Some one can told me which is the correct way to add js library to a odoo v16 website via custom addon ? 


アバター
破棄
最善の回答

Hi,

Put the JavaScript file under module_name -> static -> src-> js folder.

You can create the directory if you haven’t.

And in manifest,

'assets': {
'web.assets_frontend': [
'module_name/static/src/js/file_name.js’]
}

Regards

アバター
破棄

Hi Cybrosys,
As you said, I added JavaScript and CSS custom module files to the manifest file, but none of them are added, and they don't work!
How should I fix it? Or should I check if they are added correctly or not?
'assets': {
'web.assets_frontend': [
'energy_website/static/src/scss/b_theme.scss',
'energy_website/static/src/scss/b_style.scss',
'energy_website/static/src/js/b_script.js',
'energy_website/static/src/js/b_myscript.js'
]
}

関連投稿 返信 ビュー 活動
1
8月 25
3151
1
4月 24
2111
0
1月 24
1684
1
9月 23
3108
2
4月 23
5281