[wsgi] [minor] fixed flags
This commit is contained in:
parent
8c5a5f1ed5
commit
5d45557729
@ -215,14 +215,14 @@ class DocType:
|
|||||||
pro = webnotes.new_bean("Production Order")
|
pro = webnotes.new_bean("Production Order")
|
||||||
pro.doc.fields.update(items[key])
|
pro.doc.fields.update(items[key])
|
||||||
|
|
||||||
webnotes.mute_messages = True
|
webnotes.flags.mute_messages = True
|
||||||
try:
|
try:
|
||||||
pro.insert()
|
pro.insert()
|
||||||
pro_list.append(pro.doc.name)
|
pro_list.append(pro.doc.name)
|
||||||
except OverProductionError, e:
|
except OverProductionError, e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
webnotes.mute_messages = False
|
webnotes.flags.mute_messages = False
|
||||||
|
|
||||||
return pro_list
|
return pro_list
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,6 @@ wn.pages['setup-wizard'].onload = function(wrapper) {
|
|||||||
on_complete: function(wiz) {
|
on_complete: function(wiz) {
|
||||||
var values = wiz.get_values();
|
var values = wiz.get_values();
|
||||||
wiz.show_working();
|
wiz.show_working();
|
||||||
console.log(values);
|
|
||||||
wn.call({
|
wn.call({
|
||||||
method: "setup.page.setup_wizard.setup_wizard.setup_account",
|
method: "setup.page.setup_wizard.setup_wizard.setup_account",
|
||||||
args: values,
|
args: values,
|
||||||
@ -26,7 +25,7 @@ wn.pages['setup-wizard'].onload = function(wrapper) {
|
|||||||
wiz.show_complete();
|
wiz.show_complete();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if(user==="Administrator") {
|
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() {
|
setTimeout(function() {
|
||||||
wn.app.logout();
|
wn.app.logout();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|||||||
@ -36,19 +36,22 @@ def setup_account(args=None):
|
|||||||
webnotes.clear_cache()
|
webnotes.clear_cache()
|
||||||
webnotes.conn.commit()
|
webnotes.conn.commit()
|
||||||
|
|
||||||
|
# suppress msgprints
|
||||||
|
webnotes.local.message_log = []
|
||||||
|
|
||||||
return "okay"
|
return "okay"
|
||||||
|
|
||||||
def update_profile_name(args):
|
def update_profile_name(args):
|
||||||
if args.get("email_id"):
|
if args.get("email"):
|
||||||
args['name'] = args.get("email")
|
args['name'] = args.get("email")
|
||||||
webnotes.mute_emails = True
|
webnotes.flags.mute_emails = True
|
||||||
webnotes.bean({
|
webnotes.bean({
|
||||||
"doctype":"Profile",
|
"doctype":"Profile",
|
||||||
"email": args.get("email"),
|
"email": args.get("email"),
|
||||||
"first_name": args.get("first_name"),
|
"first_name": args.get("first_name"),
|
||||||
"last_name": args.get("last_name")
|
"last_name": args.get("last_name")
|
||||||
}).insert()
|
}).insert()
|
||||||
webnotes.mute_emails = False
|
webnotes.flags.mute_emails = False
|
||||||
from webnotes.auth import _update_password
|
from webnotes.auth import _update_password
|
||||||
_update_password(args.get("email"), args.get("password"))
|
_update_password(args.get("email"), args.get("password"))
|
||||||
|
|
||||||
|
|||||||
@ -27,8 +27,6 @@ profile_defaults = {
|
|||||||
"Territory": "territory"
|
"Territory": "territory"
|
||||||
}
|
}
|
||||||
|
|
||||||
application_home_page = "desktop"
|
|
||||||
|
|
||||||
# add startup propertes
|
# add startup propertes
|
||||||
mail_footer = """<div style="padding: 7px; text-align: right; color: #888"><small>Sent via
|
mail_footer = """<div style="padding: 7px; text-align: right; color: #888"><small>Sent via
|
||||||
<a style="color: #888" href="https://erpnext.com">ERPNext</a></div>"""
|
<a style="color: #888" href="https://erpnext.com">ERPNext</a></div>"""
|
||||||
|
|||||||
@ -30,9 +30,9 @@ prob = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def make(reset=False, simulate=True):
|
def make(reset=False, simulate=True):
|
||||||
#webnotes.print_messages = True
|
#webnotes.flags.print_messages = True
|
||||||
webnotes.mute_emails = True
|
webnotes.flags.mute_emails = True
|
||||||
webnotes.rollback_on_exception = True
|
webnotes.flags.rollback_on_exception = True
|
||||||
|
|
||||||
if not webnotes.conf.demo_db_name:
|
if not webnotes.conf.demo_db_name:
|
||||||
raise Exception("conf.py does not have demo_db_name")
|
raise Exception("conf.py does not have demo_db_name")
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import webnotes, os
|
|||||||
import utilities.demo.make_demo
|
import utilities.demo.make_demo
|
||||||
|
|
||||||
def make_demo_app(site=None):
|
def make_demo_app(site=None):
|
||||||
webnotes.mute_emails = 1
|
webnotes.flags.mute_emails = 1
|
||||||
webnotes.init(site=site)
|
webnotes.init(site=site)
|
||||||
|
|
||||||
utilities.demo.make_demo.make(reset=True, simulate=False)
|
utilities.demo.make_demo.make(reset=True, simulate=False)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user