MODULE LICENSING DETAILS
Format
-
Singular form
in the module name recommended -
Can use “multi”. Do not use plural forms(i.e., mrp_operations_..)
-
Base modules - prefix with base_ (i.e., base_location_..)
-
Localization module - prefix with l10n_CC_, (CC is Country Code) (i.e., l10n_us_..)
-
Extending a module – prefix yours with that module name (i.e., mail_forward)
-
Combining ODOO module with another form of OCA (like OCA partner name) – crm_partner_firstname, where;
-
-
CRM belongs to ODOO
-
partner_firstname belongs to OCA
-
-
Use description template, remove sections with no meaningful content
-
Don't use company logo or any kind of corporate branding
Version Number
The version number in the manifest file is the ODOO major version (i.e., 8.0). It is further followed by the module version numbers in the form of x.y.z that follows the semantics breaking.feature.fix.
Example – 8.0.1.0.0, where:
-
8.0 is the module
-
x increments when data model or views had significant changes. It may need data migration or be depending on the modules, it might change
-
y increments when any non-breaking features are added. Majorly during module upgrade
-
z increments when the bugfixes are made. Server restart is needed to fix the bugs
The breaking changes must include instructions or scripts for performing the successful migration on current installations if needed.
Directories
Modules are organized within some directories:
-
controllers/ : contains controllers (http routes)
-
models/ : model definitions
-
data/ : data xml
-
views/ : contains the views and templates an Qweb report print templates
-
static/ : contains the web assets, separated into css/, js/, img/, lib/
-
demo/ : demo xml
-
examples/ : external files
-
wizards/ : wizard model and views
-
report/ : reporting models (BI/analysis), Webkit/ RML print report templates
File Naming
Created or inherited files need to be split for models, views and data declarations. These are named after model.
Example: res.partner file;
-
The demo data should be with a file named demo/res_partner.xml
-
The view data should go with a file named views/res_partner.xml
The Exception is allowed when the model is a model intended and going to be used as one2many model nested on the main model. In such case, you may include model definition inside it;
For the model named <main_model>, following files may be created:
-
models/<main_model>.py
-
data/<main_model>.xml
-
demo/<main_model>.xml
-
views/<main_model>.xml
-
templates/<main_model>.xml