cc new
Scaffold a new Odoo module inside the active project using odoo-bin scaffold.
Usage
cc new # interactive: prompts for name
cc new my_module # scaffold my_module in the active project
cc new my_module -f # overwrite without confirming
cc new my_module -m sale.order # pre-seed models to scaffoldArguments
| Argument | Description |
|---|---|
name | Module name. Prompted interactively if omitted. |
Flags
| Flag | Description |
|---|---|
-f, --force | Overwrite an existing module directory without prompting |
-m MODELS, --models MODELS | One or more model names to scaffold (e.g. sale.order, res.partner). Interactive picker if omitted. |
What It Does
- Resolves the active project + version (must have an active env — run
cc switchfirst) - Prompts for module name if not given
- Optionally lets you pick existing Odoo models to scaffold from (autocomplete-backed by
models.search([])for the active version) - Picks a module template from CC's template library (prompts if multiple are available)
- Runs
odoo-bin scaffold -t <template> <name> <project_path>from the active version'sodoo-bin - Writes the module into the active project path
The module is created inside active_project.path, so make sure the active environment points where you want the module to land.
Requirements
- An active project with a configured version
odoo-bindiscoverable under the active version's path- At least one module template available in CC's template config