Skip to Content
Menu
This question has been flagged
1 Reply
7027 Views

 <!-- Add instructor field to existing view -->

        <record id="partner_instructor_form_view" model="ir.ui.view">

            <field name="name">partner.instructor</field>

            <field name="model">res.partner</field>

            <field name="inherit_id" ref="base.view_partner_form"/>

            <field name="arch" type="xml">

                <notebook position="inside">

                    <page string="Inherited_Sessions">

                        <group>

                            <field name="instructor"/>

                            <field name="session_ids"/>

                        </group>

                    </page>

                </notebook>

            </field>

        </record>


My question is how they get this line      <field name="inherit_id" ref="base.view_partner_form"/> any explanation

Avatar
Discard

The answer of your question is here: https://goo.gl/fGNfBY

Best Answer

Hello louie, 

In above code they 

 <field name="inherit_id" ref="base.view_partner_form"/> 

In this code show base - Your module name so there is res.partner view come form base module and another view_partner_form is that your view which one you want to over ride or inherit.


Avatar
Discard

if you want to check view than on debug mode which one view you want inherit

like customer form. click on upper

debug --> edit form view --> External id (base.view_partner_form (this for customer form))

Author

so that means this is a default code. everytime you inherit you should declare this code too.? thanks for ur rply

Now solve your problem?

Author

yes thank you very much