mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-13 15:27:12 +00:00
Activity made compulsory for time_log_type Project
This commit is contained in:
@@ -24,6 +24,7 @@ class TimeLog(Document):
|
||||
self.check_workstation_timings()
|
||||
self.validate_production_order()
|
||||
self.validate_project()
|
||||
self.validate_activity()
|
||||
|
||||
def on_submit(self):
|
||||
self.update_production_order()
|
||||
@@ -134,6 +135,11 @@ class TimeLog(Document):
|
||||
if not self.project:
|
||||
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()
|
||||
def get_workstation(production_order, operation):
|
||||
"""Returns workstation name from Production Order against an associated Operation.
|
||||
|
||||
Reference in New Issue
Block a user