Home Business & Other Odoo 12 Development Cookbook - Third Edition

Odoo 12 Development Cookbook - Third Edition

By Parth Gajjar , Alexandre Fayolle , Holger Brunn and 1 more
books-svg-icon Book
Subscription FREE
eBook + Subscription €14.99
eBook €28.99
Print + eBook €37.99
READ FOR FREE Free Trial for 7 days. €14.99 p/m after trial. Cancel Anytime! BUY NOW BUY NOW BUY NOW
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
READ FOR FREE Free Trial for 7 days. €14.99 p/m after trial. Cancel Anytime! BUY NOW BUY NOW BUY NOW
Subscription FREE
eBook + Subscription €14.99
eBook €28.99
Print + eBook €37.99
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
  1. Free Chapter
    Installing the Odoo Development Environment
About this book
Odoo is a powerful framework known for rapid application development. Its latest release, Odoo 12, introduces tons of new features. With this book, you’ll learn how to develop powerful Odoo applications from scratch, using all the latest features. This Odoo cookbook starts by covering Odoo installation and deployment on the server. Next, you’ll explore the Odoo framework with real-world examples. You’ll 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). This book is not just limited to backend development; the advanced JavaScript recipes for creating new views and widgets will help you build beautiful UI elements. As you move forward, you’ll gain insights into website development and become a quality Odoo developer by studying performance optimization, debugging, and automated tests. Finally, you’ll learn the latest concepts like multi-website, In-App Purchasing (IAP), Odoo.sh, and IoT Box. By the end of the book, you’ll have all the knowledge you need to build powerful Odoo applications. The development best practices used in this book will undoubtedly come handy when you are working with the Odoo framework.
Publication date:
April 2019
Publisher
Packt
Pages
774
ISBN
9781789618921

 

Installing the Odoo Development Environment

In this chapter, we will cover the following recipes:

  • Odoo ecosystem
  • Easy installation of Odoo from source
  • Managing Odoo environments using the start command
  • Managing Odoo server databases
  • Storing the configuration instance in a file
  • Activating Odoo developer tools
  • Updating Odoo from source
 

Introduction

There are lots of ways to set up an Odoo development environment. This chapter proposes one of them; you will certainly find a number of other tutorials on the web explaining other approaches. Keep in mind that this chapter is about a development environment that has different requirements from a production environment. This will be covered in Chapter 3, Server Deployment.

If you are new to Odoo development, you must know about certain aspects of the Odoo ecosystem. The next section will give you a brief introduction to those aspects, and then we will move on to the installation of Odoo for development.

 

Odoo ecosystem

Odoo provides the developer with out-of-the-box modularity. Its powerful framework helps the developer to build projects very quickly. There are various characters in the Odoo ecosystem that you should be familiar with before starting your journey of becoming a successful Odoo developer.

Odoo editions

Odoo comes with two editions. The first is the Community Edition, which is open source, and the second is the Enterprise Edition, which has licensing fees. Unlike other software vendors, Odoo Enterprise Edition is just a bunch of advance applications that adds extra features/apps in the Community Edition. Basically, Enterprise Edition runs on top of the Community Edition. The Community Edition comes under the Lesser General Public License v3.0 (LGPLv3) license and comes with all of the basic Enterprise resource planning (ERP) applications, such as sale, Customer Relationship Management (CRM), invoicing, purchase, website builder, and so on. Alternatively, Enterprise Edition comes with the Odoo Enterprise Edition License, which is a proprietary license. Odoo Enterprise Edition comes with advanced features such as full accounting, studio, Voice over Internet Protocol (VoIP), mobile responsive design, e-sign, marketing automation, and delivery and banking integrations. Enterprise Edition also provides you with unlimited bugfixes. The following diagram shows that Enterprise Edition depends on the Community Edition, which is why you need Community Edition to use Enterprise Edition:

You can see a full comparison of both editions here: https://www.odoo.com/page/editions.

Odoo has the largest number of community developers, which is why you will find a large number of third-party apps (modules) on the app store. Most of the free apps use an Affero General Public License version 3 (AGPLv3). You cannot use the proprietary license on your app if your application has dependencies on such apps. Apps with an Odoo proprietary license can be developed only on modules that have LGPL or other proprietary licenses.

Git repositories

The whole code base of Odoo is hosted on GitHub. You can post bugs/issues for stable versions here. You can also propose a new feature by submitting Pull Requests (PR). There are several repositories in Odoo; see the following table for more information:

Repositories Purpose
https://github.com/odoo/odoo This is the Community Edition of Odoo. It's available publicly.
https://github.com/odoo/enterprise This is the Enterprise Edition of Odoo. It's available to official Odoo partners only.
https://github.com/odoo-dev/odoo This is an Ongoing development repository. It's available publicly.

