Using the noupdate and forcecreate flags
Most add-on modules have different types of data. Some data simply needs to exist for the module to work properly, other data shouldn’t be changed by the user, and most data can be changed as the user wants and is only provided as a convenience. This tutorial will detail how to address the different types. First, we’ll write a field in an already-existing record, and 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:
- Add a publisher that will be created at installation time but not updated on subsequent updates. However, if the user deletes it, it will be recreated:
<odoo noupdate="1"> Â Â Â Â <record id="res_partner_packt" model="res.partner"...