Merge branch 'master' into edge

This commit is contained in:
Anand Doshi 2013-03-01 16:21:26 +05:30
commit d88a49baa8
4 changed files with 12 additions and 8 deletions

View File

@ -23,9 +23,10 @@ erpnext.desktop.render = function() {
module.name = m;
module.label = wn._(module.label);
module.gradient_css = wn.get_gradient_css(module.color, 45);
module._link = module.link.toLowerCase().replace("/", "-");
$module_icon = $(repl('\
<div id="module-icon-%(link)s" class="case-wrapper" \
<div id="module-icon-%(_link)s" class="case-wrapper" \
data-name="%(name)s" data-link="%(link)s">\
<div class="case-border" style="%(gradient_css)s">\
<i class="%(icon)s"></i>\
@ -84,7 +85,7 @@ erpnext.desktop.show_pending_notifications = function() {
add_circle('module-icon-messages', 'unread_messages', 'Unread Messages');
add_circle('module-icon-support-home', 'open_support_tickets', 'Open Support Tickets');
add_circle('module-icon-todo', 'things_todo', 'Things To Do');
add_circle('module-icon-calendar', 'todays_events', 'Todays Events');
add_circle('module-icon-calendar-event', 'todays_events', 'Todays Events');
add_circle('module-icon-projects-home', 'open_tasks', 'Open Tasks');
add_circle('module-icon-questions', 'unanswered_questions', 'Unanswered Questions');
add_circle('module-icon-selling-home', 'open_leads', 'Open Leads');

View File

@ -55,7 +55,7 @@ def get_todays_events():
SELECT COUNT(*) FROM `tabEvent`
WHERE owner = %s
AND event_type != 'Cancel'
AND event_date = %s""", (
AND %s between date(starts_on) and date(ends_on)""", (
webnotes.session.user, nowdate()))
return todays_events[0][0]

View File

@ -214,7 +214,8 @@ class DocType(BuyingController):
def validate_inspection(self):
for d in getlist(self.doclist, 'purchase_receipt_details'): #Enter inspection date for all items that require inspection
ins_reqd = sql("select inspection_required from `tabItem` where name = %s", (d.item_code), as_dict = 1)
ins_reqd = sql("select inspection_required from `tabItem` where name = %s",
(d.item_code,), as_dict = 1)
ins_reqd = ins_reqd and ins_reqd[0]['inspection_required'] or 'No'
if ins_reqd == 'Yes' and not d.qa_no:
msgprint("Item: " + d.item_code + " requires QA Inspection. Please enter QA No or report to authorized person to create Quality Inspection")

View File

@ -36,6 +36,7 @@ class SupportMailbox(POP3Mailbox):
return
thread_id = mail.get_thread_id()
ticket = None
new_ticket = False
if thread_id and webnotes.conn.exists("Support Ticket", thread_id):
ticket = webnotes.bean("Support Ticket", thread_id)
@ -52,16 +53,17 @@ class SupportMailbox(POP3Mailbox):
"status": "Open"
}])
ticket.insert()
if cint(self.email_settings.send_autoreply):
if "mailer-daemon" not in mail.from_email.lower():
self.send_auto_reply(ticket.doc)
new_ticket = True
mail.save_attachments_in_doc(ticket.doc)
make(content=mail.content, sender=mail.from_email, subject = ticket.doc.subject,
doctype="Support Ticket", name=ticket.doc.name,
lead = ticket.doc.lead, contact=ticket.doc.contact, date=mail.date)
if new_ticket and cint(self.email_settings.send_autoreply) and \
"mailer-daemon" not in mail.from_email.lower():
self.send_auto_reply(ticket.doc)
def send_auto_reply(self, d):
signature = self.email_settings.fields.get('support_signature') or ''