Odoo Help


Formula for average cost calculation in odoo-7?

on 2/18/15, 7:50 AM 1,154 views

Can any one give me the formula odoo-7 how average cost calculating? I have done few transactions and realize that it's not giving like cost price= sum(cost prices of po's)/number of po's   of particular product. Can any one tell me formula for costprice of produt when i use Averaged cost as costing method?

You can select average costing method from Settings,, then why do you need your own code,, can you please explain?

on 2/18/15, 8:00 AM

This is not for coding. I want know what formula odoo following. One of my clients asked me this question.

on 2/18/15, 2:01 PM


| 6 5 7
Tbilisi, Georgia
On 2/18/15, 8:58 AM

Yes, it's not the "sum(cost prices of po's)/number of po"... if you've  used Costing Method = Average Price then a Cost Price (tech: standard_price) is updated for a Product when you purchase the Product (more precisely when incoming shipment is happens, as standard_price is updated by the Warehouse module) and the formula of price update is as follows:

( "Quantity On Hand"(tech:qty_available)  *  "Cost Price"(tech:standard_price) + "New Quantity"(quantity of product in this shipment) * "New Price"(price of product in this shipment)  )  /  ( "Quantity On Hand" + "New Quantity" )

On outgoing shipments (Sales, etc.) Cost Price is not updated, but it does not means that outgoing shipments does not affect the Cost Price. As because of outgoing shipment  "Quantity On Hand" will be decreased, it will influence Cost Price calculated on the next incoming shipment,  it's possible that on the next incoming shipment you'll get different Cost price if you'll have some outgoing shipments between the two incoming shipments. So incoming shipments are updating Cost Price directly and outgoing shipments are influencing Cost Price indirectly, because of changing "Quantity On Hand".

Also there is possibility to change/adjust manually both the "Cost Price" and "Quantity on Hand", in the corresponding form (at '/Warehouse/Products/Products') by clicking on a 'update' link.


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!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/18/15, 7:50 AM
Seen: 1154 times
Last updated: 4/15/16, 9:15 AM