Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Odoo

You're reading from   Learn Odoo A beginner's guide to designing, configuring, and customizing business applications with Odoo

Arrow left icon
Product type Paperback
Published in Oct 2019
Publisher Packt
ISBN-13 9781789536898
Length 504 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Greg Moss Greg Moss
Author Profile Icon Greg Moss
Greg Moss
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Setting Up Odoo 12 FREE CHAPTER 2. Installing Your First Application 3. Exploring Customer Relationship Management in Odoo 12 4. Purchasing with Odoo 5. Making Goods with Manufacturing 6. Configuring Accounting - Finance Options 7. Administering an Odoo Installation 8. Implementing the Human Resources Application 9. Understanding Project Management 10. Creating Advanced Searches and Dashboards 11. Building a Website with Odoo 12. Implementing E-Commerce with Odoo 13. Customizing Odoo for Your Business 14. Modifying Documents and Reports 15. Discovering Custom Odoo Modules 16. Comparative Analysis of Community versus Enterprise Editions 17. Locating Additional Odoo Resources 18. Other Books You May Enjoy

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): 
...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime