Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4943 Переглядів

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

Related Posts Відповіді Переглядів Дія
1
серп. 25
3125
1
квіт. 24
2070
0
січ. 24
1661
1
вер. 23
3079
2
квіт. 23
5228