Managing custom code from external vendors or third-party developers on Odoo.sh often leads to one major headache: copying and pasting module folders manually into your main repository makes version control messy and updates painful.
Odoo.sh natively supports Git Submodules, allowing you to keep third-party repositories separate while still deploying their modules automatically into your Odoo builds.
Official Odoo Documentation References
- Odoo.sh Advanced Topics — Submodules: https://www.odoo.com/documentation/master/administration/odoo_sh/advanced.html#odoo-sh-advanced-submodules
- Odoo.sh Settings — Submodules: https://www.odoo.com/documentation/20.0/administration/odoo_sh/getting_started/settings.html#submodules
Part 1: Connect the Submodule in GitHub & Odoo.sh
Step 1: Create a Repository on GitHub
Create a new repository on GitHub (Private or Public) dedicated to your third-party vendor modules.
Commit an initial README.md file so the default branch (such as main) exists before linking it to Odoo.sh.
Step 2: Add the Submodule via the Odoo.sh Branch Menu
- Open your Odoo.sh project dashboard and select the target branch (e.g., your staging branch).
- Click Submodules → Add a submodule in the branch sidebar.
- Fill in the modal fields and click Add a submodule:
- Repository URL:
git@github.com:<owner>/<submodule-repo>.git - Branch: Select the Odoo.sh branch where
.gitmodulesshould be committed. - Path: Enter the target folder path (keep default).
- Repository URL:

Odoo.sh automatically creates and commits the .gitmodules file to your branch.
Step 3: Register the Submodule & Generate an SSH Key (Private Repos)
For private repositories, Odoo.sh requires an SSH deploy key so its build server can clone the third-party code.
- Navigate to Odoo.sh → Settings → Submodules.
- Paste the SSH repository URL (
git@github.com:<owner>/<submodule-repo>.git) and click Add to generate a Fingerprint and Public key.

Step 4: Add the Public Key as a Deploy Key on GitHub
- Copy the Public key generated inside Odoo.sh → Settings → Submodules.
- Open the third-party submodule repository on GitHub (not your main Odoo.sh repository) and go to Settings → Deploy keys → Add deploy key.
- Paste the public key, give it a clear title (such as
Odoo.sh Deploy Key), and save it (keep Allow write access unchecked).
Part 2: Sync New Third-Party Commits to Staging
Git submodules pin a specific commit hash rather than automatically tracking a live branch. When a third party pushes new modules or updates, Odoo.sh will not see them until you update that commit pointer in your main repository.
Step 5: Clone Your Main Odoo.sh Branch Locally
Open your local terminal and clone the target staging branch of your main repository:
git clone -b <your-staging-branch> https://github.com/<owner>/<main-repo>.git
cd <main-repo>
Already cloned? Switch to your staging branch and pull the latest changes with git checkout <your-staging-branch> && git pull origin <your-staging-branch>.
Step 6: Switch .gitmodules to HTTPS (Optional — Public Submodules Without Local SSH)
If the submodule repository is public and your local machine doesn’t use SSH keys for GitHub, switch .gitmodules to HTTPS:
git config -f .gitmodules submodule.<submodule-path>.url https://github.com/<owner>/<submodule-repo>.git
git submodule sync
Private submodules: Keep git@github.com:... in .gitmodules so Odoo.sh’s SSH deploy key continues authenticating builds.
Step 7: Pull the Latest Commit from the Submodule
Fetch and merge the newest commit from the third-party repository’s tracked branch:
git submodule update --init --remote --merge <submodule-path>
Step 8: Commit and Push the Updated Pointer to Odoo.sh
Stage the updated submodule reference and push it to your staging branch:
git add .gitmodules <submodule-path>
git commit -m "Update submodule to latest commit"
git push origin <your-staging-branch>
Step 9: Verify Build & Update Apps List in Odoo
- Wait for the newly triggered Odoo.sh build on
<your-staging-branch>to turn green. - Open your staging Odoo database, activate Developer Mode, and navigate to Apps → Update Apps List.
- Search for the new module (remove the default Apps filter if it does not appear immediately).


