Unable to delete Stock Ledger Entry

I created an item with opening stock by mistake so I wanted to delete the item. So I cancelled the Stock Entry and deleted the Stock Entry then I tried to delete the item but it said that the item is linked with a Stock Ledger Entry. I cancelled the Stock Ledger entry but there is no option to delete it. Now I am still unable to delete the item. How should I handle this? I an using ERPNext: v13.0.0-beta.6

So for you to be able to delete the Item, you need to cancel (done :white_check_mark: ) and delete the Stock entry, and for you to delete the stock entry you need to have permissions for that.

It seems you don’t have those permissions, so you need to contact your admin to grant it.

In v13, stock ledger entries are immutable and can’t be deleted. If you’ve canceled the stock entry, the opening balance should be removed, but you won’t be able to delete the entry or the item.

Since you have already created and cancelled the Stock Entry, the effect has already been nullified, since you cannot delete it now, you can simply disable it to avoid linking it to other documents.

@harshit-30 How do I disable it?

I am the administrator and I have all the permissions but the Role Permission Manager for Stock Ledger Entry doesn’t have “Delete” option.

It is a feature, you cannot disable it.
You can read more about it here.

If you’re asking about how to disable the immutable ledger, @harshit-30 is correct that you can’t. If you’re asking about how to disable to item so it doesn’t get used in other transactions, there’s a checkbox on the top right of the item document form.

1 Like