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

 Hi,
Can anyone explain how we can  add a module dependency by code. Foe example i have a module 'test_module', now it have only one dependency 'base_setup'. After install this module i need to add a depend module 'sale_management' to my module (in some action). Also it should follow the basic dependency feature, ie when i uninstall the 'sale_management' my 'test_module' also need to get uninstalled.

Thanks

아바타
취소
베스트 답변

You should add in the __manifest__.py file

depends:['base_setup','sale_management'],

Thanks

아바타
취소
작성자

Please read the question carefully i need to add the dependency by code, not from manifest, after the installation of module.

베스트 답변

you should add module dependency in the manifest file (__menifest__.py).

depends: ['base_setup', 'sale_management']

ref: https://www.odoo.com/documentation/13.0/reference/module.html

Note: for an older version of odoo, it was __openerp__.py

아바타
취소
작성자

Please read the question carefully i need to add the dependency by code, not from manifest, after the installation of module.

관련 게시물 답글 화면 활동
1
9월 20
4822
0
7월 20
4776
0
11월 23
1898
1
7월 23
2157
1
6월 23
6154