Skip to Content
Menu
This question has been flagged

Hi all,

I ran into a little problem last night when entering a sales order and trying to proces the shipment.

I keep getting "the cost of xxxxx is 0, set the cost price of this product of change the settings for a correct inventory valuation"

My inventory valuation on all categories is set to automated and FIFO. So i can't set a product cost manually. It's only happening on this variation of this product (so far) I have sales with 2 other variations of the same product with no issues and I can see a cost there.

I tried a sale with another variation of the same product which has no previous sales (like the one with the problem) and it passed without issues, showing a cost price afterwards.

By the way, is it normal that cost is set to 0 if no sales of a product have occured? So it's always showing the cost of the last product sold. No problem when doing average cost but with FIFO the cost can change from 1 sale to another depending on the purchase value, so it's showing incorrect margin values on the sales order.

I tried to bypass the problem byt doing a manual inventory adjustment but it wouldn't let me, giving the same error. I could however set it to 0 and then to the new value. Then it gave a whole different total value (too high) so I used the stock_inventory_revaluation plugin to change it back. This worked and the product variation now showed a cost price.

So I tried a sale with the same product again which resulted in the same error: cost price is 0.

Could this be a case of data corruption? Or some weird bug?

I'm using Odoo 12 Community on Ubuntu18.04.4 LTS


Avatar
Discard
Author Best Answer

It's been happening on more products now.
At first I thought it was a too low value issue. The product variant in question has a stock of 1000 with a total value of 1,2 euro so 1 item would come to 0,0012 euro and rounding to 2 decimals gives 0.
But now it's happening on products with a value of 0,075. The only thing that's the same is that it's the first time they are getting sold. But it gives the same error: Cost of product is 0, please set a costprice or adjust your settings to maintain a correct inventory value.


Avatar
Discard
Related Posts Replies Views Activity
1
Aug 20
2414
2
Nov 20
6839
3
Nov 17
5046
2
Mar 15
7928
0
Oct 24
2346