Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

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?

Awatar
Odrzuć

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

Autor

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 :|

Powiązane posty Odpowiedzi Widoki Czynność
1
mar 15
6591
1
gru 22
3158
0
mar 15
3167
1
mar 15
4312
1
mar 15
5735