Every year, Odoo releases one major (Long Term Support (LTS)) version and a few minor versions. Minor versions are mostly used in Odoo's online SaaS service, meaning that Odoo SaaS users get early access to these features. Major version branches have names such as 12.0, 11.0, and 10.0, while minor version branches have names such as saas-12.1, saas-11.1, and saas-11.2 on GitHub. The master branch is under development and is subject to change at any time. Consequently, it is advisable not to use this for production, since it might break down your database.

Runbot

Runbot is Odoo's automated testing environment. This pulls the latest branches from Odoo's Git repositories and creates the builds for the last four commits. Here, you can test all stable and in-development branches. You can even play with the Enterprise Edition and its development branches.

Every build has a different background color, which indicates the status of the test cases. A green background color means that all of the test cases run successfully and you can test that branch, while a red background color means that some test cases have failed on this branch and some features might be broken on that build. You can view the logs for all test cases, which show exactly what happens during installation. Every build has two databases. The all database has all of the modules installed on it, while the base database only has base Odoo modules installed. Every build is installed with basic demo data, and therefore you can test it quickly without extra configurations.

You can access runbot with from the following URL: http://runbot.odoo.com/runbot.

The following credentials can be used to access any runbot build:

  • Login ID: admin Password: admin
  • Login ID:demo Password: demo
  • Login ID: portal Password: portal
This is a public testing environment, so sometimes it is possible that other users are using/testing the same branch that you are testing.

Odoo app store

Odoo launched the app store a few years back, and this was an instant success. Right now, there are over 15,000 different apps hosted there. In the app store, you will find lots of free and paid applications for different versions. This includes specific solutions for different business verticals, such as education, food industries, and medicine. It also includes apps that extend/add new features to existing Odoo applications. The app store also provides numerous beautiful themes for the Odoo website builder. In Chapter 4, Creating Odoo Add-On Modules, we will look at how you can set pricing and currency for your custom module.

You can access the Odoo app store via the following URL: https://www.odoo.com/apps.

Odoo community association

Odoo Community Association (OCA) is a non-profit organization that develops/manages community-based Odoo modules. All OCA modules are open source and maintained by Odoo community members. Under the OCA's GitHub account, you will find multiple repositories for different Odoo applications. Apart from Odoo modules, it also contains various tools, a migration library, accounting localizations, and so on.

Here is the URL for OCA's official GitHub account: https://github.com/OCA.

Official Odoo help forum

Odoo has a very powerful framework, and tons of things can be achieved just by using/activating options or by following specific patterns. Consequently, if you run into some technical issues or if you are not sure about some complex cases, then you can post your query on Odoo's official help forum. Lots of developers are active on this forum, including some official Odoo employees.

You can search for or post your questions at the following URL: https://help.odoo.com.

           
About the Authors
  • Parth Gajjar

    Parth Gajjar is an Odoo expert with a deep understanding of the Odoo framework. He started his career at Odoo and spent 7 years in the R&D department at Odoo India. During his time at Odoo, he worked on several key features, including a marketing automation app, mobile application, report engine, domain builder, and more. He also worked as a code reviewer and helped manage the code quality of the new features. Later, he started his own venture named Droggol and now provides various development services related to Odoo. He loves working on Odoo and solving real-world business problems with different technologies. He often gives technical training to Odoo developers.

    Browse publications by this author
  • Alexandre Fayolle

    Alexandre Fayolle started working with Linux and free software in the mid-1990s and quickly became interested in the Python programming language. In 2012, he joined Camptocamp to share his expertise on Python, PostgreSQL, and Linux with the team implementing Odoo. He currently manages projects for Camptocamp and is strongly involved in the Odoo Community Association. In his spare time, he likes to play jazz on the vibraphone.

    Browse publications by this author
  • Holger Brunn

    Holger Brunn has been a fervent open source advocate since he came into contact with the open source market sometime in the nineties. He has programmed for ERP and similar systems in different positions since 2001. For the last 10 years, he has dedicated his time to TinyERP, which became OpenERP and evolved into Odoo. Currently, he works at Therp BV in the Netherlands as a developer and is an active member of the Odoo Community Association.

    Browse publications by this author
  • 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.

    Browse publications by this author
Latest Reviews (8 reviews total)
很優惠的價格,希望可以常常辦這樣的活動,不過有些檔案太大,不可以傳到kindle有點可惜
The examples provided in the text have errors and it was not possible to receive assistance on the request for clarifications
Technical document and essential issue provided for reader. Thanks
Recommended For You
Odoo 12 Development Cookbook - Third Edition
Unlock this book and the full library FREE for 7 days
Start now