İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
2071 Görünümler

Hi all,

how i can recuperate the value of Sales price(list_price) of template.product in the order line pos.order.line , i need the sale price value at the time of order creation.
because the unit price displayed in the pos order line is a price based on the price list.
thanks

Avatar
Vazgeç
En İyi Yanıt

Hi Fojja,

You can retrieve the sales price (list_price) of a product in the pos.order.line by using the related field on the pos.order.line model to access the product.template model. The related field on the pos.order.line model is "product_id", and the related field on the product.template model is "list_price". To access the sales price, you would use the following code:

pythonCopy codeorder_line = self.env['pos.order.line'].browse(id)
sales_price = order_line.product_id.product_tmpl_id.list_price

Note that the value of id should be replaced with the actual ID of the pos.order.line you want to retrieve the sales price for.

Regards,

Team Ksolves!


Avatar
Vazgeç
Üretici

Hi Ksolves India Limited (Odoo Gold Partner)
thanks for responding me,
but i want to get the sale price at the time of order creation
and not actual product price in product.template

Hi Fojja, Please check updated answer as per your reply

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Tem 24
3012
0
Oca 23
9
1
Kas 22
3075
2
Tem 22
2676
1
Haz 22
2221