Skip to Content
Menú
This question has been flagged
1 Respondre
274 Vistes

To remove the internal link arrow button

I tried this but it is not working after inheriting the sale order view.

<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
<attribute name="options">{'no_create': True, 'no_create_edit': True,'no_open':True}</attribute>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='product_template_id']" position="attributes">
<attribute name="options">{'no_create': True, 'no_create_edit': True,'no_open':True}</attribute>
</xpath>

Avatar
Descartar
Best Answer
<record id="sale_order_form_inherited" model="ir.ui.view">
<field name="name">sale.order.inherited.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
<attribute name="options">{'no_create': True,'no_create_edit': True,'no_open': True}</attribute>
</xpath>
</field>
</record>
Avatar
Descartar