Book Image

Learn Odoo

By : Greg Moss
Book Image

Learn Odoo

By: Greg Moss

Overview of this book

Odoo is management software that contains a set of open source enterprise management applications that help you modernize your business. Completely revised and updated, this comprehensive Odoo guide is a fourth edition of Working with Odoo. This book begins with an introduction to Odoo and helps you set up Odoo Online in your system. You'll learn how to start a new company database in Odoo and the basics of Odoo sales management. You will explore customer relationship management in Odoo and its importance in a modern business environment. Moving on, you'll learn how to install the purchasing application, set up suppliers, and begin purchasing and receiving products in Odoo. Next, you'll learn how to use the MRP module to create, process, and schedule the manufacturing and production order. Once you get to grips with the basic applications, you'll uncover how to customize Odoo to meet the specific needs of your business. You'll learn some advanced techniques for searching and finding information, and you'll be taken through business intelligence in Odoo. Towards the end of the book, you'll go in-depth into Odoo's architecture and learn to use Odoo's API to integrate with other applications. By the end of the book, you'll be ready to use Odoo to build enterprise applications and set up the functional requirements for your business.
Table of Contents (19 chapters)

Using Odoo to create websites and web services

In the previous examples, we have been extending the Odoo framework to include additional fields in models and functionality in our views. Odoo also provides a powerful framework for creating your own websites and web services that can integrate easily with Odoo applications.

Let's see how we can create a simple web service that displays the rush orders on a page.

We begin by creating a controller that is tied to a URL. When we navigate to this URL in our browser, the controller will do whatever processing we require.

Create the controller file using the following command in your Terminal window:

sudo nano controller.py

To test our controller and make sure it is functioning properly, place the following code in the controller.py file to create a simple output:

from odoo import http 
 
class Web_RushOrders(http.Controller): 
...