What is "No-Update" Functionality?
The structure of the Odoo framework allows the creation of records or datasets through Odoo’s generic XML code. The records are supposed to be dummy data to be used for learning processes or default data to control Odoo’s base process, like security groups, access rights, record rules, etc. These records are often placed inside a special XML tag with a noupdate="1" attribute:
When data is loaded with this attribute, Odoo does not update it during future module upgrades. This ensures that essential configuration records, once created, stay intact even if the module is updated later.
This mechanism is especially important for base-level data like security rules and default groups that Odoo relies on to function correctly.
However, there are cases where developers or functional teams need to modify these default records. This becomes tricky because Odoo’s upgrade system ignores changes to these records — unless you explicitly allow it to overwrite them.
Modifying a Record Set to "No-Update"
Let’s walk through an example to show how this is done properly.
Step 1: Identify the Target Record
Suppose you want to modify the domain of a default record rule defined in:
Here’s the original rule:
Let’s say we want to extend this rule by modifying the domain_force field. Before we do that, we need to make this record writable during an upgrade.
Step 2: Temporarily Disable the No-Update Flag
Add this function to your custom module to update the noupdate status of the record:
This searches the ir.model.data table for the record, then sets its noupdate flag to False, which allows Odoo to apply changes to it in the upcoming XML data load.
This is the key step that tells Odoo: “You’re allowed to overwrite this record now.”
Step 3: Apply the Desired Changes
Now that the record is editable, redefine the fields you want to modify. For example:
This example adds a new condition to the domain, excluding partners with category_id = 3.
Step 4: Re-enable the No-Update Flag
Once your changes have been applied, re-protect the record by setting noupdate back to True:
This final step ensures that Odoo treats the record as a protected one again, and it won’t get changed unintentionally during future upgrades.
Final Tips
- Always test these changes in a staging environment before applying them to production.
- Be cautious when modifying records from core modules — even small changes can have system-wide effects.
- If you expect to modify the same record again in the future, consider managing it through a custom module instead.