跳至内容
菜单
此问题已终结

I'm working with an OpenERP 7 codebase with many custom modules. Many of the custom modules have several dependencies for no apparent reasons. This causes many problems during module upgrades. I want to clean things up and I need to know what are the circumstances that requires adding a module as a dependency.

For example, if a module A as a many2one relation to module B, I need to add module B in module A's `depends`array, right?

However, if I simply call a module B function from module A (`self.pool.get('module.b').some_method(...)`), I don't need to add module B in module A's `depends`array. Am I right?

形象
丢弃

dependency is mainly used when you inherit something from the module or using ids defined in xml files of module.

编写者

I tested a few things and if module_b is not in module_a dependencies, doing module_b_obj = self.pool.get('module_b') inside module_a will result in module_b_obj being NoneType :|

相关帖文 回复 查看 活动
1
3月 15
6597
1
12月 22
3164
0
3月 15
3168
1
3月 15
4320
1
3月 15
5744