跳至內容
選單
此問題已被標幟
1 回覆
10639 瀏覽次數

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.

相關帖文 回覆 瀏覽次數 活動
0
12月 22
1536
1
3月 15
4029
2
3月 15
5333
3
1月 19
26668
10
9月 20
28373