This question has been flagged
1 Reply
4121 Views

I want to rename 'Product' Name to Part Number in Sale.order form Line ,But this Xpath is not working why ? need a help.


<record id="view_order_form_double_validation" model="ir.ui.view">

 

<field name="name">sale.order.form</field>

<field name="model">sale.order</field>

<field name="inherit_id" ref="sale.view_order_form"/>

<field name="priority">90</field>

<field name="arch" type="xml">


<xpath

expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">

<attribute name="string">PartNumber</attribute>


</xpath>

 </field>

</record>

Avatar
Discard
Best Answer

Try putting in a <field name="priority">90</field> inside the <record> tag.

The reason that this may work is there is another view that inherits from sale.view_order_form. The view name is sale.order.form.sale.stock and this view replaces the exact field that you are modifying the string attribute of. By specifying a priority, your inherited view will execute **after** the sale.order.form.sale.stock view.

Avatar
Discard
Author

I added in both place but no use..Any solution?

You need to add it above the tag

... above the field name arch tag

Author

Yes your answer working perfectly thanks...