Odoo Help

Welcome!

This community 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.

1

Xpath is not working in Sale.order.line

By
Odoo
on 4/11/15, 7:47 AM 632 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>

2
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?

Odoo
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...

Odoo
on 4/11/15, 11:36 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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