Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
2288 Переглядів

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
2511
7
лип. 25
50488
0
груд. 24
1326
ODOO.sh Вирішено
2
жовт. 24
13229
1
вер. 24
1853