Automatic reorder works but rather slowly

Hello Sir; we have been trying out the auto reorder feature in erpnext. We have done the following: added the reorder level and reorder quantity, enabled the raise material request on reorder level in stock settings and selected all categories for the feature.

But we noticed that the material request doesn’t get raised; the only one which got raised delayed, a look at the stock ledger shows the item reached the low level a week before the material request got raised.

What are your thoughts on this?

Thanks.

1 Like

How are you triggering re-order by mail or Material Request?

Will need to see what went wrong with your account? Maybe a back-dated entry was made?

Thanks Sir; we are running off the VM for now; our dates are correct; we ensured the times on all our 3 machines are the same. We have ticked both methods under the stock settings screen; auto raise mreq and also alert by email. But the mreq doesn’t get raised even after we did a trial sale of the last of an item we set up. Maybe it’s something worth looking at; to see if the timing can be improved; maybe from the code.

Also Sir; just aside; how do we access the underlying db? I could see from the VM info it’s port 4306; what will be the uid and password to connect through sql workbench. Thanks a lot

For development,

Its best to understand the deployment

@rmehta Can you please explain what triggers a material request and when? Just a quick overview would do, so we can manage our expectations.

Check this in v5

https://github.com/frappe/erpnext/blob/v5.0/erpnext/stock/reorder_item.py

I’m sorry, but my Python is a bit rusty.

I noticed that when I leave my local instance on for a day, the Material Request eventually appears.

Can you please explain how it is created? Is it a scheduled process that runs every 12 hours? Is it triggered by some (user) action? I can’t figure it out…

What is your production setup?

Scheduler is triggered via the celery queue manager.

To check your queue status try:

$ bench frappe --doctor

From your latest answer I assume it’s through Scheduler and not triggered by some user action / document submission.

So the question becomes this:

  1. is there a process, run by Scheduler, that evaluates every hour/2 hours/x hours if there is need for Material Requests? Or does it work in a different way?

A generic document (user guide) describing this automatic reordering would be very much appreciated.

Re-order emails are triggered daily

Sorry we are badly backlogged in documentation.