Skip to main content

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.

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

  1. Module Name: The technical name for your module (e.g., my_custom_module)
  2. Use Defaults?: Skip most questions with smart defaults
  3. Odoo Version: Choose between 19.0, 18.0, or 17.0
  4. 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

Odoo PS Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odoo_scaffolder-0.1.0.tar.gz (148.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odoo_scaffolder-0.1.0-py3-none-any.whl (148.1 kB view details)

Uploaded Python 3

File details

Details for the file odoo_scaffolder-0.1.0.tar.gz.

File metadata

  • Download URL: odoo_scaffolder-0.1.0.tar.gz
  • Upload date:
  • Size: 148.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for odoo_scaffolder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c0804ce3ce4a2cd76e7aacc3a0b618dcd0140dc26aeb2a48175b2d2bc08190e5
MD5 e64af239594268dae94aeaf1649ad158
BLAKE2b-256 12b87476f9fe0f776fcd83af74b57bdba506e86feb0b8309e788ef5d81df352e

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_scaffolder-0.1.0.tar.gz:

Publisher: publish.yml on a-abuzahra/odoo-scaffolder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file odoo_scaffolder-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_scaffolder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00eb5453451c81ce810422a6f38e2bfa92cca8404f8ed2768f4baa745b4769df
MD5 9b9803657ed407ee056e1e217e97d020
BLAKE2b-256 8f9b0999c670b166302bf9cccadc19b9a0ff38bca58ac8aa0b21211efad58fa8

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_scaffolder-0.1.0-py3-none-any.whl:

Publisher: publish.yml on a-abuzahra/odoo-scaffolder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page