[minor] [cleanup] [issue] webnotes/erpnext#438 - change user_type Partner to Website User
This commit is contained in:
parent
d2b3fe8a02
commit
2b1d33f178
@ -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)""")
|
@ -1,6 +0,0 @@
|
||||
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)""")
|
@ -194,7 +194,6 @@ patch_list = [
|
||||
"execute:webnotes.reload_doc('website', 'doctype', 'web_page') #2013-03-25",
|
||||
"execute:webnotes.reload_doc('setup', 'doctype', 'sales_partner') #2013-06-25",
|
||||
"execute:webnotes.conn.set_value('Email Settings', None, 'send_print_in_body_and_attachment', 1)",
|
||||
"patches.march_2013.p09_unset_user_type_partner",
|
||||
"patches.march_2013.p10_set_fiscal_year_for_stock",
|
||||
"patches.march_2013.p10_update_against_expense_account",
|
||||
"patches.march_2013.p11_update_attach_files",
|
||||
@ -262,4 +261,5 @@ patch_list = [
|
||||
"execute:webnotes.reload_doc('stock', 'Print Format', 'Delivery Note Spartan') # 2013-07-22",
|
||||
"patches.july_2013.p08_custom_print_format_net_total_export",
|
||||
"patches.july_2013.p09_remove_website_pyc",
|
||||
"patches.july_2013.p10_change_partner_user_to_website_user",
|
||||
]
|
@ -30,7 +30,7 @@ def on_login_post_session(login_manager):
|
||||
login_manager.user=='Administrator' and '#8CA2B3' or '#1B750D')
|
||||
webnotes.conn.commit()
|
||||
|
||||
if webnotes.conn.get_value("Profile", webnotes.session.user, "user_type") == "Partner":
|
||||
if webnotes.conn.get_value("Profile", webnotes.session.user, "user_type") == "Website User":
|
||||
from website.helpers.cart import set_cart_count
|
||||
set_cart_count()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user