Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Odoo 14 Development Cookbook
Odoo 14 Development Cookbook

Odoo 14 Development Cookbook: Rapidly build, customize, and manage secure and efficient business apps using Odoo's latest features , Fourth Edition

Arrow left icon
Profile Icon Gajjar Profile Icon Daniel Reis Profile Icon Holger Brunn Profile Icon Fayolle
Arrow right icon
NZ$14.99 NZ$93.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (7 Ratings)
eBook Dec 2020 784 pages 4th Edition
eBook
NZ$14.99 NZ$93.99
Paperback
NZ$116.99
Subscription
Free Trial
Arrow left icon
Profile Icon Gajjar Profile Icon Daniel Reis Profile Icon Holger Brunn Profile Icon Fayolle
Arrow right icon
NZ$14.99 NZ$93.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (7 Ratings)
eBook Dec 2020 784 pages 4th Edition
eBook
NZ$14.99 NZ$93.99
Paperback
NZ$116.99
Subscription
Free Trial
eBook
NZ$14.99 NZ$93.99
Paperback
NZ$116.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Odoo 14 Development Cookbook

Chapter 2: Managing Odoo Server Instances

In Chapter 1, Installing the Odoo Development Environment, we looked at how to set up an Odoo instance using only the standard core add-ons that are shipped with source. This chapter focuses on adding non-core or custom add-ons to an Odoo instance. In Odoo, you can load add-ons from multiple directories. In addition, it is recommended that you load your third-party add-ons or your own custom add-ons from separate folders to avoid conflicts with Odoo core modules. Even Odoo Enterprise Edition is a type of add-on directory, and you need to load this just like a normal add-ons directory.

In this chapter, we will cover the following recipes:

  • Configuring the add-ons path
  • Standardizing your instance directory layout
  • Installing and upgrading local add-on modules
  • Installing add-on modules from GitHub
  • Applying changes to add-ons
  • Applying and trying proposed pull requests

    About the terminology

    In this book, we will use the terms add-on or module or app or add-on module interchangeably. All of them refer to the Odoo app or Extension app that can be installed in Odoo from the user interface.

Configuring the add-ons path

With the help of the addons_path parameter, you can load your own add-on modules into Odoo. When Odoo initializes a new database, it will search for add-on modules within directories that have been provided in the addons_path configuration parameter. Odoo will search in these directories for the potential add-on module.

Directories listed in addons_path are expected to contain subdirectories, each of which is an add-on module. Following initialization of the database, you will be able to install modules that are given in these directories.

Getting ready

This recipe assumes that you have an instance ready with a configuration file generated, as described in the Storing the instance configuration in a file recipe in Chapter 1, Installing the Odoo Development Environment. Note that the source code of Odoo is available in ~/odoo-dev/odoo, and the configuration file in ~/odoo-dev/myodoo.cfg.

How to do it…

To add the ~/odoo-dev/local-addons directory to addons_path of the instance, perform the following steps:

  1. Edit the configuration file for your instance, that is, ~/odoo-dev/myodoo.cfg.
  2. Locate the line starting with addons_path=. By default, this should look like the following:
    addons_path = ~/odoo-dev/odoo/addons
  3. Modify the line by appending a comma, followed by the name of the directory you want to add to addons_path, as shown in the following code:
    addons_path = ~/odoo-dev/odoo/addons,~/odoo-dev/local-addons
  4. Restart your instance from the terminal:
    $ ~/odoo-dev/odoo/odoo-bin -c my-instance.cfg

How it works…

When Odoo is restarted, the configuration file is read. The value of the addons_path variable is expected to be a comma-separated list of directories. Relative paths are accepted, but they are relative to the current working directory and therefore should be avoided in the configuration file.

At this point, we have only listed the add-on directory in Odoo, but no add-on modules are present in ~/odoo-dev/local-addons. And even if you add a new add-on module to this directory, Odoo does not show this module in the user interface. For this, you need to perform an extra operation, as explained in the next recipe, Updating the add-on modules list.

Note

The reason behind this is that when you initialize a new database, Odoo automatically lists your custom modules in available modules, but if you add new modules following database initialization, then you need to manually update the list of available modules, as shown in the Updating the add-on modules list recipe.

There's more…

When you call the odoo-bin script for the first time to initialize a new database, you can pass the --addons-path command-line argument with a comma-separated list of directories. This will initialize the list of available add-on modules with all of the add-ons found in the supplied add-ons path. When you do this, you have to explicitly include the base add-ons directory (odoo/odoo/addons), as well as the core add-ons directory (odoo/addons). A small difference with the preceding recipe is that the local add-ons must not be empty; they must contain at least one sub-directory, which has the minimal structure of an add-on module.

In Chapter 3, Creating Odoo Add-On Modules, we will look at how to write your own modules. In the meantime, here's a quick hack to produce something that will make Odoo happy:

$ mkdir -p ~/odoo-dev/local-addons/dummy
$ touch ~/odoo-dev/local-addons/dummy/  init  .py
$ echo '{"name": "dummy", "installable": False}' > \
~/odoo-dev/local-addons/dummy/  manifest  .py

You can use the --save option to save the path to the configuration file:

$ odoo/odoo-bin -d mydatabase \
--add-ons-path="odoo/odoo/addons,odoo/addons,~/odoo-dev/local-addons"
\
--save -c ~/odoo-dev/my-instance.cfg --stop-after-init

In this case, using relative paths is OK, since they will be converted into absolute paths in the configuration file.

Note

