Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
7996 Tampilan

I'm building a custom module where I'll only be using account.invoices data. So when creating the module, on the manifest I would set its dependencies like 

'depends': ['account']

or should I use 

'depends': ['base','account']

Which one would be the best practice?
What would be the difference?

I'm working on Odoo11

Thanks in advance.

Avatar
Buang
Jawaban Terbai

Hi Jean,

I think  you just need to use the first one, i.e,

'depends': ['account']


According to Odoo documentation, the field 'depends' in the manifest file is used to load all the modules required for the working of the current one. So before installing your module, all of its dependencies will be installed. 


In your case, since you need to use account invoices data, you just need to use  "'depends': ['account']".
So this will be the procedure, when you try to install your module, Odoo will first try to install all the dependencies for your module. In this case, it is 'account' module. Now, this process will be repeated for the 'account" module now. That is, Odoo will try to install 'account' module and its dependencies. 


Your module will be installed once all the dependent modules are installed. Hopefully, 'base' module will be there in the dependencies list. So what I'm saying is, in your case, it is not needed for you to load 'base' directly using the second method, i.e,

'depends': ['base','account'].
It will be something like repeating the same process multiple times.

Thanks

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Mei 20
2862
3
Des 19
5109
6
Des 23
19764
1
Mar 15
4328
5
Mei 19
3331