Odoo 19 Scaffold Folder Structure Explained: Complete Guide for Developers
Odoo 19 Scaffold Folder Structure Explained: Complete Guide for Developers
Introduction
When developing a custom module in Odoo 19, the first step is usually running the scaffold command. This automatically generates a ready-to-use module structure. Understanding this folder structure is essential for clean, scalable module development.
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.
Generated Folder Structure
Your newly created module will look like this:
your_module_name/
├── __init__.py
├── __manifest__.py
├── controllers/
├── models/
├── views/
├── security/
└── static/
1. init.py
This file initializes the Python module.
It tells Odoo which Python files should be loaded.
Example:
from . import models
2. manifest.py
This is the most important file in your module.
It contains:
Module name
Version
Author
Dependencies
Data files
Installable status
Example structure:
{
'name': 'Shop Inventory',
'version': '1.0',
'depends': ['base'],
'data': [],
'installable': True,
}
Without this file, Odoo will not recognize your module.
3. models/
This folder contains Python files where you define:
Database models
Fields
Business logic
Example file:
models/handmade_product.py
4. views
This folder contains XML files for:
Form views
Tree views
Menu items
Actions
Odoo uses XML to design user interface.
5. security/
This folder contains:
ir.model.access.csv
This file controls who can:
Read
Write
Create
Delete records
Security is very important in Odoo module development.
6. controllers/
Used mainly for:
Website modules
Web routes
HTTP controllers
If you are building backend modules only, you may not use this much initially.
7. static/
Used for:
CSS
JavaScript
Images
Especially useful for frontend customization.
How to Install the Created Module in Odoo
After creating the module, follow these steps:
Step 1: Restart Odoo Server
If you are using Pycharm, Run the Configuration file.
odoo.conf
Step 2: Activate Developer Mode
Go to Settings
Click “Activate Developer Mode”
Step 3: Update Apps List
Go to Apps
Click “Update Apps List”
Step 4: Search Your Module
Search:
Shop Inventory
Click Activate.
Your custom module is now installed successfully
Common Errors While Using Scaffold Command
Here are common mistakes beginners make:
1. Wrong Addons Path
If module does not appear in Apps, check:
addons_path
in your config file (odoo.conf)
2. Permission Denied
If you get permission error, run:
chmod -R 755 custom_addons/
3. Module Not Visible
Make sure:
installable: True in manifest
No syntax errors
Server restarted
Conclusion
Understanding the Odoo 19 scaffold folder structure is the foundation of successful module development. Once you clearly know the purpose of each generated file and directory, building clean, scalable, and maintainable custom modules becomes much easier.
The scaffold command is not just a shortcut — it sets the standard structure that every professional Odoo developer should follow.
In the next blog, we’ll dive deeper into the __manifest__.py file in Odoo 19 — explaining every key, dependency, and configuration option in detail.
Stay tuned and continue your journey toward mastering Odoo 19 development.



Comments
Post a Comment