Comment 4 for bug 527120

Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

Hi Nhomar,

great you are picking up this bug. It is NOT account_anglo_saxon but standard stock module that is base for this bug. If it is solved in stock, I think (and hope) it is solved in anglo_saxon too, as here a inherit of the stock object is done.

Please keep in mind that when creating only a refund invoice without any stock move, you should NOT take into account "historical standard price. It is only a financial refund and deducted from the profit. The is no cost account/cost of sale needed.
So there is no need to store the historical standard price into the invoice line!!

When the refund is created from the picking (then there is a stock move) and only then the historical standard price should be available to reflect the correct cost price. We need to test both situations for sale and purchase side.

Resulting in that you only have to correct the stock object for the case of a "Return Packing". That not the property_account_expense_id is taken, but the price mentioned into the original account_move.
I do not know if it is possible to search that data, but I guess it could be as the original stock_move is available. From there you may be can search the related account_move and account_move_line to get the original price.