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)""")

View File

@ -217,5 +217,6 @@ patch_list = [
"execute:webnotes.bean('Global Defaults').save()",
"patches.march_2013.p07_update_project_in_stock_ledger",
"execute:webnotes.bean('Style Settings').save() #2013-03-25",
"execute:webnotes.conn.set_value('Email Settings', None, 'send_print_in_body_and_attachment', 1)"
"execute:webnotes.conn.set_value('Email Settings', None, 'send_print_in_body_and_attachment', 1)",
"patches.march_2013.p09_unset_user_type_partner",
]