Minor Fixes

This commit is contained in:
Anand Doshi 2014-03-13 20:44:10 +05:30
parent 54106807e4
commit 49e0a687b3
3 changed files with 6 additions and 10 deletions

View File

@ -1,6 +1,6 @@
app_name = erpnext
app_title = ERPNext
app_publisher = Web Notes Technologies
app_publisher = Web Notes Technologies Pvt. Ltd. and Contributors
app_description = Open Source Enterprise Resource Planning for Small and Midsized Organizations
app_icon = icon-th
app_color = #e74c3c

View File

@ -10,6 +10,7 @@ from frappe.utils.dateutils import datetime_in_user_format
from datetime import timedelta
from dateutil.relativedelta import relativedelta
from frappe.utils.email_lib import sendmail
from frappe.core.doctype.user.user import STANDARD_USERS
content_sequence = [
["Income / Expenses", ["income_year_to_date", "bank_balance",
@ -56,9 +57,9 @@ class DocType(DocListController):
"""get list of users"""
user_list = frappe.db.sql("""
select name, enabled from tabUser
where docstatus=0 and name not in ('Administrator', 'Guest')
and user_type = "System User"
order by enabled desc, name asc""", as_dict=1)
where name not in ({})
and user_type != "Website User"
order by enabled desc, name asc""".format(", ".join(["%s"]*len(STANDARD_USERS))), STANDARD_USERS, as_dict=1)
if self.doc.recipient_list:
recipient_list = self.doc.recipient_list.split("\n")

View File

@ -7,16 +7,11 @@ import frappe
from erpnext.home import make_feed
def on_session_creation(login_manager):
"""
called after login
update login_from and delete parallel sessions
"""
"""make feed"""
if frappe.session['user'] not in ('Guest'):
# create feed
from frappe.utils import nowtime
from frappe.utils.user import get_user_fullname
frappe.db.begin()
make_feed('Login', 'User', login_manager.user, login_manager.user,
'%s logged in at %s' % (get_user_fullname(login_manager.user), nowtime()),
login_manager.user=='Administrator' and '#8CA2B3' or '#1B750D')
frappe.db.commit()