Book Image

Odoo 12 Development Essentials - Fourth Edition

By : Daniel Reis
Book Image

Odoo 12 Development Essentials - Fourth Edition

By: Daniel Reis

Overview of this book

Odoo is one of the best platforms for open source ERP and CRM. Its latest version, Odoo 12, brings with it new features and updates in Python packages to develop more customizable applications with additional cloud capabilities. The book begins by covering the development essentials for building business applications. You will start your journey by learning how to install and configure Odoo, and then transition from having no specific knowledge of Odoo to being ready for application development. You will develop your first Odoo application and understand topics such as models and views. Odoo 12 Development Essentials will also guide you in using server APIs to add business logic, helping you lay a solid foundation for advanced topics. As you progress through the chapters, you will be equipped to build and customize your applications and explore the new features in Odoo 12, such as cloud integration, to scale your business applications. You will get insights into building business logic and integrating various APIs into your application. By the end of the book, you will be able to build a business application from scratch by using the latest version of Odoo.
Table of Contents (22 chapters)
Title Page
Packt Upsell
Foreword
Contributors
Preface
Index

Chapter 8. Business Logic – Supporting Business Processes

In the previous chapters, we learned about the model layer, how to build the application data structures, and then how to use the ORM API to store and explore that data. In this chapter, we'll be leveraging what we learned about models and recordset handling to implement business logic patterns that are common in applications.

We'll discuss the following topics in this chapter:

  • Using stages for document centered workflows
  • The ORM method decorators; @api.multi, @api.one, and @api@model
  • On change methods, for immediate reaction to users
  • Using the ORM built-in methods, such as create, write, and unlink
  • The message and activity features, provided by the mail add-on module
  • Creating a wizard to assist users to do non-trivial actions
  • Using log messages for better system observability
  • Raising exceptions to give feedback to the user when things go wrong
  • Unit tests to automate the quality checks on your code
  • Development tools, aiding developer work, such...