How to automatically set Empty Batches to "Expired"


When creating manufacture Stock Entry from Work Order, it always fetch the oldest active batch even if the batch is empty. I always need to manually set my empty batches to “Expired” so they aren’t fetched in manufacture stock entry.

Is there a way to automatically set Empty Batches to “Expired”?

Or do you have any other solution?

Thank you for your help!

would you mind to provide reproducible steps and needed screenshot for better understanding your issue. also please mention the frappe/erpnext version in use.

ERPNext : v13.20.1

Here is the reproductible steps :

Thank you!

Hi @FredericVerville ,
How to do this ? I m struck this point
Can you please guide us ?


Hi Ketan,

We used an automation app to do it ( we use Webhook from ERPNExt. If you want to use this third party application for this problem, I can send you the scenario.

Thank you!