O'Reilly logo

Odoo Development Cookbook by Daniel Reis, Alexandre Fayolle, Holger Brunn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the noupdate and forcecreate flags

Most addons have different types of data. Some data simply needs to exist for the module to work properly, other data shouldn't even be changed by the user, while most data is meant to be changed per the user's pleasure and is only provided as a convenience. This recipe will detail how to address the different types. First, we'll write a field in an already existing record, then, we'll create a record that is supposed to be recreated during a module update.

How to do it...

We can enforce different behaviors from Odoo when loading data by setting certain attributes on the enclosing odoo element or the record element itself.

  1. Add a publisher only created at installation time, but not updated on subsequent updates. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required