This commit is contained in:
Anand Doshi
2014-04-01 12:21:06 +05:30
parent f2227d033c
commit dd32d6eb1f
4 changed files with 33 additions and 34 deletions

View File

@@ -18,7 +18,7 @@ def boot_session(bootinfo):
load_country_and_currency(bootinfo)
bootinfo['notification_settings'] = frappe.get_doc("Notification Control",
"Notification Control").get_values()
"Notification Control")
# if no company, show a dialog box to create a new company
bootinfo["customer_count"] = frappe.db.sql("""select count(*) from tabCustomer""")[0][0]

View File

@@ -4,14 +4,14 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import nowtime
from frappe.utils.user import get_user_fullname
from erpnext.home import make_feed
def on_session_creation(login_manager):
"""make feed"""
if frappe.session['user'] not in ('Guest'):
# create feed
from frappe.utils import nowtime
from frappe.utils.user import get_user_fullname
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')