-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Odoo 11 Development Cookbook - Second Edition - Second Edition
By :
Relations between Odoo Models are represented by relational fields. We can have three different types of relations:
Looking at the Library Books example, we can see that each book can have one publisher, so we can have a many-to-one relation between books and publishers.
From the publisher's point of view, each publisher can have many books. So, the previous many-to-one relation implies a one-to-many reverse relation.
Finally, there are cases where we can have a many-to-many relation. In our example, each book can have several (many) authors. Also, inversely, each author can have written many books. Looking at it from either side, this is a many-to-many relation.
We will reuse the my_module addon module from Chapter 4,Creating Odoo Addon Modules.
Odoo uses the Partner model, res.partner, to represent persons, organizations...