How to do it...

To create the basic skeleton for the addon module, perform the given steps:

  1. Create the directories for code files:
$ cd local-addons/my_module
$ mkdir models
$ touch models/__init__.py
$ mkdir controllers
$ touch controllers/__init__.py
$ mkdir views
$ mkdir security
$ mkdir data
$ mkdir demo
$ mkdir i18n
$ mkdir -p static/description
  
  1. Edit the module's top __init__.py file so that the code in 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
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.27.45