跳至內容
選單
此問題已被標幟
1 回覆
280 瀏覽次數

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>

頭像
捨棄
最佳答案
<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>
頭像
捨棄