Skip to Content
Menú
This question has been flagged
1 Respondre
8028 Vistes

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
Descartar
Best Answer

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
Descartar
Related Posts Respostes Vistes Activitat
0
de maig 20
2890
3
de des. 19
5138
6
de des. 23
19776
1
de març 15
4358
5
de maig 19
3358