Odoo - Product Price - how product pricing is done in Odoo?

Odoo - Product Price - how product pricing is done in Odoo?

Support
Support
5000
| 2 1 2
Asked on 6/20/15, 2:29 PM
0
vote
4284 Views

In product_template model, there are five price-related columns: 
price, 
list_price, 
lst_price, 
standard_price
pricelist_id.

In product_product model, there are three price-related columns: 
price, 
price_extra, 
lst_price. 

standard_price
This is the cost or purchase price of a product. It is used to calculate the cost of goods -- mostly for accounting purpose. 
Whenever its value changes, Odoo calls _set_standard_price to store value history in the product.price.history table.

price_extra
The price_extra is a computed field. A product template may have multiple product variants that have a combination of some attribute values. 
An attribute value can have an extra price. For example, 32GB memory may add an extra $50. 
The sum of hose extra prices for applicable product variant attributes will the the price_extra.

list_price
This field is the sales or product price displayed in a web site. When one wants to change the list_price of a product, 
it should change it in the product template. For individual product variant, change the attribute extra price.

lst_price in product_template model
it seems that the lst_price field can be used for both product_template and product_product as the product sale price.
In product_template model, it points to the list_price field.

lst_price in product_product model
In product_product model, it is computed field that calls _product_lst_price. 
This function calculates the lst_price of a product variant by adding its list_price and its price_extra. 
The field also has an inverse function _set_product_lst_price that sets list_price when lst_price changes. 
The list_price value is the subtraction of price_extra from lst_price.

For a product variant, the lst_price is the sales or product price displayed in a web site.

price
In both product_template model and product_product model, it is a computed field to calculate its value.
The method uses product.pricelist model to calculate a price based on rules defined in product.pricelist.item. 
Many context variables, such as partner, UOM, currency and rule name, are used in finding the price. 
The price_get method is called in the calculation.

Support
Support
5000
| 2 1 2
Answered on 6/20/15, 2:29 PM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This forum is for HiTechnologia Employees & just Odoo general knowledge purpose only.

Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 6/20/15, 2:29 PM
Seen: 4284 times
Last updated: 6/20/15, 2:29 PM