Book Image

Odoo Development Cookbook

By : Holger Brunn, Alexandre Fayolle, Daniel Reis
Book Image

Odoo Development Cookbook

By: Holger Brunn, Alexandre Fayolle, Daniel Reis

Overview of this book

Odoo is a full-featured open source ERP with a focus on extensibility. The flexibility and sustainability of open source is 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. The book starts by covering Odoo installation and administration, and provides a gentle introduction to application development. It then dives deep into several of the areas that an experienced developer will need to use. You’ll learn implement business logic, adapt the UI, and extend existing features.
Table of Contents (23 chapters)
Odoo Development Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Adding messaging and tracking features


Odoo social features are used in many of the standard apps. They provide an easy way for the user to be updated and to collaborate around business documents. It is, therefore, important for the custom addon modules to also support them.

These features are provided by the Discuss app (the mail technical name) and their most visible aspect is the message wall at the bottom of the form for a business document, along with the follower box on its right-hand side.

Getting ready

We will use my_module introduced in Chapter 3, Creating Odoo Modules, defining the Library Book model. You can get that code or quickly create an addon around this model:

# -*- coding: utf-8 -*-
from openerp import models, fields
class LibraryBook(models.Model):
    _name = 'library.book'
    name = fields.Char('Title', required=True)
    date_release = fields.Date('Release Date')
    author_ids = fields.Many2many('res.partner', string='Authors')

We will also need an XML file with the corresponding...