1

I have a parent view id V which is a form F and inside this form a Goup with 3 fields F1, F2 and F3.

My inherited view looks like:

<record model="ir.ui.view" id="view_v_form">
    <field name="name">My view</field>
    <field name="model">my.module.class</field>
    <field name="inherit_id" ref="parent_module.V"/>
    <field name="type">form</field>
    <field name="arch" type="xml">
        <xpath expr="//form/field[@name='F3']" position="before">
            <field name="myField"/>
        </xpath> 
    </field>
</record>

But it doesn't appear anywhere, any idea?

ChesuCR
  • 9,352
  • 5
  • 51
  • 114
Mark
  • 684
  • 2
  • 9
  • 25

1 Answers1

1

Make sure you have added parent_module to the depends attribute in the __openerp__.py file, and the xml file path to the update_xml attribute as well.

You don´t need to specify the form type and you don´t need to use the xpath neither:

<record model="ir.ui.view" id="view_v_form">
    <field name="name">My view</field>
    <field name="model">my.module.class</field>
    <field name="inherit_id" ref="parent_module.V"/>
    <field name="arch" type="xml">
        <field name="F3" position="before">
            <field name="myField"/>
        </field>
    </field>
</field>
ChesuCR
  • 9,352
  • 5
  • 51
  • 114
  • both are there: """, "depends" : ['my_parent_module'], "init_xml" : [ ], "demo_xml" : [ ], "update_xml" : [ 'my_addon.xml', ], "installable": True, }. No way.... – Mark Jan 18 '18 at 19:10