fix: use `docstatus` instead of `status`
(cherry picked from commit 1423b38d50)
Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
This commit is contained in:
@@ -705,8 +705,8 @@ def get_mapped_subcontracting_order(source_name, target_doc=None):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def is_subcontracting_order_created(po_name) -> bool:
|
def is_subcontracting_order_created(po_name) -> bool:
|
||||||
count = frappe.db.count(
|
return (
|
||||||
"Subcontracting Order", {"purchase_order": po_name, "status": ["not in", ["Draft", "Cancelled"]]}
|
True
|
||||||
|
if frappe.db.exists("Subcontracting Order", {"purchase_order": po_name, "docstatus": ["=", 1]})
|
||||||
|
else False
|
||||||
)
|
)
|
||||||
|
|
||||||
return True if count else False
|
|
||||||
|
|||||||
Reference in New Issue
Block a user