How to do it...
As an example, for this chapter, we will create a small add-on module for managing a list of the books for the library.
The following steps will create and install a new add-on module:
- Change the working directory in which we will work and create the add-ons directory where our custom module will be placed:
$ cd ~/odoo-dev $ mkdir local-addons
- Choose a technical name for the new module and create a directory with that name for the module. For our example, we will use
my_library
:$ mkdir local-addons/my_library
A module's technical name must be a valid Python identifier. It must begin with a letter, and only contain letters, numbers, and underscore characters. It is preferable that you only use lowercase letters in the module name.
- Make the Python module importable by adding an
__init__.py
file:$ touch local-addons/my_library/__init__.py
- Add a minimal module manifest for Odoo to detect it as an add-on module. Inside the
my_library...