Merge branch 'master' of github.com:webnotes/erpnext into navupdate
This commit is contained in:
commit
2478363bba
@ -66,7 +66,7 @@ def make_feed(feedtype, doctype, name, owner, subject, color):
|
||||
|
||||
def update_feed(doc, method=None):
|
||||
"adds a new feed"
|
||||
if method=='on_update':
|
||||
if method in ['on_update', 'on_submit']:
|
||||
subject, color = feed_dict.get(doc.doctype, [None, None])
|
||||
if subject:
|
||||
make_feed('', doc.doctype, doc.name, doc.owner, subject % doc.fields, color)
|
||||
|
@ -8,7 +8,7 @@ def execute():
|
||||
from webnotes.utils import archive
|
||||
arc_tables = webnotes.conn.sql('show tables like "arc%"')
|
||||
try:
|
||||
webnotes.conn.auto_commit_on_excess = 1
|
||||
webnotes.conn.auto_commit_on_many_writes = 1
|
||||
for tab in arc_tables:
|
||||
tab = tab[0]
|
||||
dt = tab[3:]
|
||||
|
@ -23,10 +23,11 @@ def execute():
|
||||
txt = get_file_id(txt)
|
||||
|
||||
webnotes.conn.sql("""update `tab%s` set %s=%s where name=%s""" % \
|
||||
(table[0], table[1], '%s', '%s'), (txt, item[0]), debug=1)
|
||||
(table[0], table[1], '%s', '%s'), (txt, item[0]))
|
||||
|
||||
# control panel, client name
|
||||
txt = webnotes.conn.get_value('Control Panel',None,'client_name')
|
||||
if txt:
|
||||
txt = get_file_id(txt)
|
||||
webnotes.conn.set_value('Control Panel', None, 'client_name', txt.replace('index.cgi?cmd=get_file&fname=', 'files/'))
|
||||
|
||||
@ -34,6 +35,11 @@ def get_file_id(txt):
|
||||
"""old file links may be from fileid or filename"""
|
||||
import re
|
||||
match = re.search('files/([^"\']*)', txt)
|
||||
|
||||
if not match:
|
||||
print txt
|
||||
return txt
|
||||
|
||||
fname = match.groups()[0]
|
||||
if not fname.startswith('FileData'):
|
||||
fid = webnotes.conn.sql("""select name from `tabFile Data`
|
||||
|
@ -7,7 +7,7 @@ def on_login(login_manager):
|
||||
"""
|
||||
called from login manager, before login
|
||||
"""
|
||||
if login_manager.user not in ('Guest', None, ''):
|
||||
if login_manager.user not in ('Guest', None, '') and webnotes.conn.cur_db_name!='accounts' and webnotes.conn.get_value('Control Panel', 'Control Panel', 'account_id')!='s5u011':
|
||||
try:
|
||||
login_manager = login_as(login_manager)
|
||||
update_account_details()
|
||||
@ -32,7 +32,7 @@ def on_login_post_session(login_manager):
|
||||
sid!=%s""", \
|
||||
(webnotes.session['user'], webnotes.session['sid']), as_list=1)
|
||||
|
||||
if webnotes.session['user'] not in ('Guest'):
|
||||
if webnotes.session['user'] not in ('Guest') and webnotes.conn.cur_db_name!='accounts':
|
||||
# create feed
|
||||
from webnotes.utils import nowtime
|
||||
home.make_feed('Login', 'Profile', login_manager.user, login_manager.user,
|
||||
|
Loading…
x
Reference in New Issue
Block a user