Odoo 11 Development Cookbook - Second Edition
eBook - ePub

Odoo 11 Development Cookbook - Second Edition

Holger Brunn, Alexandre Fayolle, Yannick Vaucher

Share book
  1. 470 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Odoo 11 Development Cookbook - Second Edition

Holger Brunn, Alexandre Fayolle, Yannick Vaucher

Book details
Book preview
Table of contents
Citations

About This Book

Create fast and efficient server-side applications using the latest features of Odoo v11

Key Features

  • Get the most up-to-date guide on Odoo 11 to create custom and reusable modules
  • Interconnect your application with other systems by implementing web APIs
  • Understand the mechanisms powering the Odoo framework to build robust enterprises

Book Description

Odoo is a full-featured open source ERP with a focus on extensibility. The flexibility and sustainability of open source are also a key selling point of Odoo. It is built on a powerful framework for rapid application development, both for back-end applications and front-end websites. Version 11 offers better usability and speed: a new design (as compared to the current Odoo Enterprise version) and a mobile interface.

The book starts by covering Odoo installation and administration and Odoo Server deployment. It then delves into the implementation of Odoo modules, the different inheritance models available in Odoo. You will then learn how to define access rules for your data; how to make your application available in different languages; how to expose your data models to end users on the back end and on the front end; and how to create beautiful PDF versions of your data.

By the end of the book, you will have a thorough knowledge of Odoo and will be able to build effective applications by applying Odoo development best practices

What you will learn

  • Install and manage Odoo environments and instances
  • Use models to define your application's data structures
  • Add business logic to your applications
  • Add automated tests and learn how to debug Odoo apps
  • Learn about the access security model and internationalization features
  • Customize websites built with Odoo, by writing your own templates and providing new snippets for use in the website builder
  • Extend the web client with new widgets and make RPC calls to the server

Who this book is for

If you're a Python developer and want to develop highly efficient business applications with the latest Odoo framework (or if you just want a hands on problem solution book for all your Odoo Development related issues), this book is for you! Some experience with the JavaScript programming language and web development is required to get the most out of this book.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Odoo 11 Development Cookbook - Second Edition an online PDF/ePUB?
Yes, you can access Odoo 11 Development Cookbook - Second Edition by Holger Brunn, Alexandre Fayolle, Yannick Vaucher in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Python. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781788476966
Edition
2

Installing the Odoo Development Environment

In this chapter, we will cover the following topics:
  • Easy installation of Odoo from source
  • Managing Odoo environments using the start command
  • Managing Odoo server databases
  • Storing the instance configuration in a file
  • Activating the 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 these, although 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 requirements different from a production environment, which will be covered in Chapter 3, Server Deployment.

Easy installation of Odoo from source

For Odoo deployment, it is recommended to use a GNU/Linux environment. You may be more at ease using Microsoft Windows or Mac OS X, but the fact is that most of the Odoo developers are using GNU/Linux, and you are much more likely to get support from the community for OS-level issues occurring on GNU/Linux than on Windows.
It is also recommended to develop using the same environment (the same distribution and the same version) as the one that will be used in production. This will avoid nasty surprises such as discovering, on the day of deployment, that some library has a different version than is expected, with slightly different and incompatible behavior. If your workstation is using a different OS, a good approach is to set up a virtual machine on your workstation and install a GNU/Linux distribution in the VM.
To avoid copying files between your workstation where you are running your development environment and the virtual machine that runs Odoo, you can configure a SAMBA share inside the virtual machine and store the source code there. You can then mount the share on your workstation in order to edit the files easily.
This book assumes that you are running Debian GNU/Linux as its stable version (this is version 9, code name Stretch at the time of writing). Ubuntu is another popular choice, and since it is built on top of Debian, most of the examples in this book should work unchanged. Whatever Linux distribution you choose, you should have some notion of how to use it from the command line, and having a few ideas about system administration will certainly not cause any harm.

Getting ready

We assume that Linux is up and running and that you have an account with root access, either because you know the root password, or because sudo has been configured. In the following pages, we will use $(whoami) whenever the login of your work user is required in a command line. This is a shell command that will substitute your login in the command you are typing.
Some operations will definitely be easier if you have a GitHub account. Go to https://github.com and create one if you don't have one already.

How to do it...

To install Odoo from source, you need to follow these steps:
  1. Run the following commands to install the main dependencies:
$ sudo apt-get update
$ sudo apt-get install -y git python3.5 postgresql nano virtualenv
\ xz-utils wget fontconfig libfreetype6 libx11-6 libxext6 libxrender1 \ node-less node-clean-css xfonts-75dpi
  1. Download and install wkhtmltopdf:
$ wget -O wkhtmltox.tar.xz \ https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz 
$ tar xvf wkhtmltox.tar.xz
$ sudo mv wkhtmltox/lib/* /u...

Table of contents