How to Create a Custom Module in Odoo 19 Using Scaffold Command (Step-by-Step Guide)
How to Create a Custom Module in Odoo 19 Using Scaffold Command (Step-by-Step Guide)
If you are starting your journey in Odoo development, one of the first things you must learn is how to create a custom module. In Odoo, every feature is built as a module — whether it’s Sales, Inventory, Accounting, or your own custom functionality.
In this tutorial, you will learn:
What the scaffold command is in Odoo
How to create a custom module in Odoo 19
Understanding the generated folder structure
This guide is beginner-friendly and practical.
What is the Scaffold Command in Odoo?
The scaffold command is a built-in command provided by Odoo that automatically generates the basic folder structure of a new module.
Instead of manually creating folders like:
models
views
controllers
security
Odoo creates everything for you in seconds.
This saves time and ensures your module follows Odoo’s development standards.
Prerequisites Before Creating a Module
Before running the scaffold command, make sure you have:
Odoo 19 installed
Python installed
A running database server like PostgreSQL
Custom addons path configured in your Odoo configuration file
Your custom addons folder might look like:
/odoo-19.0/custom_addons/
Make sure this path is added in your odoo.conf file:
--addons_path = addons,custom_addons
Step-by-Step Guide to Create Module Using Scaffold
Now let’s create a module called:
your_module_name
Step 1: Navigate to Odoo Directory
Open your terminal and go to your Odoo project directory:
cd /path/to/odoo-19
Make sure you can see:
odoo-bin
addons/
Step 2: Run the Scaffold Command
Now run:
python odoo-bin scaffold your_module_name custom_addons/
Explanation:
odoo-bin → Main Odoo executable file
scaffold → Command to generate module
shop_inventory → Your module name
custom_addons/ → Folder where module will be created
Generated Folder Structure
Your newly created module will look like this:
your_module_name/
├── __init__.py
├── __manifest__.py
├── controllers/
├── models/
├── views/
├── security/
└── static/
Why Scaffold Command is Important for Beginners
The scaffold command:
Saves development time
Creates correct structure
Reduces folder mistakes
Follows Odoo standards
Every Odoo developer starts with a scaffold when creating a new custom module.
Conclusion
Creating a custom module in Odoo 19 using the scaffold command is the first step toward mastering Odoo development.
In this tutorial, you learned:
What scaffold command does
How to create a module
Folder structure
If you are serious about becoming an Odoo developer, practice by:
Creating multiple sample modules
Adding custom models
Creating form and tree views
Implementing security access
This is how you build strong technical skills in Odoo.



Comments
Post a Comment