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

 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
4826
0
7月 20
4780
0
11月 23
1901
1
7月 23
2158
1
6月 23
6160