Comment 23 for bug 613286

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote : Re: [stock] returned products from customers have price = 0

Thank you for your explanations Nhomar and Invitu, I understand better what you mean now! :-)

If we want to keep things simple, in line with what Fabien suggested on bug 610738, why do you think it would not be possible to do this in a module if the core stock module does not record the cost?
An additional module could add the required fields on stock.move, inherit the method that marks a stock.move as done (or the method that creates the whole picking in sale.order if you want the cost at the time of the sale) to record this value, and then inherit the stock wizards to suggest this value when it is relevant.
This is partially what the purchase module does at the moment in trunk to provide the actual purchase price of the product in the partial picking wizard for products with average cost enabled.

@invitu: the above should also take care of the currency and perhaps store it, so there is no question for determining it in that case. Without the above we still have an issue because the product cost on the product is expressed in the currency of the product's company, regardless of the company to which the move belongs to. The simplest is to always provide it in the currency of the product's company, and do the appropriate currency conversions if needed when using this value for other companies (like posting the corresponding accounting entries... but usually there will be no conversion to make as both companies will be the same)

I will merge some recent changes in stock module tonight so we can test tomorrow in trunk with fresh code (of course 'tomorrow' is a somewhat relative concept, I know ;-))

Thanks all for being so patient and always discussing these issues in a constructive way!