def close_task(assign_name=None,): frappe.db.sql("""Update `tabNNAssign` set close_status=1 where name=%s""",(assign_name)) task=frappe.db.sql("""select parent from tabNNAssign where name=%s""",(assign_name)) mode=1; task_name=task if task: close_task_update(task) mail_format_pms(task_name,mode)
def close_task(assign_name=None,): status=frappe.db.sql("""Update `tabNNAssign` set close_status=1 where name=%s""", (assign_name)) task = frappe.db.sql("""select parent from tabNNAssign where name=%s""", (assign_name)) mode = 1; task_name = task if task: doctype = "NNTask"; count = frappe.db.sql("""select *from tabNNAssign where close_status=0 and parent=%s and parenttype=%s""", (task_name, doctype)) if not count: close_task_update(task) if status: mail_format_pms(task_name, mode)
def after_insert(self): task_name = self.task mode = 0 mail_format_pms(task_name, mode)
def after_insert(self): task_name=self.task mode=0 mail_format_pms(task_name,mode)