Now that Odoo knows about our new module, let's start by adding to it a simple model.
Models describe business objects, such as an opportunity, a sales order, or a partner (customer, supplier, and so on.). A model has a list of attributes and can also define its specific business.
Models are implemented using a Python class derived from an Odoo template class. They translate directly to database objects, and Odoo automatically takes care of that when installing or upgrading the module.
Some consider it good practice to keep the Python files for models inside a
models subdirectory. For simplicity we won't be following that here, so let's create a
todo_model.py file in the
todo_app module main directory.
Add the following ...