Making Item "Maintain Stock" true after it has been established as false?


So a user error caused few hundred items to be stored as Maintain Stock = False. And these items were purchased and sold. It was during an inventory check that the error was detected because those items didn’t go into inventory.

Currently the only solution I can think about would be to re-create those items and process the invoices again. But was wondering if there is an elegant way to fix this? Meaning if there is way I can update that field, and process the invoices again to update the stock to the correct value?

Hi @ablishek,

If the item is linked with any type of submitted transaction then you can’t change the value of maintain stock.
In that case, you can disable the item and make a new maintain stock item.


Thanks, that was my original thought. The doubt I had was that I wouldn’t be able to maintain the same Item Code as it would already have existed in the disabled item. Correct?

Hi @ablishek,

I think item code maintain for you can rename old item code then when you will create a new item code name set old item code before rename.


You can access Database from program like dbeaver, heidisql and then go to item table and edit the maintain stock value directly in the database of all affected items.

Then reload the erpnext in browser. it will solve your issue.

a bit more of an extreme solution, but it works none the less. Thanks!