Activity made compulsory for time_log_type Project
This commit is contained in:
parent
93638bd179
commit
b744e16a83
@ -24,6 +24,7 @@ class TimeLog(Document):
|
|||||||
self.check_workstation_timings()
|
self.check_workstation_timings()
|
||||||
self.validate_production_order()
|
self.validate_production_order()
|
||||||
self.validate_project()
|
self.validate_project()
|
||||||
|
self.validate_activity()
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
self.update_production_order()
|
self.update_production_order()
|
||||||
@ -134,6 +135,11 @@ class TimeLog(Document):
|
|||||||
if not self.project:
|
if not self.project:
|
||||||
frappe.throw(_("Project is Mandatory."))
|
frappe.throw(_("Project is Mandatory."))
|
||||||
|
|
||||||
|
def validate_activity(self):
|
||||||
|
if self.time_log_for == 'Project':
|
||||||
|
if not self.activity:
|
||||||
|
frappe.throw(_("Activity is Mandatory."))
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_workstation(production_order, operation):
|
def get_workstation(production_order, operation):
|
||||||
"""Returns workstation name from Production Order against an associated Operation.
|
"""Returns workstation name from Production Order against an associated Operation.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user