Odoo Help


Xpath is not working in Sale.order.line

on 4/11/15, 7:47 AM 1,148 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">


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

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




Andre de Kock
On 4/11/15, 9:06 AM

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.

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

on 4/11/15, 10:09 AM

You need to add it above the tag

Limitless Virtual Enterprise, Andre de Kock
on 4/11/15, 10:24 AM

... above the field name arch tag

Limitless Virtual Enterprise, Andre de Kock
on 4/11/15, 10:25 AM

Yes your answer working perfectly thanks...

on 4/11/15, 11:36 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/11/15, 7:47 AM
Seen: 1148 times
Last updated: 4/12/15, 2:10 AM