This question has been flagged
1 Reply
3947 Views

Hello every body,

I want to view one2many field as a pop up window in purchase requsition and my code in XML is

<field name="line_ids" > 
                           <form string="Products" editable="bottom">
                                <group> 
                                    <field name="product_id"/>
                                    <field name="product_qty"/>
                                    <field name="product_uom_id"/>
                                   <field name="company_id" groups="base.group_multi_company" />
                                </group>
                         </form> 
                        </field>

but this code not work and this field still view as a tree view So 

can you help me please?

I will thankful for your help

Avatar
Discard

Remove editable="bottom"

Best Answer

You need to remove editable="bottom" from the TREE view.

<record model="ir.ui.view" id="view_purchase_requisition_form_inherit">
    <field name="name">purchase.requisition.form.inherit</field>
    <field name="model">purchase.requisition</field>
    <field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_form" />
    <field name="arch" type="xml">
        <xpath expr="//field[@name='line_ids']/tree[@string='Products']"
            position="attributes">
            <attribute name="editable" eval="False"/>
        </xpath>
    </field>
</record>

Avatar
Discard