Skip to content

feat: add --odoo-root option and AK_ODOO_ROOT env var for custom addons prefix#113

Open
rvalyi wants to merge 1 commit into
masterfrom
feature/odoo-root-prefix
Open

feat: add --odoo-root option and AK_ODOO_ROOT env var for custom addons prefix#113
rvalyi wants to merge 1 commit into
masterfrom
feature/odoo-root-prefix

Conversation

@rvalyi
Copy link
Copy Markdown
Member

@rvalyi rvalyi commented May 23, 2026

The hardcoded '/odoo/' prefix in ak build output is inconvenient for installations using virtualenvs or non-standard paths (e.g. ~/DEV/odoo18).

Changes:

  • Add --odoo-root CLI option to ak build
  • Add AK_ODOO_ROOT environment variable support
  • Priority: CLI option > env var > default '/odoo/'
  • Rename PREFIX constant to DEFAULT_PREFIX for clarity
  • Add tests covering all three scenarios

Usage examples:

    ak build --odoo-root ~/DEV/odoo18/
    AK_ODOO_ROOT=~/DEV/odoo18/ ak build

example usage in my termux env:

ak build --odoo-root ~/DEV/odoo18/odoo/
[...]
│Reset branch '18.0'                                                                                                                                                                                                                          │
│Your branch is up to date with 'origin/18.0'.                                                                                                                                                                                                │
│(INFO) [13:24:58] git_aggregator.repo  wms   Remote already exists origin <https://github.com/oca/wms>                                                                                                                                       │
│(INFO) [13:24:58] git_aggregator.repo  wms   Fetching required remotes                                                                                                                                                                       │
│From https://github.com/oca/web-api                                                                                                                                                                                                          │
│ * branch            18.0       -> FETCH_HEAD                                                                                                                                                                                                │
│(INFO) [13:24:58] git_aggregator.repo  web-api   Checking repo status                                                                                                                                                                        │
│(INFO) [13:24:58] git_aggregator.repo  web-api   Reset branch to origin 18.0                                                                                                                                                                 │
│From https://github.com/oca/wms                                                                                                                                                                                                              │
│ * branch              18.0       -> FETCH_HEAD                                                                                                                                                                                              │
│(INFO) [13:24:58] git_aggregator.repo  wms   Checking repo status                                                                                                                                                                            │
│(INFO) [13:24:58] git_aggregator.repo  web-api   Execute shell after commands                                                                                                                                                                │
│(INFO) [13:24:58] git_aggregator.repo  web-api   End aggregation of /data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/web-api                                                                                                    │
│(INFO) [13:24:58] git_aggregator.repo  wms   Reset branch to origin 18.0                                                                                                                                                                     │
│(INFO) [13:24:59] git_aggregator.repo  wms   Execute shell after commands                                                                                                                                                                    │
│(INFO) [13:24:59] git_aggregator.repo  wms   End aggregation of /data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/wms                                                                                                            │
│Addons path for your config file:  /data/data/com.termux/files/home/DEV/odoo18/odoo/links,/data/data/com.termux/files/home/DEV/odoo18/odoo/local-src,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/queue,/data/data/com.termu│
│x/files/home/DEV/odoo18/odoo/external-src/server-env,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/account-closing,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/account-consolidation,/data/data/com.termux/│
│files/home/DEV/odoo18/odoo/external-src/account-financial-reporting,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/account-financial-tools,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/account-invoicing,/da│
│ta/data/com.termux/files/home/DEV/odoo18/odoo/external-src/account-invoice-reporting,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/account-payment,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/account-reco│
│ncile,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/agreement,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/bank-payment,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/bank-statement-import,│
│/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/brand,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/commission,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/community-data-files,/data/data/co│
│m.termux/files/home/DEV/odoo18/odoo/external-src/connector,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/contract,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/credit-control,/data/data/com.termux/files/ho│
│me/DEV/odoo18/odoo/external-src/currency,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/ddmrp,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/dms,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/│
│delivery-carrier,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/helpdesk,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/hr,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/knowledge,/data/data/c│
│om.termux/files/home/DEV/odoo18/odoo/external-src/maintenance,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/mis-builder,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/odoo-usability,/data/data/com.termux/fi│
│les/home/DEV/odoo18/odoo/external-src/partner-contact,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/product-attribute,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/manufacture,/data/data/com.termux/files/h│
│ome/DEV/odoo18/odoo/external-src/purchase-workflow,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/repair,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/report-print-send,/data/data/com.termux/files/home/DEV/│
│odoo18/odoo/external-src/reporting-engine,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/rest-framework,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/sale-workflow,/data/data/com.termux/files/home/DEV/odoo1│
│8/odoo/external-src/server-auth,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/server-backend,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/server-brand,/data/data/com.termux/files/home/DEV/odoo18/odoo/exte│
│rnal-src/server-tools,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/server-ux,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/stock-logistics-barcode,/data/data/com.termux/files/home/DEV/odoo18/odoo/external│
│-src/stock-logistics-availability,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/stock-logistics-orderpoint,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/stock-logistics-warehouse,/data/data/com.termux/file│
│s/home/DEV/odoo18/odoo/external-src/stock-logistics-workflow,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/web,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/web-api,/data/data/com.termux/files/home/DEV/odo│
│o18/odoo/external-src/wms,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/social,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/timesheet,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/spreadsh│
│eet,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/account-analytic,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/margin-analysis,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/openupgrade,/d│
│ata/data/com.termux/files/home/DEV/odoo18/odoo/external-src/l10n-france,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/project,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/intrastat,/data/data/com.termux/f│
│iles/home/DEV/odoo18/odoo/external-src/mail,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/account-budgeting,/data/data/com.termux/files/home/DEV/odoo18/odoo/external-src/field-service

…ns path prefix

The hardcoded '/odoo/' prefix in ak build output is inconvenient for
installations using virtualenvs or non-standard paths (e.g. ~/DEV/odoo18).

Changes:
- Add --odoo-root CLI option to ak build
- Add AK_ODOO_ROOT environment variable support
- Priority: CLI option > env var > default '/odoo/'
- Rename PREFIX constant to DEFAULT_PREFIX for clarity
- Add tests covering all three scenarios

Usage examples:
    ak build --odoo-root ~/DEV/odoo18/
    AK_ODOO_ROOT=~/DEV/odoo18/ ak build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant