Skip to Content
Menu
This question has been flagged
2 Replies
1522 Views

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


 

Avatar
Discard

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

Best Answer

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

Avatar
Discard
Author Best Answer

@Stanislav Kurinec,

Thank you very much. it works as expected.

Thanks once again

Avatar
Discard
Related Posts Replies Views Activity
1
May 23
2024
0
Dec 24
536
ODOO.sh Solved
2
Oct 24
11969
1
Sep 24
910
8
Aug 24
48879