Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Odoo 11 Development Essentials
Odoo 11 Development Essentials

Odoo 11 Development Essentials: Develop and customize business applications with Odoo 11 , Third Edition

eBook
€8.99 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

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

Odoo 11 Development Essentials

Installing and Organizing the Development Environment

Before we dive into Odoo development, we need to set up our development environment and learn the basic administration tasks for it.

In this chapter, we will learn how to set up the working environment where we will build our Odoo applications. We will set up an Ubuntu system to host the development server instance. This can be a cloud server, a local network server, or a virtual machine in your workstation.

This simplifies the explanation, since we don't have to worry about the specifics of each platform. People not familiar with Ubuntu/Debian should find it easy to follow the steps. People confident with other operating systems, such as CentOS or macOS, should be able to adapt the instructions to their preferred system.

Another benefit from using a remote system for development is that when the time comes...

Setting up a host for the Odoo server

A Debian/Ubuntu system is recommended to run Odoo servers. While Odoo is multi-platform and can run on a variety of operating systems, it's also true that the Odoo R&D team considers Debian the reference deployment platform. In fact, Odoo's own SaaS operations are known to be Debian-based. It is also the most popular choice in the community. This means that it will be easier to find help or advice if you use Debian or Ubuntu. Even if you're from a Windows background, it will be important that you have some knowledge about it.

You will still be able to work from your favorite desktop system, be it Windows, Mac, or other Linux flavors, such as CentOS.

Keep in mind that these instructions are intended to set up a new system for development. If you want to try some of them in an existing system, always take a backup ahead of...

Installing Odoo from source

Ready-to-install Odoo packages can be found at https://nightly.odoo.com, available as Windows (.exe), Debian (.deb), CentOS (.rpm), and source code tarballs (.tar.gz).

As developers, we will prefer installing them directly from the GitHub repository. This will end up giving us more control over versions and updates.

Odoo is built using the Python programming language, and it uses the PostgreSQL database for data storage; these are the two main requirements of an Odoo host. To run Odoo from the source, we will first need to install the Python libraries it depends on. The Odoo source code can then be downloaded from GitHub. While we can download a ZIP file or tarball, we will see that it's better if we get the sources using the Git version control application; it'll help us to have it installed on our Odoo host as well.

To keep things tidy,...

Initializing a new Odoo database

To create and initialize an Odoo database with the Odoo data schema, we should run the Odoo server using the -d option:

$ ~/odoo-dev/odoo/odoo-bin -d testdb

This will take a couple of minutes to initialize the testdb database, and it will end with an INFO log message, Modules loaded. Note that it might not be the last log message, and it can be in the last three or four lines. With this, the server will be ready to listen to client requests.

Since Odoo 9.0, the database is automatically created if it doesn't exist yet. In version 8.0, this was not so, and you needed to create the database manually, using the createdb command.

By default, this will initialize the database with demonstration data, which is often useful for development databases. This is the equivalent to having the Load demonstration data checkbox ticked when creating a new...

A word about Odoo product versions

At the time of writing, Odoo's latest stable version is version 11, marked on GitHub as branch 11.0. This is the version we will work with throughout the book.

It's important to note that Odoo databases are incompatible between Odoo major versions. This means that if you run an Odoo 11 server against a database created for a previous major version of Odoo, it won't work. Non-trivial migration work is needed before a database can be used with a later version of the product.

The same is true for addon modules: as a general rule, an addon module developed for an Odoo major version will not work with other versions. When downloading a community module from the web, make sure it targets the Odoo version you are using.

On the other hand, major releases (10.0, 11.0) are expected to receive frequent updates, but these should be mostly...

More server configuration options

The Odoo server supports quite a few other options. We can check all the available options with --help:

$ ./odoo-bin --help

We will review some of the most important options in the following sections. Let's start by looking at how the currently active options can be saved in a configuration file.

Odoo server configuration files

Most of the options can be saved in a configuration file. By default, Odoo will use the .odoorc file. In Linux systems, its default location is in the home directory ($HOME), and in the Windows distribution, it is in the same directory as the executable used to launch Odoo.

In older Odoo/OpenERP versions, the name for the default configuration file was .openerp...

Developing from a remote workstation

You may be running Odoo with a Debian/Ubuntu system either in a local virtual machine or in a server over the network, but you may prefer to do the development work at your personal workstation, using your favorite text editor or IDE. This may frequently be the case for developers working from Windows workstations, but it also may be the case for Linux users who need to work on an Odoo server over the local network.

A solution for this is to enable file sharing in the Odoo host so that files are made easy to edit from our workstation. For Odoo server operations, such as a server restart, we can use an SSH shell (such as PuTTY on Windows) alongside our favorite editor.

