Reader small image

You're reading from  Odoo 15 Development Essentials - Fifth Edition

Product typeBook
Published inFeb 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781800200067
Edition5th Edition
Languages
Tools
Right arrow
Author (1)
Daniel Reis
Daniel Reis
author image
Daniel Reis

Daniel Reis has a degree in applied mathematics and an MBA. He has had a long career in the IT industry, mostly as a consultant implementing business applications in a variety of sectors. He has been working with Odoo (OpenERP at the time) since 2010 and is an active contributor to the Odoo Community Association (OCA), where he also serves as a board member. He is the managing director of Open Source Integrators, a leading open source and Odoo consultancy firm.
Read more about Daniel Reis

Right arrow

Preface

Odoo is a full-featured open source platform to build applications. Based on this core framework, a suite of integrated applications was built, covering all business areas from CRM and sales to inventory and accounting.

Beyond these out-of-the-box features, Odoo is an application development framework built with extensibility in mind. Extensions and modifications can be implemented as modules, to be applied over the module with the feature being changed. This avoids editing the original feature code and provides clean and easy-to-control customized applications.

This capability to combine several modules into feature-rich applications, along with the open source nature of Odoo, are important factors that explain the community that grew around Odoo. In fact, there are thousands of community modules available for Odoo, covering virtually every topic.

Odoo 15 Development Essentials provides a step-by-step guide to Odoo development, allowing you to quickly climb the learning curve and become productive on the Odoo application platform. At the same time, it provides good reference materials, to be kept nearby every time you are working with Odoo.

Who this book is for

This book was written keeping in mind developers with minimal programming knowledge but a strong will to learn. The Odoo server is implemented in Python, and basic knowledge of Python programming is expected before getting started with the book. The main platform used to run Odoo is an Ubuntu/Debian system, but little previous knowledge on it is assumed. The code examples are kept simple and clear, and they are accompanied by appropriate explanations to help build up knowledge on them.

Teachers, trainers, and Odoo development managers will also find the book useful for helping their students or trainees to learn Odoo development skills.

Experienced developers, already familiar with Odoo, should also be able to benefit from this book. Not only does it consolidate their knowledge, but it also provides an easy way to get up to date with all the details that changed in the last Odoo versions, which are highlighted whenever the changes are significant.

Finally, this book should provide a solid reference to be used daily, both by newcomers and experienced developers. The documentation of the relevant differences between the several Odoo versions should also be a good resource for any developer working with different Odoo versions at the same time or porting modules to other versions.

What this book covers

Chapter 1, Quick Start Using the Developer Mode, visually introduces the Odoo development concepts, creating an Odoo application directly from the user interface – a simple to-do tracking application. Instructions are given to get Odoo working on the work machine, but an existing Odoo installation, or an Odoo.com instance, can be used, so no local setup is required.

Chapter 2, Preparing the Development Environment, explains how to install Odoo from source code, and how to set up the development environment to be used throughout the book. We choose to install Odoo in an Ubuntu environment, and under Windows 10 the Windows Subsystem for Linux (WSL) can be used to achieve this.

Chapter 3, Your First Odoo Application, provides a step-by-step guide through the creation of our first Odoo module, a book catalog for a library app. While the example is kept simple, it covers all the different layers and components that can be involved in an Odoo application: models, business logic, backend views, and web frontend views.

Chapter 4, Extending Modules, explains the available inheritance mechanisms and how to use them to create extension modules, adding or modifying features from other existing add-on modules.

Chapter 5, Importing, Exporting, and Module Data, addresses the usage of data files in Odoo, and their role in modules to load data and configurations to the database. It covers the XML and CSV data file formats, the external identifier concept, how to use data files in modules, and data import/export operations.

Chapter 6, Models – Structuring the Application Data, discusses the model layer in detail, introducing the framework's Object-Relational Mapping (ORM), the different types of models available, and the field types, including relational and computed fields.

Chapter 7, Recordsets – Working with Model Data, introduces ORM concepts and features, how to query and browse data from models, how to manipulate recordsets, and how to write changes to model data.

