Odoo howto’s

Code

How to extend/overrule/override <record>?

<record> does work with an inherit_id. If you want to change a field value of a record, you should copy the definition of the <record> in your module and include the field you wish to change like for example …

<record id="purchase_requisition.type_multi" model="purchase.requisition.type">
   <field name="exclusive">exclusive</field>
</record>

If that <record> is wrapped in a noupdate=”1″ you should make the record writable first (and unwritable again after) like this …

<odoo noupdate="0">
	<function name="write" model="ir.model.data">
   		<function name="search" model="ir.model.data">
       			<value eval="[('module', '=', 'purchase_requisition'), ('name', '=', 'type_multi')]"/>
   		</function>
   		<value eval="{'noupdate': False}" />
	</function>
	<record id="purchase_requisition.type_multi" model="purchase.requisition.type">
   		<field name="exclusive">exclusive</field>
	</record>
	<function name="write" model="ir.model.data">
   		<function name="search" model="ir.model.data">
       			<value eval="[('module', '=', 'purchase_requisition'), ('name', '=', 'type_multi')]"/>
   		</function>
   		<value eval="{'noupdate': True}" />
	</function>
</odoo>

Settings

Technical > Email > Templates

How to extend/overrule/override an email template?

If you want to do this in code look at How to extend/overrule/override <record>?.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top