messages, popups disabled

This commit is contained in:
Rushabh Mehta
2012-11-13 10:59:11 +05:30
parent ab55e6b252
commit ec40686cc3
4 changed files with 7 additions and 12 deletions

View File

@@ -20,12 +20,12 @@ import webnotes
def get_unread_messages():
"returns unread (docstatus-0 messages for a user)"
return webnotes.conn.sql("""\
SELECT name, comment
SELECT count(*)
FROM `tabComment`
WHERE comment_doctype IN ('My Company', 'Message')
AND comment_docname = %s
AND ifnull(docstatus,0)=0
""", webnotes.user.name, as_list=1)
""", webnotes.user.name)[0][0]
def get_open_support_tickets():
"""Returns a count of open support tickets"""