Skip to Content
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
1524 Представления

Hello everyone,

I have an Odoo sh with 3 github repositories, each one poiting to a specific module.

I need to know if I can create one single folder in github for holding the 3 modules and use this single folder as the submodule in Odoo sh.

The actual structure is:

custom_module1: a submodule in odoo sh;

custom_module2: a submodule in odoo sh;

custom_module3: a submodule in odoo.sh;


What I need to achieve:

main_folder_github/custom_module1, custom_module2, custom_module3

... and have just this "main_folder_github" as the submodule in odoo sh.


If I add this "main_folder_github" as the submodule in odoo.sh, will odoo recognize the modules inside this folder?

Thanks in advance


 

Аватар
Отменить

If you need convert your repo with history to monorepo this article could help you to 
https://medium.com/@chris_72272/keeping-git-history-when-converting-multiple-repos-into-a-monorepo-97641744d928

Hope this will help you

Лучший ответ

Hello Paulo,

i was just digging the same right now and after some try and fail and inspiration in OCA it's looks like the whole magic in in the way how you add submodule. 


git submodule add -b main repo path && git commit -a && git push -u origin Develop

replace path with something like this company/monorepo


in .gitmodules you can see the difference 


[submodule "l10n_cz_bank_systee"]

​path = l10n_cz_bank_systee

​url = git

[submodule "systee/l10n_cz"]

​path = systee/l10n_cz

​url = git

​branch = main


From this moment you will see in your odoo.sh log new adoon_path (but for repo that is without / in path it will be added to /home/odoo/src/user)


odoo: addons paths: ['/home/odoo/src/odoo/odoo/addons', '/home/odoo/data/addons/17.0', '/home/odoo/src/user', '/home/odoo/src/user/systee/l10n_cz'] 


So this is the magice :) 

it's also mention in doc but without information about / in path what's happen

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

@Stanislav Kurinec,

Thank you very much. it works as expected.

Thanks once again

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мая 23
2024
0
дек. 24
536
ODOO.sh Решено
2
окт. 24
11972
1
сент. 24
912
8
авг. 24
48883