Planned Start Date made mandatory in production order
server side check added to not plan operations if planned_start_date is None
Production Order on submit - unwanted error messsages problem fixed.
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.json b/erpnext/manufacturing/doctype/production_order/production_order.json
index 59473ad..4463cd0 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.json
+++ b/erpnext/manufacturing/doctype/production_order/production_order.json
@@ -172,7 +172,8 @@
"fieldtype": "Datetime",
"label": "Planned Start Date",
"permlevel": 0,
- "precision": ""
+ "precision": "",
+ "reqd": 1
},
{
"fieldname": "planned_end_date",
@@ -354,8 +355,8 @@
"icon": "icon-cogs",
"idx": 1,
"in_create": 0,
- "is_submittable": 1,
- "modified": "2015-03-10 17:02:28.401930",
+ "is_submittable": 1,
+ "modified": "2015-04-01 07:32:38.426624",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Order",
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py
index 6818ba9..c8c3f65 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.py
+++ b/erpnext/manufacturing/doctype/production_order/production_order.py
@@ -201,7 +201,7 @@
Planned Start Date. Time logs will be created and remain in Draft mode and must be submitted
before manufacturing entry can be made."""
- if not self.operations:
+ if not self.operations and not self.planned_start_date:
return
time_logs = []
@@ -248,6 +248,7 @@
self.planned_end_date = self.operations[-1].planned_end_time
if time_logs:
+ frappe.local.message_log = []
frappe.msgprint(_("Time Logs created:") + "\n" + "\n".join(time_logs))
def set_operation_start_end_time(self, i, d):