Creating a new module
Our module will be a very simple application to keep to-do tasks. These tasks will have a single text field, for the description, and a checkbox to mark them as complete. We will also have a button to clean the to-do list from the old completed tasks.
These are very simple specifications, but throughout the book we will gradually add new features to it, to make it more interesting for the users.
Enough talk, let's start coding and create our new module.
Following the instructions in Chapter 1, Getting Started with Odoo Development, we should have the Odoo server at /odoo-dev/odoo
/. To keep things tidy, we will create a new directory alongside it to host our custom modules:
$ mkdir ~/odoo-dev/custom-addons
An Odoo module is a directory containing an __openerp__.py
descriptor file. This is still a legacy from when Odoo was named OpenERP, and in the future is expected to become __odoo__.py
.
It also needs to be Python importable, so it must also have an __init__.py
file.
The...