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

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
maj 20
2860
3
gru 19
5099
6
gru 23
19762
1
mar 15
4328
5
maj 19
3325