devops d9f8a62886 Fix missing Odoo module dependency declarations
Four __manifest__.py files were missing declared dependencies on modules
they already reference via comodel_name fields:
- encoach_exam: add encoach_taxonomy (defines encoach.subject)
- encoach_subscription: add encoach_taxonomy
- encoach_training: add encoach_taxonomy
- encoach_courseware: add encoach_assignment (defines encoach.assignment)

Without these, Odoo's module loader throws AssertionError on unknown
comodel_name and refuses to initialize the registry.

Made-with: Cursor
2026-04-01 20:01:25 +04:00

EnCoach Backend — v2

Branching Workflow

This repo is connected to the staging server via a Git post-receive hook. All deployment is automatic — but only after code review approval.

How to contribute

  1. Never push directly to main — branch protection will block it.
  2. Push your changes to your feature branch (e.g. feature/full-backend-v1)
  3. Open a Pull Request on Gitea targeting main
  4. Request review from devops (Talal)
  5. Once approved and merged, the staging server rebuilds and redeploys automatically.

Environment

The .env file is not committed. It lives only on the staging server at /opt/encoach/backend-v2/.env.


Odoo 19 Community Local setup (macOS)

Run Odoo 19 Community on your Mac.


Option A: Run with Docker (easiest)

No Python or PostgreSQL needed on your machine.

Requirements: Docker Desktop for Mac.

cd /Users/yamenahmad/projects2026/odoo/odoo19
docker compose up -d

Open http://localhost:8069. First time: create a new database (name, email, password).

Test that its running:

./test_odoo.sh

Stop: docker compose down


Manual terminal guide (no scripts): see MANUAL-RUN.md for step-by-step commands only.


Option B: Run from source (venv + PostgreSQL)

Prerequisites

  • macOS (Sonoma, Ventura, or Monterey)
  • Homebrew brew.sh install with:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  • Xcode Command Line Tools (for compilers):
    xcode-select --install
    

1. Install PostgreSQL and wkhtmltopdf

brew install postgresql@15 wkhtmltopdf
brew services start postgresql@15

Create an Odoo database user (optional; you can also use your macOS user):

# Using your current user (no password by default on Mac)
createuser -s $(whoami)

# Or create a dedicated user with password:
createuser -s odoo
# Then in psql: ALTER USER odoo WITH PASSWORD 'odoo';

2. Run the setup script

From this directory:

chmod +x setup.sh
./setup.sh

This will:

  • Clone Odoo 19.0 into ./odoo/
  • Create a Python virtual environment in ./venv/
  • Install Python dependencies from odoo/requirements.txt

3. Configure Odoo (optional)

Copy the example config and edit if needed:

cp odoo.conf.example odoo.conf
  • db_user: your PostgreSQL user (e.g. your Mac username or odoo)
  • db_password: leave empty if you use trust auth (typical on Mac)
  • addons_path: defaults to odoo/addons (Community only)

4. Run Odoo

./run.sh

Or manually:

source venv/bin/activate
cd odoo && ./odoo-bin -c ../odoo.conf
  • Open http://localhost:8069
  • First run: create a new database (name, email, password, language)
  • Default admin login after creating DB: email admin, password admin (if you use the demo setup)

Useful options

  • Custom database name: ./odoo-bin -c odoo.conf -d mydb
  • Development mode (auto-reload): add --dev=all to the command
  • Install modules at start: -i sale,crm (comma-separated)

Troubleshooting

  • Port 8069 in use: change xmlrpc_port in odoo.conf or run with --http-port=8070
  • PostgreSQL connection refused: ensure its running: brew services start postgresql@15
  • Python / pip errors: use Python 3.10, 3.11, or 3.12; create a fresh venv and run pip install -r odoo/requirements.txt again
Description
No description provided
Readme 360 MiB
Languages
Python 34.4%
C 32%
JavaScript 28.4%
SCSS 1.4%
TypeScript 1.2%
Other 2.5%