Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
8820 มุมมอง

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 15
6594
1
ธ.ค. 22
3163
0
มี.ค. 15
3168
1
มี.ค. 15
4320
1
มี.ค. 15
5744