patch to set user type as System User if user has a role and if previous user type is Partner

This commit is contained in:
Anand Doshi
2013-03-26 12:25:11 +05:30
parent fc33ef6bfb
commit 9f91053201
2 changed files with 8 additions and 1 deletions

View File

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