[minor] [cleanup] [issue] webnotes/erpnext#438 - change user_type Partner to Website User

This commit is contained in:
Anand Doshi
2013-07-25 17:17:47 +05:30
parent d2b3fe8a02
commit 2b1d33f178
4 changed files with 11 additions and 8 deletions

View File

@@ -0,0 +1,9 @@
import webnotes
def execute():
webnotes.conn.sql("""update `tabProfile` set user_type="Website User" where user_type="Partner" """)
webnotes.conn.sql("""update `tabProfile` set user_type="System User" where ifnull(user_type, "")="" """)
webnotes.conn.sql("""update `tabProfile` set user_type='System User'
where user_type='Website User' and exists (select name from `tabUserRole`
where parent=`tabProfile`.name)""")