brotherton-erpnext/erpnext/patches/v7_1/set_sales_person_status.py
2016-12-12 19:12:41 +05:30

7 lines
262 B
Python

from __future__ import unicode_literals
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")""")