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

Arrow left icon
Profile Icon Daniel Reis
Arrow right icon
S$66.99
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (1 Ratings)
Paperback Mar 2018 336 pages 3rd Edition
eBook
S$12.99 S$52.99
Paperback
S$66.99
Subscription
Free Trial
Arrow left icon
Profile Icon Daniel Reis
Arrow right icon
S$66.99
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (1 Ratings)
Paperback Mar 2018 336 pages 3rd Edition
eBook
S$12.99 S$52.99
Paperback
S$66.99
Subscription
Free Trial
eBook
S$12.99 S$52.99
Paperback
S$66.99
Subscription
Free Trial

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to Singapore

Standard delivery 10 - 13 business days

S$11.95

Premium delivery 5 - 8 business days

S$54.95
(Includes tracking information)

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 : 9781788477796
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Singapore

Standard delivery 10 - 13 business days

S$11.95

Premium delivery 5 - 8 business days

S$54.95
(Includes tracking information)

Product Details

Publication date : Mar 29, 2018
Length: 336 pages
Edition : 3rd
Language : English
ISBN-13 : 9781788477796
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 S$6 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 S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$ 216.97
Odoo 11 Development Essentials
S$66.99
Working with Odoo 11
S$74.99
Odoo 11 Development Cookbook - Second Edition
S$74.99
Total S$ 216.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

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela