This question has been flagged
1 Reply
4840 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?

Avatar
Discard

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

Author

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

Best Answer

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.

 

Avatar
Discard