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

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


 

Awatar
Odrzuć

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

Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor Najlepsza odpowiedź

@Stanislav Kurinec,

Thank you very much. it works as expected.

Thanks once again

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
maj 23
2511
7
lip 25
50478
0
gru 24
1326
ODOO.sh Rozwiązane
2
paź 24
13227
1
wrz 24
1850