Using a Linux text editor

...

Installing additional modules

Making new modules available in an Odoo instance so they can be installed is something that newcomers to Odoo frequently find confusing. But it doesn't have to be, so let's get familiar with that.

Finding community modules

There are many Odoo modules available on the internet. The Odoo apps store at apps.odoo.com is a catalog of modules that can be downloaded and installed on your system. Another important resource are the Odoo Community Association (OCA) maintained modules, also available on GitHub at https://github.com/OCA/. The OCA is a non-profit organization created to coordinate community contributions, promoting quality, software best practices, and open source values.

To add...

Setting up a host for the Odoo server


A Debian/Ubuntu system is recommended to run Odoo servers. While Odoo is multi-platform and can run on a variety of operating systems, it's also true that the Odoo R&D team considers Debian the reference deployment platform. In fact, Odoo's own SaaS operations are known to be Debian-based. It is also the most popular choice in the community. This means that it will be easier to find help or advice if you use Debian or Ubuntu. Even if you're from a Windows background, it will be important that you have some knowledge about it.

You will still be able to work from your favorite desktop system, be it Windows, Mac, or other Linux flavors, such as CentOS.

Note

Keep in mind that these instructions are intended to set up a new system for development. If you want to try some of them in an existing system, always take a backup ahead of time in order to be able to restore it in case something goes wrong.

Using a virtual machine

You're welcome to choose your preferred...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • • Discover the latest technical capabilities in Odoo 11 while you build your own app
  • • Program business logic and manipulate data to implement specific business rules in your applications
  • • Implement automated tests to add modules and techniques and debug module business logic

Description

Odoo continues to gain worldwide momentum as the best platform for open source ERP installations. Now, with Odoo 11, you have access to an improved GUI, performance optimization, integrated in-app purchase features, and a fast-growing community to help transform and modernize your business. With this practical guide, you will cover all the new features that Odoo 11 has to offer to build and customize business applications, focusing on the publicly available community edition. We begin with setting up a development environment, and as you make your way through the chapters, you will learn to build feature-rich business applications. With the aim of jump-starting your Odoo proficiency level, from no specific knowledge to application development readiness, you will develop your first Odoo application. We then move on to topics such as models and views, and understand how to use server APIs to add business logic, helping to lay a solid foundation for advanced topics. The book concludes with Odoo interactions and how to use the Odoo API from other programs, all of which will enable you to efficiently integrate applications with other external systems.

Who is this book for?

Odoo 11 Development Essentials caters to developers who are familiar with Python and MVC design and now want to build effective business applications using Odoo.

What you will learn

  • • Install Odoo from source
  • • Manage Odoo server instances
  • • Create a new Odoo application from scratch covering the most frequently used elements
  • • Develop new models and use inheritance to extend/modify existing models
  • • Use ORM methods, both in the Odoo server and from external clients
  • • Create Kanban views using QWeb effectively
  • • Develop custom web and website CMS pages
  • • Use external API to integrate Odoo with external applications

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 29, 2018
Length: 336 pages
Edition : 3rd
Language : English
ISBN-13 : 9781788476164
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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Mar 29, 2018
Length: 336 pages
Edition : 3rd
Language : English
ISBN-13 : 9781788476164
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.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
€189.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 €5 each
Feature tick icon Exclusive print discounts
€264.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 €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 120.97
Odoo 11 Development Essentials
€36.99
Working with Odoo 11
€41.99
Odoo 11 Development Cookbook - Second Edition
€41.99
Total 120.97 Stars icon
Banner background image

Table of Contents

15 Chapters
Quick Start – The Odoo Developer Mode and Concepts Chevron down icon Chevron up icon
Installing and Organizing the Development Environment Chevron down icon Chevron up icon
Your First Odoo Application – A Practical Overview Chevron down icon Chevron up icon
Models – Structuring the Application Data Chevron down icon Chevron up icon
Import, Export, and Module Data Chevron down icon Chevron up icon
The ORM API – Handling Application Data Chevron down icon Chevron up icon
Business Logic – Supporting Business Processes Chevron down icon Chevron up icon
External API – Integrating with Other Systems Chevron down icon Chevron up icon
Backend Views – Design the User Interface Chevron down icon Chevron up icon
Kanban Views and Client-Side QWeb Chevron down icon Chevron up icon
Reports and Server-Side QWeb Chevron down icon Chevron up icon
Creating Website Frontend Features Chevron down icon Chevron up icon
Debugging and Automated Tests Chevron down icon Chevron up icon
Deploying and Maintaining Production Instances Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(1 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Amazon Customer Feb 13, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Easy to understand narrative with good examples
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.