I could not find update for this issue on trunk (
https://github.com/tryton/stock/blob/develop/inventory.py).
So, I updated the inventory.py to input unit_price and updated get_move() method of stock.inventory.line as following:
origin=self,
+unit_price = unit_price,
+cost_price = unit_price,
Now, when I confirm inventory after this update, the Account Move is fine and it is using the passed cost_price, but the product's cost_price (cost method is Average) is not updated.
To resolve this issue, I updated following method of stock.move class in move.py file and added 'lost_found' location type:
def _do(self):
if (self.from_location.type in ('supplier', 'production', 'lost_found')
Now the average cost price of the product is updated but it is not correctly calculated.
Kindly guide me where to get the latest code for resolving this issue, if it is fixed or kindly help me writing the code to resolve this issue.