Unassign from todo. (#10896)
Unassign from todo when the status is changed to Closed or Cancelled
This commit is contained in:
parent
367b90e3ae
commit
3f7d96ecba
@ -63,6 +63,12 @@ class Task(Document):
|
||||
self.check_recursion()
|
||||
self.reschedule_dependent_tasks()
|
||||
self.update_project()
|
||||
self.unassign_todo()
|
||||
|
||||
def unassign_todo(self):
|
||||
if self.status == "Closed" or self.status == "Cancelled":
|
||||
from frappe.desk.form.assign_to import clear
|
||||
clear(self.doctype, self.name)
|
||||
|
||||
def update_total_expense_claim(self):
|
||||
self.total_expense_claim = frappe.db.sql("""select sum(total_sanctioned_amount) from `tabExpense Claim`
|
||||
@ -171,3 +177,4 @@ def set_tasks_as_overdue():
|
||||
and exp_end_date < CURDATE()
|
||||
and `status` not in ('Closed', 'Cancelled')""")
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user