fix: Stock Reservation Entry was not getting created (backport #42033) (#42035)

fix: Stock Reservation Entry was not getting created (#42033)

(cherry picked from commit 1a9899b32b)

Co-authored-by: Poorvi-R-Bhat <poorvi.r.bhat@gmail.com>
This commit is contained in:
mergify[bot]
2024-06-26 09:11:01 +05:30
committed by GitHub
parent 068de08bbb
commit e278fc683f

View File

@@ -75,8 +75,7 @@ frappe.ui.form.on("Sales Order", {
if (
frm.doc.__onload &&
frm.doc.__onload.has_unreserved_stock &&
flt(frm.doc.per_picked) === 0 &&
frappe.model.can_create("Stock Reservation Entry")
flt(frm.doc.per_picked) === 0
) {
frm.add_custom_button(
__("Reserve"),