Update set_sales_person_status.py

This commit is contained in:
Nabin Hait 2016-12-13 11:27:46 +05:30 committed by GitHub
parent f0b0db444d
commit 346a6a5d84

View File

@ -4,4 +4,5 @@ import frappe
def execute():
frappe.reload_doc('setup','doctype','sales_person')
frappe.db.sql("""update `tabSales Person` set enabled=1
where employee IN (select employee from tabEmployee where status != "Left")""")
where (employee is null or employee = ''
or employee IN (select employee from tabEmployee where status != "Left"))""")