Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
10707 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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.

ผู้เขียน

i have edited my question.

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

ผู้เขียน

Thanks, it worked! :)

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

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ธ.ค. 22
1553
1
มี.ค. 15
4062
2
มี.ค. 15
5382
3
ม.ค. 19
26741
sales pricelist based on supplier prices แก้ไขแล้ว
10
ก.ย. 20
28426