patch to set user type as System User if user has a role and if previous user type is Partner
diff --git a/patches/march_2013/p09_unset_user_type_partner.py b/patches/march_2013/p09_unset_user_type_partner.py
new file mode 100644
index 0000000..cc5cdce
--- /dev/null
+++ b/patches/march_2013/p09_unset_user_type_partner.py
@@ -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)""")
\ No newline at end of file
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 00dd5da..0c5427b 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -217,5 +217,6 @@
"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",
]
\ No newline at end of file