Hi,
To add this from the code, create a module, add necessary files like init and manifest, then its all about the xml file where you will add the inherited view.
If you are adding new fields, you have to inherit the corresponding model in the python and you have to add the new fields, once this is done, you can inherit the view and add the new field or existing fields to the view.
Sample:
<record id="view_crm_meeting_search" model="ir.ui.view">
<field name="name">calendar.event.form.inheritfield>
<field name="model">calendar.eventfield>
<field name="inherit_id" ref="calendar.view_calendar_event_search"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='description']" position="after">
<field name="opportunity_id"/>
xpath>
field>
record>
Tutorial: How To Inherit And Add Field To A Model In Odoo
Thanks
Thank you