Skip to content Skip to sidebar Skip to footer

Inherit View And Adding Fields

I want to add my 2 fields boatlenght and fuelcapacity under price list in product form view but they are not showing up. What did i miss.

Solution 1:

Try

<record id="product_product_template_only_form_view" model="ir.ui.view">
                <field name="model">product.product</field>
                <field name="inherit_id" ref="product.product_template_only_form_view"/>
                <field name="arch" type="xml">
                    <xpath expr="//field[@name='list_price']" position="after">
                       <field name="boatlenght"/>
                       <field name="fuelcapacity"/>
                    </xpath>
                </field>
            </record>

In order to insert the field properly you use an xpath expression to insert it on the DOM.

Check the documentation.


Post a Comment for "Inherit View And Adding Fields"