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.

0

how to display unit price in sales order lines?

By
Rahmat Awaludin
on 4/30/13, 1:53 AM 1,663 views

Hello..

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?

Thanks.

image description

0
jamesbale
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"/>

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

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

0 follower(s)

Stats

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