System Freeze on Delivery Note Cancellation

Hi all,

I have trouble in cancelling Delivery Note which created around 4 months ago ( newly created delivery note around 10,000 ). When I cancel that delivery note, the screen freeze and dim, check in console, I see the request timeout. However, if I cancel recent delivery note (around recent 2 weeks), it’s ok

Do you have any suggestion in solving this issue?

Best Regards,

Too many lines in one delivery note. As mentioned in console its timeout issue. You would need to increase the time. I personally dont know how its done. Maybe someone else can help.

Other alternative is to cancel through a script.

Ah no, it’s not too many line in a delivery note. I mean from that delivery note created up to now, there around 10,000 other delivery notes were created with that item. I guess it make a huge stack of Stock Ledger to modify which lead to the freezing. I try to run in “bench console” to cancel it, however, it lead to the lock timeout of database.

you can try extending the http_timeout.
bench config http_timeout 6000

Another way to cancel the delivery note is to do a reverse stock entry. Receive the delivered goods into the warehouse again or do a Sales Return.

The problem with cancelling a delivery note is ERPNext will recompute all future transactions from this transaction to the newest transaction for the stock valuation.

In many ERP systems, they disallow cancellations. Instead, when the user wants to cancel, they generate a reverse transaction on the current date.