mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
[fix] Task should be mandatory in Time Log only when Project is mentioned but Production Order is not
This commit is contained in:
@@ -221,7 +221,8 @@ class TimeLog(Document):
|
|||||||
self.billing_amount = 0
|
self.billing_amount = 0
|
||||||
|
|
||||||
def validate_task(self):
|
def validate_task(self):
|
||||||
if self.project and not self.task:
|
# if a time log is being created against a project without production order
|
||||||
|
if (self.project and not self.production_order) and not self.task:
|
||||||
frappe.throw(_("Task is Mandatory if Time Log is against a project"))
|
frappe.throw(_("Task is Mandatory if Time Log is against a project"))
|
||||||
|
|
||||||
def update_task(self):
|
def update_task(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user