콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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
3127
1
4월 24
2072
0
1월 24
1661
1
9월 23
3080
2
4월 23
5228