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

Adding module data


Modules use data files to load their default data, demonstration data, user interface definitions, and other configurations into the database. For this, we can use both CSV and XML files.

Note

Changes in Odoo12The YAML file format was also supported until Odoo 11, and was removed in Odoo 12. Still, for a usage example, you can look at the l10n_be official module in Odoo 11, and for information on the YAML format, you can visit http://yaml.org/.

CSV files used by modules are exactly the same as those we have seen and used for the import feature. When using them in modules, the filename must match the name of the model to which the data will be loaded. For example, a CSV file loading data into the library.book model must be named library.book.csv.

A common usage of data CSV files is for accessing security definitions that have been loaded into the ir.model.access model. They usually use CSV files in a security/ subdirectory, named ir.model.access.csv.

Demonstration data

Odoo add...