brotherton-erpnext/patches/november_2012/disable_cancelled_profiles.py
2013-11-20 13:00:28 +05:30

11 lines
371 B
Python

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import webnotes
def execute():
"""
in old system, deleted profiles were set as docstatus=2
in new system, its either disabled or deleted.
"""
webnotes.conn.sql("""update `tabProfile` set docstatus=0, enabled=0
where docstatus=2""")