skip to content
ccdocs

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 scaffold

Arguments

ArgumentDescription
nameModule name. Prompted interactively if omitted.

Flags

FlagDescription
-f, --forceOverwrite an existing module directory without prompting
-m MODELS, --models MODELSOne or more model names to scaffold (e.g. sale.order, res.partner). Interactive picker if omitted.

What It Does

  1. Resolves the active project + version (must have an active env — run cc switch first)
  2. Prompts for module name if not given
  3. Optionally lets you pick existing Odoo models to scaffold from (autocomplete-backed by models.search([]) for the active version)
  4. Picks a module template from CC's template library (prompts if multiple are available)
  5. Runs odoo-bin scaffold -t <template> <name> <project_path> from the active version's odoo-bin
  6. 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-bin discoverable under the active version's path
  • At least one module template available in CC's template config

On this page