From 2017796de79a44f20a5d414a61c1dcc18576c956 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Fri, 30 Jan 2015 15:26:04 +0530 Subject: [PATCH] fixes in auto create time logs --- .../manufacturing/doctype/production_order/production_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py index 83a7ff12ab6..396ec98c519 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.py +++ b/erpnext/manufacturing/doctype/production_order/production_order.py @@ -298,7 +298,7 @@ def make_time_log(name, operation, from_time, to_time, qty=None, project=None, @frappe.whitelist() def auto_make_time_log(production_order_id): - if frappe.db.get_value("Time Log", filters={"production_order": production_order_id}): + if frappe.db.get_value("Time Log", filters={"production_order": production_order_id, "docstatus":1}): frappe.throw(_("Time logs already exists against this Production Order")) time_logs = []