Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2066 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

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

Related Posts Odpovědi Zobrazení Aktivita
1
čvc 24
3005
0
led 23
9
1
lis 22
3073
2
čvc 22
2674
1
čvn 22
2218