Module structure in Odoo
Directories
A module is organized in important directories. Those contain the business logic; having a look at them should make you understand the purpose of the module.
- data/ : demo and data xml. Contain file data demo or file data record of models in odoo.
- models/ : models definition. Contain all models is Model, AbstractModel, BaseModel (the trust, AbstractModel is BaseModel, Model is inherited BaseModel)
- controllers/ : contains controllers (HTTP routes)
- views/ : contains the views and templates. Contain file views of models, templates view.
- static/ : contains the web assets, separated into css/, js/, img/, lib/, …
Other optional directories compose the module.
- wizard/ : regroups the transient models (
TransientModel
) and their views - report/ : contains the printable reports and models based on SQL views. Python objects and XML views are included in this directory
- tests/ : contains the Python tests