Repositories
Public
odoo/odoo
Community edition of Odoo, LGPL licensed open source version. Contains :
- Branches of supported Odoo versions (
13.0,12.0, ...) - SaaS branches (
saas-12.3,saas-11.2, ...) - Alpha version (
master): work in progress for the next version (release or SaaS). - Branches of some old unsupported Odoo versions
odoo/enterprise
Enterprise (paid) edition of Odoo.
Contains the same branches as odoo/odoo but with enterprise content.
Development
odoo-dev/odoo
Contains development branches targeting odoo/odoo.
odoo-dev/enterprise
Contains development branches targeting odoo/enterprise.
Summary
| Dev (features branches & bugfixes) | Public | |
|---|---|---|
| Community | odoo-dev/odoo |
odoo/odoo |
| Enterprise | odoo-dev/enterprise |
odoo/enterprise |
How To's
Git Configuration
Global settings
Identify yourself in Git:
git config --global user.email "<trigram>@odoo.com"
git config --global user.name "<Name> (<trigram>)"
Choose the editor of your choice (vim, nano, gedit, ...) for commit messages:
git config --global core.editor gedit
Remotes
Execute these commands to configure your remotes for easy management of odoo and odoo-dev's
branches.
Community
cd /your_odoo_community_path/
git config remote.origin.url git@github.com:odoo/odoo.git
git config remote.origin.pushurl git@github.com:odoo/odoo.git
git config remote.dev.url git@github.com:odoo-dev/odoo.git
git config remote.dev.pushurl git@github.com:odoo-dev/odoo.git
git config --add remote.dev.fetch '+refs/heads/*:refs/remotes/dev/*'
Enterprise
cd /your_odoo_enterprise_path/
git config remote.origin.url git@github.com:odoo/enterprise.git
git config remote.origin.pushurl git@github.com:odoo/enterprise.git
git config remote.dev.url git@github.com:odoo-dev/enterprise.git
git config remote.dev.pushurl git@github.com:odoo-dev/enterprise.git
git config --add remote.dev.fetch '+refs/heads/*:refs/remotes/dev/*'
Connect with SSH
This setup allows you to connect to our repositories without entering your password each time.
- In a terminal, create an SSH key with
ssh-keygen -t rsa - Navigate to your ssh directory
cd ~/.ssh/and display the files withls -l. You should have at least 3 files. - Verify that the
id_rsa.pubfile is readonly (nowin the string of permissions). If not, usechmod 400 ~/.ssh/id_rsa.pubto change that. - Load the private key with
ssh-add ~/.ssh/id_rsa - In your GitHub profile, add a new SSH key and
copy the content of the
id_rsa.pubfile in the key field. - In a terminal, navigate to your Odoo Community (
odoo/odoo) repository and typegit config --list --local. If you configured your remotes correctly, you should have something that looks like this:[...] [remote "origin"] url = git@github.com:odoo/odoo.git fetch = +refs/heads/master:refs/remotes/origin/master [...] - Repeat step 6 for your Odoo Enterprise (
odoo/enterprise) repository.
Clean commit history
A clean commit history is essential to later understand the sequence of changes a file has been through.
By reading the commits of your task, it should be easy to get a glimpse of the changes you made. At the same time, commit atomicity helps in finding and reverting bugs.
In any case, rewrite your commit history before the review to:
- Comply with this advice.
- Avoid impacting several modules with one commit.
- Follow the guidelines.
Branches
Feature branches
When working on a task targeting the master branch of odoo/odoo or odoo/enterprise, you should
create a feature branch in odoo-dev/odoo or odoo-dev/enterprise named
<version>-<feature>-<trigram>.
Example: The branch master-sale-fixes-abc on odoo-dev/odoo is a branch containing fixes for
the sales app in the odoo/odoo repository to be deployed in master and done by ABC
(the trigram of an Odude).
If you target a stable branch, simply adapt the name accordingly.
Examples: saas-12.5-sales-apocalypse-abc, 13.0-sales-fixes-abc.
Respect of this convention is important for the testing environment, especially the version part.
Bugfix branches
Bugfix branch names should follow this pattern: <version>-opw-<ticket_number>-<trigram>.
For the record, opw stands for OpenERP Publisher Warranty.
