fix: TypeError while creating WO from PP (backport #36136) (backport #36137) (#36138)

fix: `TypeError` while creating WO from PP (backport #36136) (#36137)

fix: `TypeError` while creating WO from PP (#36136)

(cherry picked from commit 8f5b94f5fd)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
(cherry picked from commit dd5101056d)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2023-07-14 18:10:16 +05:30
committed by GitHub
parent d420eeb884
commit c3acdcf3ac

View File

@@ -621,7 +621,7 @@ class ProductionPlan(Document):
def create_work_order(self, item):
from erpnext.manufacturing.doctype.work_order.work_order import OverProductionError
if item.get("qty") <= 0:
if flt(item.get("qty")) <= 0:
return
wo = frappe.new_doc("Work Order")