Odoo Help


how to display unit price in sales order lines?

Rahmat Awaludin
on 4/30/13, 1:53 AM 2,852 views


I'm trying to get history of my product i sales. Here is what I do:

  1. Go to Sales / Products / Products
  2. Select a Product
  3. Click on More / Sales Order Lines to get the history

But, i can't my product's unit price in list view. How to display it?


image description

On 4/30/13, 3:13 AM

To shoow Unit price in list view you have to inherit the list view "view_order_line_tree" of sale.order.line and add price_unit field in this view.

> <record
> id="view_sale_order_line_list_price_unit_inherit"
> model="ir.ui.view">
>            <field name="name">sale.order.line.form.inherit</field>
>            <field name="model">sale.order.line</field>
>            <field name="inherit_id" ref="sale.view_order_line_tree"/>
>            <field name="arch" type="xml">
>                 <field name="product_uom_qty"
> position="after">
>                     <field name="price_unit"/>
>                 </field>
>            </field>
>         </record>

What name of file I should edit exactly? Thanks.

Rahmat Awaludin
on 4/30/13, 4:06 AM

i have edited my question.

Rahmat Awaludin
on 4/30/13, 4:14 AM

go to sale module sale => sale_view.xml , view => view_order_line_tree => add field <field name="price_unit"/> after field <field name="product_uom_qty" string="Qty"/>

on 4/30/13, 4:38 AM

Thanks, it worked! :)

Another step you forget is to update this module after changing this file.

Rahmat Awaludin
on 4/30/13, 4:57 AM

is there any way to disable a user from editing the unit price of the product.

on 7/24/13, 4:28 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

0 follower(s)


Asked: 4/30/13, 1:53 AM
Seen: 2852 times
Last updated: 3/16/15, 8:10 AM