Skip to content

Instantly share code, notes, and snippets.

@mstuttgart
Created February 5, 2025 20:54
Show Gist options
  • Save mstuttgart/0a81cfe6139d744ce88a59784fda0d99 to your computer and use it in GitHub Desktop.
Save mstuttgart/0a81cfe6139d744ce88a59784fda0d99 to your computer and use it in GitHub Desktop.
Habilitar update de registros no odoo
<!-- Allow updating on noupdate=True records -->
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value
eval="[('module', '=', 'base'), ('name', '=', 'user_admin')]" />
</function>
<value eval="{'noupdate': False}" />
</function>
<record id="base.user_admin" model="res.users">
<!-- change fields here -->
</record>
<!-- Revoke noupdate change -->
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value
eval="[('module', '=', 'base'), ('name', '=', 'user_admin')]" />
</function>
<value eval="{'noupdate': True}" />
</function>
<!-- https://stackoverflow.com/questions/62403653/odoo-how-to-update-non-updateable-records-by-xml -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment