Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
8027 Представления

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.

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
мая 20
2890
3
дек. 19
5135
6
дек. 23
19776
1
мар. 15
4357
5
мая 19
3356