Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
2286 Lượt xem

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


 

Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

@Stanislav Kurinec,

Thank you very much. it works as expected.

Thanks once again

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 23
2511
7
thg 7 25
50488
0
thg 12 24
1326
ODOO.sh Đã xử lý
2
thg 10 24
13229
1
thg 9 24
1853