Since Odoo only checks directories in the add-ons path for the presence of add-ons when the path is set from the command line, not when the path is loaded from a configuration file, the dummy module is no longer necessary. You may, therefore, remove it (or keep it until you're sure that you won't need to create a new configuration file).

Left arrow icon Right arrow icon
Download code icon Download Code

Description

With its latest iteration, the powerful Odoo framework released a wide variety of features for rapid application development. This updated Odoo development cookbook will help you explore the new features in Odoo 14 and learn how to use them to develop Odoo applications from scratch. You'll learn about the new website concepts in Odoo 14 and get a glimpse of Odoo's new web-client framework, the Odoo Web Library (OWL). Once you've completed the installation, you'll begin to explore the Odoo framework with real-world examples. You'll then create a new Odoo module from the ground up and progress to advanced framework concepts. You'll also learn how to modify existing applications, including Point of Sale (POS) applications. This book isn't just limited to backend development; you'll discover advanced JavaScript recipes for creating new views and widgets. As you progress, you'll learn about website development and become a quality Odoo developer by studying performance optimization, debugging, and automated testing. Finally, you'll delve into advanced concepts such as multi-website, In-App Purchasing (IAP), Odoo.sh, the IoT Box, and security. By the end of the book, you'll have all the knowledge you need to build impressive Odoo applications and you'll be well versed in development best practices that will come in handy when working with the Odoo framework.

What you will learn

  • Build beautiful websites with Odoo CMS using dynamic building blocks
  • Get to grips with advanced concepts such as caching, prefetching, debugging
  • Modify backend JavaScript components and POS applications with the new OWL framework
  • Connect and access any object in Odoo via Remote Procedure Calls (RPC)
  • Manage, deploy, and test an Odoo instance with Odoo.sh
  • Configure IoT Box to add and upgrade Point of Sale (POS) hardware
  • Find out how to implement in-app purchase services

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 24, 2020
Length: 784 pages
Edition : 4th
Language : English
ISBN-13 : 9781800204775
Vendor :
Odoo S.A
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Dec 24, 2020
Length: 784 pages
Edition : 4th
Language : English
ISBN-13 : 9781800204775
Vendor :
Odoo S.A
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just NZ$7 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just NZ$7 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total NZ$ 250.97
Odoo 14 Development Cookbook
NZ$116.99
Designing Professional Websites with Odoo Website Builder
NZ$64.99
Odoo 15 Development Essentials
NZ$68.99
Total NZ$ 250.97 Stars icon
Banner background image

Table of Contents

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

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(7 Ratings)
5 star 71.4%
4 star 0%
3 star 14.3%
2 star 14.3%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




N/A Jan 24, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Feefo Verified review Feefo
Eric Vernichon Oct 17, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Feefo Verified review Feefo
Shambazov Jan 05, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
There is an obvious shortage of books on CRM systems. This is sad, because in our days the CRM market has been experiencing shocks and new players are emerging. In particular, there is a lack of books devoted to Odoo, so for example Odoo 13 was left without attention of major publishers. For this reason, the release of a new book is already an event.I have been waiting for this book for a long time and with impatience. As expected, it contains a lot of useful information. The quality of the selection of the material shows that the authors are practicing professionals and shared the solution to those issues that they themselves faced. The book is full of healthy recipes.Below I will write what thoughts I had while studying the book:Good thing there is a section on sitemaps.In section 9 - Backend views, it would be nice to add more illustrations of how the various views looks. This would help to choose the right one. For example, fig. 9.3 was a revelation for me, I did not know that this could be done.I was especially pleased with the recipe for redirecting old URLs. This must be paid attention to if you are creating a site on Odoo instead of an existing one, in order to exclude a failure in SEO.Another interesting recipe is "Generating videos / screenshots for failed test cases". Such an idea would not have occurred to me!The section on performance optimization is qute interesting. Basically, Odoo is fast enough even on weak machines. Before I used to use Nginx tools to further speed up Odoo.My wishes for the publishing house:Unfortunately, in the electronic version of the book, tables are presented as images. The problem is search doesn't work inside images and it can be difficult to find what readers needs.Another problem of the electronic version is that sometimes you come across unnecessary spaces in the command lines (for example, page 62), so you need to be careful when copying them from the book.Overall, the book is certainly useful and I will keep the book handy in my daily work.Who should I recommend this book to - someone who already knows the basics of working in Odoo. For beginners, I would advise you to wait until "Odoo 14 Development Essentials" is released. Cookbooks are not intended for beginners, they are a collection of recipes for solving practical problems. Moreover, it is intended specifically for developers. If you only use standard functionality, then much of the valuable information in this book will not be so useful to you.I look forward to the release of Odoo 14 Development Essentials.Thanks to Pack publishing for regularly publishing books about Odoo.
Amazon Verified review Amazon
Ray Carnes Jan 05, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
What I liked:Scope - the technical topics covered are the ones most developers will want to know about.Detail - lots of explanatory text and examples.Examples - you can develop your own module and access a GitHub repository to check your workAuthors - Daniel, Holger and Alexandre are well known and long time Community members so you are hearing from expertsWhat I didn't:Terms - some are not explained until AFTER they are introduced and this might trip up less knowledgeable DevOps folksWhy - the why behind the best practices isn't always explained - some may find this leaves them needing to research a topic in more detail on their ownScreenshots - when covering Backend Views there could be a lot more to convey how these workMobile - basically not coveredUp to Date - multi_edit is not covered (new at v14) so readers might want to review other resources to check they are fully up to date with what is available in this version.Still highly recommend the book!
Amazon Verified review Amazon
Cliente Amazon May 25, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
para poder realizar con efectividad y rapidez mi teletrabajo
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.