A modern scaffolding tool for creating Odoo modules with best practices
Project description
Odoo Scaffolder
A modern, interactive scaffolding tool for creating Odoo modules with best practices. Inspired by Next.js's beautiful CLI interface.
Current Status: Beta - Fully functional with ongoing improvements. Feedback and issue reports welcome!
Features
- Interactive CLI: Beautiful terminal interface with arrow key navigation
- Smart Defaults: Quick setup with sensible defaults or customize everything
- Best Practices: Follows Odoo module structure conventions
- Category Icons: Automatically downloads category-specific icons
- Pre-commit Support: Optional pre-commit hooks with ruff, black, isort, pylint, and eslint
- Flexible Structure: Choose what to include (tests, security, controllers, etc.)
Installation
From PyPI (once published)
pip install odoo-scaffolder
From Source
git clone https://github.com/a-abuzahra/odoo-scaffolder.git
cd odoo-scaffolder
pip install -e .
Usage
Simply run the command and follow the interactive prompts:
odoo-scaffolder
What You'll Be Asked
- Module Name: The technical name for your module (e.g.,
my_custom_module) - Use Defaults?: Skip most questions with smart defaults
- Odoo Version: Choose between 19.0, 18.0, or 17.0
- Category: Select from Accounting, HR, Base, Inventory, Sales, PoS, Manufacturing, Services, or Website
If you choose not to use defaults, you'll also be asked about:
- Demo data
- Tests
- Security files
- Reports
- Controllers
- Data directory
- Static/src directory (for JS/CSS assets)
- Module icon
- Pre-commit hooks
Module Structure
The scaffolder creates a standard Odoo module structure:
my_module/
├── __init__.py
├── __manifest__.py
├── models/
│ └── __init__.py
├── views/
├── security/ # Optional
│ └── ir.model.access.csv
├── controllers/ # Optional
│ └── __init__.py
├── data/ # Optional
├── demo/ # Optional
├── tests/ # Optional
│ └── __init__.py
├── reports/ # Optional
│ └── __init__.py
├── static/
│ ├── description/ # Optional (with icon)
│ │ └── icon.png
│ └── src/ # Optional (for JS/CSS)
└── .pre-commit-config.yaml # Optional
Icons
The scaffolder includes bundled category-specific icons that are automatically copied to your module when you choose to include an icon. Icons are stored in the odoo_scaffolder/icons/ directory and are distributed with the package.
Defaults
When using defaults, the following are included:
- ✅ Tests
- ✅ Security files
- ✅ Module icon
- ✅ Pre-commit hooks
- ❌ Demo data
- ❌ Reports
- ❌ Controllers
- ❌ Data directory
- ❌ Static/src directory
Pre-commit Hooks
When enabled, the scaffolder creates a .pre-commit-config.yaml with:
- ruff: Fast Python linter
- black: Code formatter
- isort: Import sorter
- pylint: Code analyzer
- eslint: JavaScript linter
To use pre-commit hooks after scaffolding:
cd my_module
pip install pre-commit
pre-commit install
Requirements
- Python 3.7+
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
Ammar Abu Zahra
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odoo_scaffolder-0.1.1.tar.gz.
File metadata
- Download URL: odoo_scaffolder-0.1.1.tar.gz
- Upload date:
- Size: 149.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6663845d9e936603d6a58f265b0579010c42ec586080cefd302ecdbf31fe5c5
|
|
| MD5 |
7795cfa97c4655fdb7e41c391f37d6c9
|
|
| BLAKE2b-256 |
acad716049c48b69ec6ed142628fea7f4bc97001f20da3813b14677b47e30d73
|
Provenance
The following attestation bundles were made for odoo_scaffolder-0.1.1.tar.gz:
Publisher:
publish.yml on a-abuzahra/odoo-scaffolder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odoo_scaffolder-0.1.1.tar.gz -
Subject digest:
b6663845d9e936603d6a58f265b0579010c42ec586080cefd302ecdbf31fe5c5 - Sigstore transparency entry: 752617956
- Sigstore integration time:
-
Permalink:
a-abuzahra/odoo-scaffolder@5e37c57f80decf522b4f1ca43e0a8446894ec333 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/a-abuzahra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5e37c57f80decf522b4f1ca43e0a8446894ec333 -
Trigger Event:
release
-
Statement type:
File details
Details for the file odoo_scaffolder-0.1.1-py3-none-any.whl.
File metadata
- Download URL: odoo_scaffolder-0.1.1-py3-none-any.whl
- Upload date:
- Size: 148.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
514db098b2b53d72ff274a4170626c41cf9d6459bd1f031ec34056adc5d85488
|
|
| MD5 |
3081e82ac8039adcd4158dfe83fa9866
|
|
| BLAKE2b-256 |
24ac02e5c6914af78c0a678526ef6941f749b791ba36adae0b7c726881659b6a
|
Provenance
The following attestation bundles were made for odoo_scaffolder-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on a-abuzahra/odoo-scaffolder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odoo_scaffolder-0.1.1-py3-none-any.whl -
Subject digest:
514db098b2b53d72ff274a4170626c41cf9d6459bd1f031ec34056adc5d85488 - Sigstore transparency entry: 752617976
- Sigstore integration time:
-
Permalink:
a-abuzahra/odoo-scaffolder@5e37c57f80decf522b4f1ca43e0a8446894ec333 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/a-abuzahra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5e37c57f80decf522b4f1ca43e0a8446894ec333 -
Trigger Event:
release
-
Statement type: