Addon Management
OEC.SH provides a sophisticated multi-tier addon repository system that allows you to manage custom Odoo addons at platform, organization, and project levels. This enables code reuse, centralized addon management, and flexible addon configuration per environment.
Overview
What are Addon Repositories?
Addon repositories are Git repositories containing Odoo addons (modules) that extend Odoo functionality. OEC.SH supports:
- Standard Odoo Addons: Community and Enterprise addons built into Odoo
- Custom Addons: Your organization's proprietary addons
- Third-Party Addons: Community addons from GitHub/GitLab
- Platform Addons: Shared addons available to all organizations (admin-managed)
Multi-Tier Addon Architecture
OEC.SH organizes addon repositories in a 4-tier hierarchy:
Priority Order (highest to lowest):
4. Project Additional Repos → /opt/paasportal/envs/{env_id}/deps/{slug}/
3. Project Primary Repo → /opt/paasportal/envs/{env_id}/addons/
2. Organization Repos → /opt/paasportal/org_{org_id}/{slug}/
1. Platform Repos → /opt/paasportal/platform/{slug}/How Priority Works:
- Higher-tier addons override lower-tier addons with the same technical name
- Project-level addons take precedence over organization addons
- Organization addons override platform addons
- This allows customization at any level
Addons Path Configuration
OEC.SH automatically builds the Odoo addons_path configuration by combining all selected repositories:
# Example odoo.conf
addons_path = /opt/paasportal/envs/abc123/deps/enterprise,
/opt/paasportal/envs/abc123/addons,
/opt/paasportal/org_def456/company-addons,
/opt/paasportal/platform/openeducat-core,
/mnt/extra-addons,
/usr/lib/python3/dist-packages/odoo/addonsPlatform Addon Repositories (Admin Only)
Platform addon repositories are global repositories managed by portal administrators. They are available to all organizations and can be selected per project.
Use Cases
- Core platform addons (e.g., OpenEduCat modules)
- Common utility addons used across all customers
- Standardized integrations (payment gateways, shipping providers)
- Quality-assured third-party addons
Creating Platform Addon Repos
Admin Portal Access: /admin/platform-addon-repos
API Endpoint:
POST /api/v1/admin/platform-addon-repos
Content-Type: application/json
Authorization: Bearer {admin_token}
{
"name": "OpenEduCat Core",
"slug": "openeducat-core",
"description": "Core OpenEduCat education management modules",
"git_provider": "github",
"git_repo_url": "https://github.com/openeducat/openeducat_erp.git",
"is_public": true,
"requirements_txt_path": "requirements.txt",
"apt_txt_path": "apt.txt",
"install_dependencies": true,
"priority": 10,
"default_selected": true,
"estimated_size_mb": 150
}Response:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "OpenEduCat Core",
"slug": "openeducat-core",
"git_provider": "github",
"git_repo_url": "https://github.com/openeducat/openeducat_erp.git",
"is_public": true,
"is_active": true,
"priority": 10,
"version_mappings": [],
"create_date": "2025-01-15T10:30:00Z"
}Version Mappings
Platform repos support version mappings to use different branches for different Odoo versions:
Add Version Mapping:
POST /api/v1/admin/platform-addon-repos/{repo_id}/versions
Content-Type: application/json
{
"odoo_version": "17.0",
"git_branch": "17.0"
}Example Version Mappings:
{
"version_mappings": [
{ "odoo_version": "17.0", "git_branch": "17.0" },
{ "odoo_version": "16.0", "git_branch": "16.0" },
{ "odoo_version": "15.0", "git_branch": "15.0" }
]
}When deploying, OEC.SH automatically selects the correct branch based on the environment's Odoo version.
Managing Platform Repos
List All Platform Repos:
GET /api/v1/admin/platform-addon-repos?include_inactive=falseUpdate Platform Repo:
PATCH /api/v1/admin/platform-addon-repos/{repo_id}
Content-Type: application/json
{
"description": "Updated description",
"priority": 20,
"is_active": true
}Delete (Soft Delete):
DELETE /api/v1/admin/platform-addon-repos/{repo_id}Organization Addon Repositories
Organization addon repositories are managed by organization admins and are available to all projects within the organization.
Use Cases
- Company-specific customizations shared across projects
- Organization-wide integrations (CRM, accounting systems)
- Proprietary business logic addons
- Custom themes and branding
Creating Organization Addon Repos
Required Permission: org.repos.create
API Endpoint:
POST /api/v1/organizations/{organization_id}/addon-repos
Content-Type: application/json
Authorization: Bearer {token}
{
"name": "ACME Custom Addons",
"slug": "acme-custom",
"description": "ACME Corp proprietary modules",
"git_provider": "github",
"git_repo_url": "https://github.com/acmecorp/odoo-addons.git",
"git_branch": "main",
"is_public": false,
"org_connection_id": "660e8400-e29b-41d4-a716-446655440000",
"requirements_txt_path": "requirements.txt",
"install_dependencies": true,
"priority": 50,
"default_selected": true
}Private Repository Authentication:
- Set
is_public: falsefor private repositories - Provide
org_connection_idreferencing an organization Git connection - See Git Connections for authentication setup
Response:
{
"id": "770e8400-e29b-41d4-a716-446655440000",
"organization_id": "880e8400-e29b-41d4-a716-446655440000",
"name": "ACME Custom Addons",
"slug": "acme-custom",
"git_provider": "github",
"git_repo_url": "https://github.com/acmecorp/odoo-addons.git",
"git_branch": "main",
"is_public": false,
"org_connection_id": "660e8400-e29b-41d4-a716-446655440000",
"is_active": true,
"priority": 50,
"create_date": "2025-01-15T11:00:00Z"
}Managing Organization Repos
List Organization Repos:
GET /api/v1/organizations/{organization_id}/addon-reposUpdate Repo:
PATCH /api/v1/organizations/{organization_id}/addon-repos/{repo_id}
Content-Type: application/json
{
"git_branch": "production",
"priority": 60
}Reorder Repos (changes priority):
POST /api/v1/organizations/{organization_id}/addon-repos/reorder
Content-Type: application/json
{
"repo_ids": [
"repo1-uuid",
"repo2-uuid",
"repo3-uuid"
]
}Delete Repo:
DELETE /api/v1/organizations/{organization_id}/addon-repos/{repo_id}Project Additional Repositories
Project additional repositories are extra addon sources specific to a single project, in addition to the project's primary repository.
Use Cases
- Odoo Enterprise addons repository
- Third-party addon bundles (OCA modules)
- Project-specific integrations
- External marketplace addons
Creating Project Additional Repos
Required Permission: project.repos.create
API Endpoint:
POST /api/v1/projects/{project_id}/additional-repos
Content-Type: application/json
Authorization: Bearer {token}
{
"name": "Odoo Enterprise",
"slug": "enterprise",
"description": "Official Odoo Enterprise addons",
"git_provider": "github",
"git_repo_url": "https://github.com/odoo/enterprise.git",
"git_branch": "17.0",
"is_public": false,
"connection_type": "organization",
"connection_id": "990e8400-e29b-41d4-a716-446655440000",
"install_dependencies": false,
"priority": 100
}Connection Types:
platform: Use platform Git connection (admin-managed)organization: Use organization Git connectionuser: Use user's personal OAuth tokenpublic: No authentication (public repository)
Response:
{
"id": "aa0e8400-e29b-41d4-a716-446655440000",
"project_id": "bb0e8400-e29b-41d4-a716-446655440000",
"name": "Odoo Enterprise",
"slug": "enterprise",
"connection_type": "organization",
"connection_id": "990e8400-e29b-41d4-a716-446655440000",
"is_active": true,
"priority": 100
}Managing Project Repos
List Project Additional Repos:
GET /api/v1/projects/{project_id}/additional-reposUpdate Repo:
PATCH /api/v1/projects/{project_id}/additional-repos/{repo_id}
Content-Type: application/json
{
"git_branch": "18.0",
"priority": 90
}Reorder Repos:
POST /api/v1/projects/{project_id}/additional-repos/reorder
Content-Type: application/json
{
"repo_ids": ["repo1-uuid", "repo2-uuid"]
}Delete Repo:
DELETE /api/v1/projects/{project_id}/additional-repos/{repo_id}Project Addon Selections
Projects can selectively enable/disable platform and organization addon repositories. This allows fine-grained control over which shared repos are included.
Get Project Selections
API Endpoint:
GET /api/v1/projects/{project_id}/addon-selectionsResponse:
{
"project_id": "project-uuid",
"platform_repos": [
{
"id": "platform-repo-1-uuid",
"repo_type": "platform",
"name": "OpenEduCat Core",
"slug": "openeducat-core",
"git_repo_url": "https://github.com/openeducat/openeducat_erp.git",
"is_public": true,
"priority": 10,
"default_selected": true,
"estimated_size_mb": 150,
"is_selected": true
}
],
"organization_repos": [
{
"id": "org-repo-1-uuid",
"repo_type": "organization",
"name": "ACME Custom Addons",
"slug": "acme-custom",
"is_selected": true
}
]
}Update Project Selections
API Endpoint:
PUT /api/v1/projects/{project_id}/addon-selections
Content-Type: application/json
{
"platform_repo_ids": [
"platform-repo-1-uuid",
"platform-repo-2-uuid"
],
"organization_repo_ids": [
"org-repo-1-uuid"
]
}Behavior:
- Replaces all current selections with provided lists
- Repos not in the list are deselected
- Empty arrays deselect all repos of that type
Addon Discovery and Installation
Automatic Addon Detection
When repositories are cloned during deployment, OEC.SH automatically:
- Scans for Addons: Detects all Odoo addons in the repository by finding
__manifest__.pyor__openerp__.pyfiles - Builds Addons Path: Adds repository paths to
addons_pathin priority order - Installs Dependencies: Processes
requirements.txtandapt.txtif enabled
Addon Manifest Structure
Each Odoo addon must have a manifest file:
__manifest__.py (Odoo 10.0+):
{
'name': 'My Custom Module',
'version': '17.0.1.0.0',
'category': 'Customizations',
'summary': 'Custom functionality for ACME Corp',
'description': """
Detailed description of the module.
Key Features:
- Feature 1
- Feature 2
""",
'author': 'ACME Corp',
'website': 'https://acmecorp.com',
'license': 'LGPL-3',
# Dependencies
'depends': [
'base',
'sale',
'account',
],
# Data files
'data': [
'security/ir.model.access.csv',
'views/views.xml',
'data/data.xml',
],
# Demo data
'demo': [
'demo/demo.xml',
],
# Assets (JS, CSS)
'assets': {
'web.assets_backend': [
'my_module/static/src/js/widget.js',
'my_module/static/src/css/styles.css',
],
},
# Addon behavior
'installable': True,
'application': False,
'auto_install': False,
# Odoo.sh/SaaS compatibility
'images': ['static/description/banner.png'],
}Dependency Management
Python Dependencies (requirements.txt)
Place requirements.txt in repository root:
# Python package dependencies
requests>=2.28.0
pillow>=9.0.0
python-dateutil>=2.8.2
lxml>=4.9.0
# Version pinning for stability
stripe==5.0.0
sendgrid==6.9.7Automatic Installation:
- Set
install_dependencies: truein repo configuration - OEC.SH runs
pip install -r requirements.txtduring deployment - Installed into Odoo container's Python environment
System Dependencies (apt.txt)
Place apt.txt in repository root:
# System packages required by addons
wkhtmltopdf
postgresql-client
libpq-dev
python3-dev
build-essentialAutomatic Installation:
- Set
install_dependencies: truein repo configuration - OEC.SH runs
apt-get installduring deployment - Installed into Odoo container
Custom Dependency Paths
Override default paths if your repository structure differs:
{
"requirements_txt_path": "python/requirements.txt",
"apt_txt_path": "system/apt.txt"
}Repository Types and Authentication
Public Repositories
No authentication required:
{
"is_public": true,
"git_repo_url": "https://github.com/OCA/web.git"
}OEC.SH clones public repos via HTTPS without credentials.
Private Repositories
Require Git connection:
-
Set up Git Connection (See Git Connections Guide)
- GitHub App (recommended)
- GitHub Personal Access Token
- GitLab OAuth
- GitLab Personal Access Token
-
Reference Connection in Repo:
Platform Repo (admin-managed connection):
{
"is_public": false,
"platform_connection_id": "platform-connection-uuid"
}Organization Repo (org-managed connection):
{
"is_public": false,
"org_connection_id": "org-connection-uuid"
}Project Additional Repo (flexible connection):
{
"is_public": false,
"connection_type": "organization",
"connection_id": "org-connection-uuid"
}Git Providers
Supported providers:
- GitHub:
git_provider: "github" - GitLab:
git_provider: "gitlab"
Both support:
- OAuth authentication
- Personal Access Tokens
- GitHub Apps (GitHub only)
- SSH keys (coming soon)
Addon Deployment Workflow
Deployment Process
When deploying an environment, OEC.SH:
-
Resolves Addon Repositories
- Fetches project addon selections
- Collects platform repos (if selected)
- Collects organization repos (if selected)
- Includes project primary repo (if configured)
- Includes project additional repos
-
Version Resolution
- Determines environment's Odoo version
- Selects appropriate Git branch from version mappings
- Falls back to default branch if no mapping
-
Clones Repositories
- Platform repos →
/opt/paasportal/platform/{slug}/ - Organization repos →
/opt/paasportal/org_{org_id}/{slug}/ - Project primary →
/opt/paasportal/envs/{env_id}/addons/ - Project additional →
/opt/paasportal/envs/{env_id}/deps/{slug}/
- Platform repos →
-
Installs Dependencies
- Aggregates all
apt.txtfiles - Runs
apt-get install(cached by checksum) - Installs Python packages from
requirements.txt
- Aggregates all
-
Builds Addons Path
- Combines all repository paths in priority order
- Writes to
odoo.conf
-
Starts Odoo Container
- Odoo discovers all addons from
addons_path - Addons available in Apps menu
- Odoo discovers all addons from
Deployment Log Example
[2025-01-15 10:30:00] Resolving addon repositories...
[2025-01-15 10:30:01] Resolved 5 repos: 2 platform, 1 org, 1 primary, 1 additional
[2025-01-15 10:30:02] Cloning 2 platform addon repositories...
[2025-01-15 10:30:05] - OpenEduCat Core (17.0) [2.8s]
[2025-01-15 10:30:08] - Common Utilities (main) [2.2s]
[2025-01-15 10:30:08] All 2 platform repos ready (6.1s)
[2025-01-15 10:30:09] Cloning 1 organization addon repositories...
[2025-01-15 10:30:11] - ACME Custom Addons (production) [1.9s]
[2025-01-15 10:30:12] Cloning project repository...
[2025-01-15 10:30:15] Project repository cloned (3.2s)
[2025-01-15 10:30:16] Installing dependencies...
[2025-01-15 10:30:20] Dependencies installed (4.1s)
[2025-01-15 10:30:21] Starting Odoo container...Addon Upgrade and Updates
Update Repository Branch
Change the Git branch for a repository:
Organization Repo:
PATCH /api/v1/organizations/{org_id}/addon-repos/{repo_id}
Content-Type: application/json
{
"git_branch": "17.0-stable"
}Redeploy to Apply: After updating, redeploy the environment to pull latest code:
POST /api/v1/environments/{env_id}/redeployPull Latest Changes
Redeployment automatically pulls the latest commit from the configured branch.
Version Upgrades
When upgrading Odoo version:
- Platform repos with version mappings automatically switch branches
- Other repos require manual branch updates
- Test in staging before upgrading production
Addon Repository Best Practices
Repository Structure
Recommended Structure:
my-addons-repo/
├── README.md
├── requirements.txt # Python dependencies
├── apt.txt # System packages
├── addon_1/ # Odoo addon 1
│ ├── __manifest__.py
│ ├── __init__.py
│ ├── models/
│ ├── views/
│ └── security/
├── addon_2/ # Odoo addon 2
│ ├── __manifest__.py
│ └── ...
└── addon_3/
└── ...Branching Strategy
Option 1: Version Branches
main → Development
17.0 → Odoo 17.0 stable
16.0 → Odoo 16.0 stable
15.0 → Odoo 15.0 maintenanceOption 2: Environment Branches
develop → Development work
staging → Pre-production testing
production → Live environmentsGit Workflow
-
Development
- Create feature branches
- Test in development environment
- Merge to staging branch
-
Testing
- Deploy staging environment
- Run tests
- QA approval
-
Production
- Merge to production branch
- Deploy production environment
- Monitor for issues
Dependency Management
Pin Versions:
# Good: Pinned versions
stripe==5.0.0
requests==2.28.2
# Avoid: Unpinned versions (causes drift)
stripe
requestsDocument System Deps:
# apt.txt
# Required for PDF generation
wkhtmltopdf
# Required for image processing
libjpeg-dev
libpng-devSecurity
- Never commit secrets to addon repositories
- Use environment variables for API keys
- Configure via Odoo settings or environment variables
- Review
.gitignorefor sensitive files
Testing
Include Test Data:
# __manifest__.py
{
'demo': [
'demo/res_partner.xml',
'demo/sale_order.xml',
],
}Write Unit Tests:
# tests/test_my_addon.py
from odoo.tests import TransactionCase
class TestMyAddon(TransactionCase):
def test_feature(self):
# Test code
passAddon Configuration
Environment Variables
Pass configuration to addons via environment variables:
Set in Environment Settings:
{
"environment_vars": {
"ADDON_API_KEY": "secret-key",
"ADDON_WEBHOOK_URL": "https://api.example.com/webhook"
}
}Access in Addon:
import os
api_key = os.environ.get('ADDON_API_KEY')Odoo Configuration Parameters
Use Odoo's system parameters:
Create via Data File:
<!-- data/config.xml -->
<odoo>
<data>
<record id="addon_setting_1" model="ir.config_parameter">
<field name="key">my_addon.api_endpoint</field>
<field name="value">https://api.example.com</field>
</record>
</data>
</odoo>Access in Code:
endpoint = self.env['ir.config_parameter'].sudo().get_param('my_addon.api_endpoint')Addon Conflicts and Resolution
Detecting Conflicts
Addon conflicts occur when:
- Multiple addons define same model with different fields
- Same technical name in different repositories
- Incompatible addon versions
OEC.SH Priority System:
- Higher-tier repos override lower-tier repos
- Last path in
addons_pathtakes precedence
Resolving Conflicts
Option 1: Disable Conflicting Repo
# Deselect from project
PUT /api/v1/projects/{project_id}/addon-selections
{
"platform_repo_ids": [], # Exclude conflicting platform repo
"organization_repo_ids": ["org-repo-uuid"]
}Option 2: Change Priority
# Lower priority so it's overridden
PATCH /api/v1/organizations/{org_id}/addon-repos/{repo_id}
{
"priority": 10 # Lower number = lower priority
}Option 3: Fork and Modify
- Fork the conflicting repository
- Rename the addon
- Update to your custom repo
Addon Removal
Uninstall Addon from Odoo
- Access Odoo Apps Menu
- Find Installed Addon
- Click Uninstall
- Confirm Data Removal
Warning: Uninstalling addons removes:
- Custom models and database tables
- Configuration data
- Stored records
Best Practice: Backup before uninstalling.
Remove Repository
Organization Repo:
DELETE /api/v1/organizations/{org_id}/addon-repos/{repo_id}Project Additional Repo:
DELETE /api/v1/projects/{project_id}/additional-repos/{repo_id}Redeploy Required: Changes take effect on next deployment.
Permissions
Organization Addon Repos
| Permission | Action |
|---|---|
org.repos.list | View organization addon repositories |
org.repos.create | Add new organization addon repositories |
org.repos.update | Edit organization addon repositories |
org.repos.delete | Remove organization addon repositories |
Project Addon Repos
| Permission | Action |
|---|---|
project.repos.list | View project additional repositories |
project.repos.create | Add project additional repositories |
project.repos.update | Edit project additional repositories and selections |
project.repos.delete | Remove project additional repositories |
Platform Addon Repos
Admin Only: Platform addon repositories require portal admin privileges.
API Reference
Platform Addon Repos (Admin)
List Platform Repos
GET /api/v1/admin/platform-addon-repos
Query Parameters:
- include_inactive: boolean (default: false)Create Platform Repo
POST /api/v1/admin/platform-addon-repos
Content-Type: application/json
{
"name": string (required),
"slug": string (required, pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$),
"description": string | null,
"git_provider": "github" | "gitlab" (required),
"git_repo_url": string (required),
"is_public": boolean (default: false),
"platform_connection_id": uuid | null,
"requirements_txt_path": string | null (default: "requirements.txt"),
"apt_txt_path": string | null (default: "apt.txt"),
"install_dependencies": boolean (default: true),
"priority": integer (default: 100, range: 0-1000)
}Get Platform Repo
GET /api/v1/admin/platform-addon-repos/{repo_id}Update Platform Repo
PATCH /api/v1/admin/platform-addon-repos/{repo_id}
Content-Type: application/json
{
"name": string | null,
"description": string | null,
"git_repo_url": string | null,
"is_public": boolean | null,
"is_active": boolean | null,
"priority": integer | null
}Delete Platform Repo
DELETE /api/v1/admin/platform-addon-repos/{repo_id}Add Version Mapping
POST /api/v1/admin/platform-addon-repos/{repo_id}/versions
Content-Type: application/json
{
"odoo_version": string (required, pattern: ^\d+\.\d+$),
"git_branch": string (required)
}Remove Version Mapping
DELETE /api/v1/admin/platform-addon-repos/{repo_id}/versions/{version_id}Organization Addon Repos
List Organization Repos
GET /api/v1/organizations/{organization_id}/addon-repos
Query Parameters:
- include_inactive: boolean (default: false)
Authorization: Bearer {token}
Permission: org.repos.listCreate Organization Repo
POST /api/v1/organizations/{organization_id}/addon-repos
Content-Type: application/json
Authorization: Bearer {token}
Permission: org.repos.create
{
"name": string (required),
"slug": string (required),
"description": string | null,
"git_provider": "github" | "gitlab" (required),
"git_repo_url": string (required),
"git_branch": string (default: "main"),
"is_public": boolean (default: false),
"org_connection_id": uuid | null,
"requirements_txt_path": string | null,
"apt_txt_path": string | null,
"install_dependencies": boolean (default: true),
"priority": integer (default: 100)
}Get Organization Repo
GET /api/v1/organizations/{organization_id}/addon-repos/{repo_id}
Permission: org.repos.listUpdate Organization Repo
PATCH /api/v1/organizations/{organization_id}/addon-repos/{repo_id}
Content-Type: application/json
Permission: org.repos.update
{
"git_branch": string | null,
"priority": integer | null,
"is_active": boolean | null
}Delete Organization Repo
DELETE /api/v1/organizations/{organization_id}/addon-repos/{repo_id}
Permission: org.repos.deleteReorder Organization Repos
POST /api/v1/organizations/{organization_id}/addon-repos/reorder
Content-Type: application/json
Permission: org.repos.update
{
"repo_ids": [uuid, uuid, ...]
}Project Additional Repos
List Project Additional Repos
GET /api/v1/projects/{project_id}/additional-repos
Authorization: Bearer {token}
Permission: project.repos.listCreate Project Additional Repo
POST /api/v1/projects/{project_id}/additional-repos
Content-Type: application/json
Permission: project.repos.create
{
"name": string (required),
"slug": string (required),
"description": string | null,
"git_provider": "github" | "gitlab" (required),
"git_repo_url": string (required),
"git_branch": string (default: "main"),
"is_public": boolean (default: false),
"connection_type": "platform" | "organization" | "user" | "public" (default: "public"),
"connection_id": uuid | null,
"requirements_txt_path": string | null,
"apt_txt_path": string | null,
"install_dependencies": boolean (default: true),
"priority": integer (default: 100)
}Update Project Additional Repo
PATCH /api/v1/projects/{project_id}/additional-repos/{repo_id}
Permission: project.repos.updateDelete Project Additional Repo
DELETE /api/v1/projects/{project_id}/additional-repos/{repo_id}
Permission: project.repos.deleteReorder Project Repos
POST /api/v1/projects/{project_id}/additional-repos/reorder
Content-Type: application/json
{
"repo_ids": [uuid, uuid, ...]
}Project Addon Selections
Get Addon Selections
GET /api/v1/projects/{project_id}/addon-selections
Authorization: Bearer {token}
Permission: project.repos.list
Response:
{
"project_id": uuid,
"platform_repos": [
{
"id": uuid,
"repo_type": "platform",
"name": string,
"slug": string,
"description": string | null,
"git_repo_url": string,
"is_public": boolean,
"priority": integer,
"default_selected": boolean,
"estimated_size_mb": integer | null,
"is_selected": boolean
}
],
"organization_repos": [...]
}Update Addon Selections
PUT /api/v1/projects/{project_id}/addon-selections
Content-Type: application/json
Permission: project.repos.update
{
"platform_repo_ids": [uuid, uuid, ...],
"organization_repo_ids": [uuid, uuid, ...]
}Troubleshooting
Addon Installation Fails
Symptom: Addon not appearing in Odoo Apps menu
Possible Causes:
- Repository not in
addons_path - Missing
__manifest__.pyfile - Syntax error in manifest
- Missing dependencies
Solution:
# SSH into container
docker exec -it {env_id}_odoo bash
# Check addons path
cat /etc/odoo/odoo.conf | grep addons_path
# Verify addon exists
ls -la /opt/paasportal/platform/{slug}/
# Check Odoo logs
docker logs {env_id}_odoo --tail 100Dependency Installation Errors
Symptom: Deployment fails during dependency installation
Possible Causes:
- Invalid package names
- Missing system dependencies
- Network issues
Solution:
# Disable dependency installation temporarily
PATCH /api/v1/organizations/{org_id}/addon-repos/{repo_id}
{
"install_dependencies": false
}
# Redeploy to test addon without deps
# Fix requirements.txt/apt.txt
# Re-enable dependency installationGit Clone Fails
Symptom: "Failed to clone repository" error
Possible Causes:
- Invalid Git credentials
- Repository not accessible
- Invalid branch name
- Network connectivity issues
Solution:
-
Verify Git Connection:
GET /api/v1/organizations/{org_id}/git-connections # Ensure connection is active and valid -
Test Repository Access:
- Clone manually with same credentials
- Check repository permissions
-
Update Branch:
PATCH /api/v1/organizations/{org_id}/addon-repos/{repo_id} { "git_branch": "main" # Try different branch }
Addon Path Issues
Symptom: Wrong addon version loaded
Cause: Multiple repos contain same addon, priority conflict
Solution:
-
Check Priority:
GET /api/v1/organizations/{org_id}/addon-repos # Review priority values -
Adjust Priority:
- Lower priority = loaded first = overridden
- Higher priority = loaded last = takes precedence
-
Remove Duplicate:
- Deselect conflicting repo from project
Permission Denied
Symptom: 403 Forbidden when managing repos
Cause: Missing required permissions
Solution:
-
Check Permissions:
GET /api/v1/users/me/abilities?organizationId={org_id} -
Request Access:
- Contact organization admin
- Request
org.repos.createorproject.repos.create
Related Documentation
- Git Connections - Set up authentication for private repositories
- Environment Deployment - Understand deployment process
- Environment Configuration - Configure environment variables
- Permissions System - Manage user permissions
Summary
OEC.SH's multi-tier addon repository system provides:
- Flexibility: Choose addons at platform, organization, and project levels
- Reusability: Share common addons across projects
- Isolation: Project-specific addons don't affect other projects
- Version Control: Different branches for different Odoo versions
- Security: Secure authentication for private repositories
- Automation: Automatic cloning, dependency installation, and path configuration
This enables efficient addon management for organizations running multiple Odoo instances.