Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

how-to clone and use Modules of the OCA (an others maybe)?

By
gunnar
on 7/28/14, 10:34 PM 2,671 views

the git repositories of the OCA (https://github.com/OCA/hr for example) are contain always a bunch of modules, so if you clone them with git you get a folder with subfolders.

The 'addons_path' in your config file can not handle such a 2-level structure, so if you clone into the 'addons' folder Odoo will not find these modules. Is there any common practise how to organize that best?

Just adding level-1 folders in /opt/ocb/ocb-server for each batch of modules and then extending the addons path seems a little cluttered, isn't it?

0
Clement Zotti
On 7/29/14, 2:51 PM

Are you try to make some symbolic link ?

I have module in both place :

/opt/openerp/custom/addons_dev/

/opt/openerp/custom/addons/

 

and in my addons_path=/opt/openerp/server/addons,/opt/openerp/addons(here is where i made all the symbolic link)

and I have done

cd /opt/openerp/addons

and

ln -s /opt/openerp/custom/addons/* .

and

ln -s /opt/openerp/custorm/addons_dev/{module_1, module_2} .

With this I have only one folder with link to desired module, and I add or remove them easily(after uninstall them from odoo).

 

Hope this help.

so then the folder /opt/openerp/custorm/addons_dev is where you git clone into right? Do you list the symlinks in your 'official' addons folder in a .gitignore file, so when you update (git merge ...) your installation those will be ignored?

gunnar
on 7/30/14, 5:03 AM

ok, the symlinks work fine. I think that's an elegant way to work make an external modules folder like /opt/ocb/ocb-server/addons-clone and add symlinks as discribed in the "official" addons folder. When making a update modules list from inside you OpenERP/Odoo via the browser of your choice (firefox most likely) OpenERP finds the linked addons as well

gunnar
on 7/30/14, 6:07 AM
0

Luke Branch

--Luke Branch--
1531
| 6 7 8
Mui Wo, Lantau, Hong Kong
--Luke Branch--

...

Luke Branch
On 7/29/14, 12:39 AM

Hi Gunnar,

try the following command:

sudo git clone https://github.com/odoo/<<insert OCA repo here>> /opt/odoo/custom/addons/

Then add the custom folder to the odoo-server.conf or openerp-server.conf file (eg. /etc/odoo-server.conf) on the addons_path line. You can continue adding custom module directories in this manner by seperating them with a comma.
addons_path = /opt/odoo/odoo-server/addons,/opt/odoo/custom/addons

 

I think he doesn't want to add too many addons path folders and find a way to clone several repositories in just one addons folder. I am interesting in this information too. Does anyone know if we can do this?

Alex
on 7/29/14, 3:49 AM

@Luke: it isn't that simple because you will not clone one single Module with the command you suggest but a batch of Modules inside of a higer-level folder. Like this you have ~/custom/addons/folder/Module1, Module2, Module2, ... etc. so you would have to add ~/custom/addons/folder/Module1,~custom/addons/folder/Module2,~/custom/addons/folder/Module3,...etc That gives a lot of entries ..... I wonder it the OCA people have a suggestion how to handle this most efficiently. Maybe they didn;t think that through and leave it to any user to decide how to manage that ...

gunnar
on 7/30/14, 2:33 AM

@Luke: it isn't that simple because you will not clone one single Module with the command you suggest but a batch of Modules inside of a higer-level folder. Like this you have ~/custom/addons/folder/Module1, Module2, Module2, ... etc. so you would have to add ~/custom/addons/folder/Module1,~custom/addons/folder/Module2,~/custom/addons/folder/Module3,...etc That gives a lot of entries ..... I wonder if the OCA people have a suggestion how to handle this most efficiently. Maybe they didn;t think that through and leave it to any user to decide how to manage that ...

gunnar
on 7/30/14, 2:34 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/28/14, 10:34 PM
Seen: 2671 times
Last updated: 3/16/15, 8:10 AM