Book Image

Odoo 10 Development Essentials

By : Daniel Reis
Book Image

Odoo 10 Development Essentials

By: Daniel Reis

Overview of this book

Odoo is one of the fastest growing open source, business application development software products available. With announcement of Odoo 10, there are many new features added to Odoo and the face of business applications developed with Odoo has changed. This book will not only teach you how to build and customize business applications with Odoo, but it also covers all the new features that Odoo has to offer. This book is the latest resource on developing and customizing Odoo 10 applications. It comes packed with much more and refined content than its predecessor. It will start with building business applications from scratch and will cover topics such as module extensions, inheritance, working with data, user interfaces, and so on. The book also covers the latest features of Odoo 10, in addition to front end development, testing and debugging techniques. The book will also talk about Odoo Community and Odoo Enterprise.
Table of Contents (20 chapters)
Odoo 10 Development Essentials
Credits
Foreword
About the Author
About the Reviewer
www.PacktPub.com
Preface

Preface

Odoo is a powerful open source platform for business applications. On top of it, a suite of closely integrated applications was built, covering all business areas from CRM and sales to stocks and accounting. Odoo has a dynamic and growing community around it, constantly adding features, connectors, and additional business apps.

Odoo 10 Development Essentials provides a step-by-step guide to Odoo development, allowing readers to quickly climb the learning curve and become productive in the Odoo application platform.

The first two chapters aim to get the reader comfortable with Odoo, learn the basic techniques to set up a development environment, and get familiar with the module development approach and workflow.

Each of the following chapters explains in detail the key development topics needed for Odoo addon module development, such as inheritance and extensions, data files, models, views, business logic, and so on.

Finally, the last chapter explains what to consider when deploying your Odoo instance for production use.

What this book covers

Chapter 1, Getting Started with Odoo Development, starts with the setup of a development environment, installing Odoo from source, and learning how to manage Odoo server instances.

Chapter 2, Building Your First Odoo Application, guides us through the creation of our first Odoo module, covering all the different layers involved: models, views, and business logic.

Chapter 3, Inheritance – Extending Existing Applications, explains the available inheritance mechanisms and how to use them to create extension modules that add or modify features on other existing modules.

Chapter 4, Module Data, covers the most commonly used Odoo data file formats (XML and CSV), the external identifier concept, and how to use data files in modules and data import/export.

Chapter 5, Models – Structuring Application Data, discusses the Model layer in detail, with the types of models and fields available, including relational and computed fields.

Chapter 6, Views – Designing the User Interface, covers the View layer, explaining in detail the several types of views and all the elements that can be used to create dynamic and intuitive user interfaces.

Chapter 7, ORM Application Logic – Supporting Business Processes, introduces programming business logic on the server side, explores the ORM concepts and features, and also explains how to use wizards for more sophisticated user interaction.

Chapter 8, Writing Tests and Debugging Code, discusses how to add automated tests to addon modules, and techniques to debug module business logic.

Chapter 9, QWeb and Kanban Views, goes over the Odoo QWeb templates, using it to create rich Kanban boards.

Chapter 10, Creating QWeb Reports, discusses using the QWeb based report engine, and everything needed to generate printer-friendly PDF reports.

Chapter 11, Creating Website Frontend Features, introduces Odoo website development, including web controller implementations and using QWeb templates to build frontend web pages.

Chapter 12, External API – Integrating with Other Systems, explains how to use Odoo server logic from external applications, and introduces a popular client programming library that can also be used as a command-line client.

Chapter 13, Deployment Checklist – Going Live, shows us how to prepare a server for production prime time, explaining what configuration should be taken care of and how to configure an Nginx reverse proxy for improved security and scalability.

What you need for this book

We will install our Odoo server on an Ubuntu or Debian system, but we expect you to use your operation system and programming tools of choice, be it Windows, Mac, or other.

We will provide some guidance on setting up a virtual machine with Ubuntu Server. You should choose a virtualization software to use, such as VirtualBox or VMWare Player; both are available for free. If you are using a Ubuntu or Debian workstation, no virtual machine will be needed.

As you already figured, our Odoo installation will be using Linux, so we will inevitably use the command line. However you should be able to follow the instructions given, even if not familiar with it.

A basic knowledge of the Python programming language is expected. If you're not comfortable with it, we advise you to follow a quick tutorial to get you started. We will also make use of XML, so it is desirable to be familiar with the markup syntax.

Who this book is for

This book is targeted at developers with experience developing business applications willing to quickly become productive with Odoo.

Readers are expected to have an understanding of MVC application design and knowledge of the Python programming language. Being familiar with web technologies, HTML, CSS, and JavaScript, will also be helpful.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: Code words in text are shown as follows: "To create a new database, use the createdb command."

A block of code is set as follows:

@api.multi
def do_toggle_done(self):
    for task in self:
        task.is_done = not task.is_done
    return True

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

@api.multi
def do_toggle_done(self):
    for task in self:
        task.is_done = not task.is_done
    return True

Any command-line input or output is written as follows:

$ ~/odoo-dev/odoo/odoo-bin.py -d demo

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Upon login, you are presented with the Apps menu, displaying the available applications."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.
  2. Hover the mouse pointer on the SUPPORT tab at the top.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box.
  5. Select the book for which you're looking to download the code files.
  6. Choose from the drop-down menu where you purchased this book from.
  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows
  • Zipeg / iZip / UnRarX for Mac
  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Odoo-10-Development-Essentials. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/Odoo10DevelopmentEssentials_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.