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 3


  1. Is library-app a valid module name?

It is a technically valid name, so it could be used, but it does not comply with the code conventions for Odoo, so it shouldn't be used.

  1. Should a module define access control (ACL) for all Models defined in it?

Yes, as a general rule it should. Leaving a Model with no ACLs makes it inaccessible for the end users.

  1. Can we permit some users to only access a subset of the records in a Model?

Yes, Record Rules allow us to define a Domain filter, and assign it to security Groups. Users in those Groups will only be able to access the records matching the Domain filter.

  1. What is the difference between a relational field and other field types?

Relational fields store links to other records, not actual values like the other field types.

  1. What are the main view components used in an Odoo app?

The backend view layer includes menu items, window actions, and views. All these are defined using XML data files. Menu items are usually defined with <menuitem> data elements, <action> defines Window Actions, and <record model="ir.ui.view"> defines views.

  1. How are backend views defined?

A backend view is defined with an XML architecture declaring the structure of the elements it is composed of.

  1. Where should business logic be implemented in an Odoo app?

A module business logic should be implemented in the Model methods, using Python code.

  1. What is the web page templating engine used by Odoo?

For the website/frontend views, Odoo uses the QWeb, an XML-based template engine. It allows templates to be extended by other modules, just like what can be done with the backend views.