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

how can i use css and js in template called by controller odoo 15

i try using

inherit_id

website.assets_common but it seem doesnt work and i got error External Id not found .

I already add depends web

아바타
취소
베스트 답변

From v15 onwards, adding the assets have been changed and has been moved into the manifest.

Before v15, we were used to inheriting the asset in the XML and adding our custom assets.

But from v15, the asset definition has been moved into the __manfiest__.py of the module as shown below:

'assets': {
    'web.assets_backend': [
        'web/static/src/xml/**/*',
    ],
    'web.assets_common': [
        'web/static/lib/bootstrap/**/*',
        'web/static/src/js/boot.js',
        'web/static/src/js/webclient.js',
    ],
    'web.qunit_suite_tests': [
        'web/static/src/js/webclient_tests.js',
    ],
},

Check assets documentation for more information.


아바타
취소
베스트 답변

hi

for css & js use inherit_id="web.assets_backend"

in website 'user interface' you can use inherit_id='web.assets_frontend'

아바타
취소
관련 게시물 답글 화면 활동
2
5월 20
7005
0
3월 17
3466
3
12월 24
21440
0
8월 20
4247
1
12월 19
5677