From dd5101056dd6f54d13f981c608a80cf868ea2b15 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 18:03:53 +0530 Subject: [PATCH] fix: `TypeError` while creating WO from PP (backport #36136) (#36137) fix: `TypeError` while creating WO from PP (#36136) (cherry picked from commit 8f5b94f5fd6a7ba283f412cb644193264e6f15c7) Co-authored-by: s-aga-r --- .../manufacturing/doctype/production_plan/production_plan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 5f957a5442b..a988badd744 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -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")