To create the basic skeleton for the add-on module, perform the following steps:
- Create the directories for code files:
$ cd local-addons/my_library $ mkdir models $ touch models/__init__.py $ mkdir controllers $ touch controllers/__init__.py $ mkdir views $ mkdir security $ mkdir data $ mkdir demo $ mkdir i18n
- Edit the module's top __init__.py file so that the code in the subdirectories is loaded:
from . import models from . import controllers
This should get us started with a structure containing the most used directories, similar to this one:
. ├── __init__.py ├── __manifest__.py │ ├── controllers │ └── __init__.py ├── data
├── demo
├── i18n
├── models
│ └── __init__.py
├── security
├── static
│ └── description
└── views