mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
[fix] Don't create Time Logs against Production Order if Workstation is not specified in Operations
This commit is contained in:
@@ -217,10 +217,12 @@ class ProductionOrder(Document):
|
|||||||
for i, d in enumerate(self.operations):
|
for i, d in enumerate(self.operations):
|
||||||
self.set_operation_start_end_time(i, d)
|
self.set_operation_start_end_time(i, d)
|
||||||
|
|
||||||
|
if not d.workstation:
|
||||||
|
continue
|
||||||
|
|
||||||
time_log = make_time_log(self.name, d.operation, d.planned_start_time, d.planned_end_time,
|
time_log = make_time_log(self.name, d.operation, d.planned_start_time, d.planned_end_time,
|
||||||
flt(self.qty) - flt(d.completed_qty), self.project_name, d.workstation, operation_id=d.name)
|
flt(self.qty) - flt(d.completed_qty), self.project_name, d.workstation, operation_id=d.name)
|
||||||
|
|
||||||
if d.workstation:
|
|
||||||
# validate operating hours if workstation [not mandatory] is specified
|
# validate operating hours if workstation [not mandatory] is specified
|
||||||
self.check_operation_fits_in_working_hours(d)
|
self.check_operation_fits_in_working_hours(d)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user