From 5d455577297c50934ca40ad7ed0367127727a3cc Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 8 Oct 2013 18:23:05 +0530 Subject: [PATCH] [wsgi] [minor] fixed flags --- .../production_planning_tool/production_planning_tool.py | 4 ++-- setup/page/setup_wizard/setup_wizard.js | 3 +-- setup/page/setup_wizard/setup_wizard.py | 9 ++++++--- startup/__init__.py | 2 -- utilities/demo/make_demo.py | 6 +++--- utilities/demo/make_erpnext_demo.py | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/manufacturing/doctype/production_planning_tool/production_planning_tool.py index 5480f177d9..6f15d4c9f1 100644 --- a/manufacturing/doctype/production_planning_tool/production_planning_tool.py +++ b/manufacturing/doctype/production_planning_tool/production_planning_tool.py @@ -215,14 +215,14 @@ class DocType: pro = webnotes.new_bean("Production Order") pro.doc.fields.update(items[key]) - webnotes.mute_messages = True + webnotes.flags.mute_messages = True try: pro.insert() pro_list.append(pro.doc.name) except OverProductionError, e: pass - webnotes.mute_messages = False + webnotes.flags.mute_messages = False return pro_list diff --git a/setup/page/setup_wizard/setup_wizard.js b/setup/page/setup_wizard/setup_wizard.js index 25c95e0b0a..905b6a9769 100644 --- a/setup/page/setup_wizard/setup_wizard.js +++ b/setup/page/setup_wizard/setup_wizard.js @@ -12,7 +12,6 @@ wn.pages['setup-wizard'].onload = function(wrapper) { on_complete: function(wiz) { var values = wiz.get_values(); wiz.show_working(); - console.log(values); wn.call({ method: "setup.page.setup_wizard.setup_wizard.setup_account", args: values, @@ -26,7 +25,7 @@ wn.pages['setup-wizard'].onload = function(wrapper) { wiz.show_complete(); setTimeout(function() { if(user==="Administrator") { - wn.msgprint(wn._("Login with your new User ID") + ":" + values.email); + msgprint(wn._("Login with your new User ID") + ":" + values.email); setTimeout(function() { wn.app.logout(); }, 2000); diff --git a/setup/page/setup_wizard/setup_wizard.py b/setup/page/setup_wizard/setup_wizard.py index 3758b2d5bf..714df2ec0f 100644 --- a/setup/page/setup_wizard/setup_wizard.py +++ b/setup/page/setup_wizard/setup_wizard.py @@ -35,20 +35,23 @@ def setup_account(args=None): webnotes.clear_cache() webnotes.conn.commit() + + # suppress msgprints + webnotes.local.message_log = [] return "okay" def update_profile_name(args): - if args.get("email_id"): + if args.get("email"): args['name'] = args.get("email") - webnotes.mute_emails = True + webnotes.flags.mute_emails = True webnotes.bean({ "doctype":"Profile", "email": args.get("email"), "first_name": args.get("first_name"), "last_name": args.get("last_name") }).insert() - webnotes.mute_emails = False + webnotes.flags.mute_emails = False from webnotes.auth import _update_password _update_password(args.get("email"), args.get("password")) diff --git a/startup/__init__.py b/startup/__init__.py index 227846c46d..802daac9b3 100644 --- a/startup/__init__.py +++ b/startup/__init__.py @@ -27,8 +27,6 @@ profile_defaults = { "Territory": "territory" } -application_home_page = "desktop" - # add startup propertes mail_footer = """
Sent via ERPNext
""" diff --git a/utilities/demo/make_demo.py b/utilities/demo/make_demo.py index 62371a36c8..d335528dfc 100644 --- a/utilities/demo/make_demo.py +++ b/utilities/demo/make_demo.py @@ -30,9 +30,9 @@ prob = { } def make(reset=False, simulate=True): - #webnotes.print_messages = True - webnotes.mute_emails = True - webnotes.rollback_on_exception = True + #webnotes.flags.print_messages = True + webnotes.flags.mute_emails = True + webnotes.flags.rollback_on_exception = True if not webnotes.conf.demo_db_name: raise Exception("conf.py does not have demo_db_name") diff --git a/utilities/demo/make_erpnext_demo.py b/utilities/demo/make_erpnext_demo.py index a57441b556..d67fb5ece0 100644 --- a/utilities/demo/make_erpnext_demo.py +++ b/utilities/demo/make_erpnext_demo.py @@ -6,7 +6,7 @@ import webnotes, os import utilities.demo.make_demo def make_demo_app(site=None): - webnotes.mute_emails = 1 + webnotes.flags.mute_emails = 1 webnotes.init(site=site) utilities.demo.make_demo.make(reset=True, simulate=False)