Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Odoo 12 Development Cookbook - Third Edition

You're reading from  Odoo 12 Development Cookbook - Third Edition

Product type Book
Published in Apr 2019
Publisher Packt
ISBN-13 9781789618921
Pages 774 pages
Edition 3rd Edition
Languages
Authors (4):
Parth Gajjar Parth Gajjar
Profile icon Parth Gajjar
Alexandre Fayolle Alexandre Fayolle
Profile icon Alexandre Fayolle
Holger Brunn Holger Brunn
Profile icon Holger Brunn
Daniel Reis Daniel Reis
Profile icon Daniel Reis
View More author details

Table of Contents (26) Chapters

Preface 1. Installing the Odoo Development Environment 2. Managing Odoo Server Instances 3. Server Deployment 4. Creating Odoo Add-On Modules 5. Application Models 6. Basic Server-Side Development 7. Module Data 8. Debugging 9. Advanced Server-Side Development Techniques 10. Backend Views 11. Access Security 12. Internationalization 13. Automation, Workflows, and Printouts 14. Web Server Development 15. CMS Website Development 16. Web Client Development 17. In-App Purchasing with Odoo 18. Automated Test Cases 19. Managing, Deploying, and Testing with Odoo.sh 20. Remote Procedure Calls in Odoo 21. Performance Optimization 22. Point of Sale 23. Manage Emails in Odoo 24. IoT Box 25. Other Book You May Enjoy

Adding relational fields to a model

Relations between Odoo models are represented by relational fields. There are three different types of relations:

  • many-to-one, commonly abbreviated as m2o
  • one-to-many, commonly abbreviated as o2m
  • many-to-many, commonly abbreviated as m2m

Looking at the Library Books example, we can see that each book can only have one publisher, so we can have a many-to-one relation between books and publishers.

Each publisher, however, can have many books. So, the previous many-to-one relation implies a one-to-many reverse relation.

Finally, there are cases in which we can have a many-to-many relation. In our example, each book can have several (many) authors. Also, inversely, each author may have written many books. Looking at it from either side, this is a many-to-many relation.

...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}