brotherton-erpnext/erpnext/patches/v7_1/set_sales_person_status.py

9 lines
306 B
Python
Raw Normal View History

2016-12-12 05:42:07 +00:00
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
2016-12-13 05:57:46 +00:00
where (employee is null or employee = ''
or employee IN (select employee from tabEmployee where status != "Left"))""")