I need to implement a custom POS interface in our existing POS structure. To do so i use oerplib:
>>> order_id = oerp.create('pos.order', {'session_id': session_id, 'pricelist_id': 1})
>>> order_line_id = oerp.create('pos.order.line', {'order_id': order_id, 'product_id': 23, 'qty': 1.0})
>>> order_line = oerp.browse('pos.order.line', order_line_id)
>>> order_line.price_unit
0.0
>>> order_line.product_id.list_price
1.0
We see that the unit_price was not updated based on the pricelist_id and product_id.
Any idear how I can retrieve the product price according to the pricelist without implement the logic myself?