How to Add & Sync Third-Party Modules on Odoo.sh Using Git Submodules

Odoo.sh and GitHub connected by a Git submodule to sync third-party modules

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.

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

  1. Open your Odoo.sh project dashboard and select the target branch (e.g., your staging branch).
  2. Click Submodules → Add a submodule in the branch sidebar.
  3. 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 .gitmodules should be committed.
    • Path: Enter the target folder path (keep default).
Add a submodule in the Odoo.sh branch menu

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.

  1. Navigate to Odoo.sh → Settings → Submodules.
  2. Paste the SSH repository URL (git@github.com:<owner>/<submodule-repo>.git) and click Add to generate a Fingerprint and Public key.
Odoo.sh Settings Submodules public key and fingerprint

Step 4: Add the Public Key as a Deploy Key on GitHub

  1. Copy the Public key generated inside Odoo.sh → Settings → Submodules.
  2. Open the third-party submodule repository on GitHub (not your main Odoo.sh repository) and go to Settings → Deploy keys → Add deploy key.
  3. 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

  1. Wait for the newly triggered Odoo.sh build on <your-staging-branch> to turn green.
  2. Open your staging Odoo database, activate Developer Mode, and navigate to Apps → Update Apps List.
  3. Search for the new module (remove the default Apps filter if it does not appear immediately).