Changing existing views: View inheritance
Up until now, we ignored the existing views and declared completely new ones. While this is didactically sensible, you'll rarely be in situations where you want to define a new view for an existing model. What you'll rather want to do is to slightly modify the existing views, be it to simply have it show a field you added to the model in your addon, or to customize it to your needs or your customer's.
In this recipe, we'll change the default partner form to show the record's last modification date and also allow searching for that. Then we'll also show this column in the partners' list view.
How to do it...
Inject the field in the default form view:
<record id="view_partner_form" model="ir.ui.view"> <field name="model">res.partner</field> <field name="inherit_id" ref="base.view_partner_form" /> <field name="arch" type="xml"> <field name="website" position="after"> <field name="write_date...