Chapter 8, Business Logic – Supporting Business Processes, explores programming business logic on the server side to manipulate data and implement specific business rules. It also explains how to use wizards for more sophisticated user interaction. The built-in social features – messages, chatter, followers, and channels – are addressed, as well as testing and debugging techniques.

Chapter 9, External API – Integrating with Other Systems, shows how to implement Odoo external applications by implementing a command-line client that interacts with our Odoo server. There are several alternative client programming libraries available, which are introduced and used to implement our showcase client utility.

Chapter 10, Backend Views – Designing the User Interface, covers the web client's View layer, explaining the several types of views in detail and all the elements that can be used to create dynamic and intuitive user interfaces.

Chapter 11, Kanban Views and Client-Side QWeb, continues working with the web client, but introduces Kanban views and explains the QWeb templates used to design the Kanban board elements.

Chapter 12, Creating Printable PDF Reports with Server-Side QWeb, discusses using the QWeb-based report engine and everything needed to generate printer-friendly PDF reports.

Chapter 13, Creating Web and Portal Frontend Features, introduces Odoo website development, including web controller implementations and using QWeb templates to build frontend web pages.

Chapter 14, Understanding Odoo Built-In Models, provides an overview of the models provided by the Odoo base module, such as Partners, Users, and the Models and Fields definitions.

Chapter 15, Deploying and Maintaining Production Instances, shows how to prepare a server for production prime time, explaining what configuration should be taken care of and how to configure an nginx reverse proxy for improved security and scalability.

To get the most out of this book

Other than being familiar with programming, no particular knowledge is expected to be able to take advantage of this book.

Odoo is built using the Python programming language, so it is a good idea to have solid knowledge of it. We also chose to run Odoo on an Ubuntu host and will do some work on the command line, so it will help to be familiar with it.

To get the most out of this book, we recommend that you find complementary readings on the Python programming language, the Ubuntu/Debian Linux operating system, and the PostgreSQL database.

While we will run Odoo on an Ubuntu host (a popular cloud hosting option), we will provide guidance on how to set up our development environment on a Windows system using the WSL, available in Windows 10. Of course, working from an Ubuntu/Debian native system is also a good choice.

All the required software is freely available, and the instructions on where to find it will be given in the book's initial chapters.

Note

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book's GitHub repository (a link is provided in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Odoo-15-Development-Essentials. If there's an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781800200067_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "At the top of the list, we can see the library_app.action_library_book complete identifier."

A block of code is set as follows:

"id","name"
"__export__.res_partner_43_f82d2ecc","Alexandre Fayolle"
"__export__.res_partner_41_30a5bc3c","Daniel Reis"
"__export__.res_partner_44_6be5a130","Holger Brunn"
"__export__.res_partner_42_38b48275","Packt Publishing"

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

"id","name","date_published","publisher_id/id","author_ids/id"
library_book_ode11,"Odoo Development Essentials 11","2018-03-01",res_partner_packt,res_partner_daniel library_book_odc11,"Odoo 11 Development Cookbook","2018-01-01",res_partner_packt,"res_partner_alexandre,res_partner_holger"

Any command-line input or output is written as follows:

$ sudo apt install git python3-dev python3-pip \
python3-wheel python3-venv -y

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: "Bank data can be browsed at the Contacts | Configuration | Bank Accounts | Banks menu option."

Tips or Important Notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at customercare@packtpub.com and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you've read Odoo 15 Development Essentials, we'd love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we're delivering excellent quality content.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Odoo 15 Development Essentials - Fifth Edition
Published in: Feb 2022Publisher: PacktISBN-13: 9781800200067
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.
undefined
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 €14.99/month. Cancel anytime

Author (1)

author image
Daniel Reis

Daniel Reis has a degree in applied mathematics and an MBA. He has had a long career in the IT industry, mostly as a consultant implementing business applications in a variety of sectors. He has been working with Odoo (OpenERP at the time) since 2010 and is an active contributor to the Odoo Community Association (OCA), where he also serves as a board member. He is the managing director of Open Source Integrators, a leading open source and Odoo consultancy firm.
Read more about Daniel Reis