Skip to content
Snippets Groups Projects
Commit 85e21d17 authored by amoyaux's avatar amoyaux
Browse files

[FIX] stock : scheduler release lock too fast

Issue: 741582

This bug happens when you click multiple time quickly on 'run scheduler' button
or if you call 'run reordering rules' and then 'run scheduler' rapidly
It could create duplicate PO or MO.

This happens because the run_scheduler function free the lock while it should
not. ProcurementSudo was created with the old cursor that contains the lock and
the record set that search returns also contains this cursor. The run will call the record set with the bad cursor and commit the lock instead of the wanted
behavior.

This commit creates the ProcurementSudo with the new cursor that does not
contains the lock.
parent 4a0f9da2
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment