mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 05:09:11 +00:00
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:
6
patches/march_2013/p09_unset_user_type_partner.py
Normal file
6
patches/march_2013/p09_unset_user_type_partner.py
Normal 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)""")
|
||||
Reference in New Issue
Block a user