From a6acdda09496b85a48ea00a1a96dc3243730f51c Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 1 Mar 2013 14:41:32 +0530 Subject: [PATCH 1/3] fixes in calendar event display on desktop --- home/page/desktop/desktop.js | 5 +++-- startup/startup.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/home/page/desktop/desktop.js b/home/page/desktop/desktop.js index c298b68218..87181d8a98 100644 --- a/home/page/desktop/desktop.js +++ b/home/page/desktop/desktop.js @@ -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('\ -
\
\ \ @@ -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'); diff --git a/startup/startup.py b/startup/startup.py index c74c596235..89c0336d17 100644 --- a/startup/startup.py +++ b/startup/startup.py @@ -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] From 619dc6fcf8f669d94574a3f3089632258fa49114 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 1 Mar 2013 16:12:37 +0530 Subject: [PATCH 2/3] send support ticket response at the end of all operations --- support/doctype/support_ticket/get_support_mails.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/support/doctype/support_ticket/get_support_mails.py b/support/doctype/support_ticket/get_support_mails.py index a91d483200..d1fe0dc8da 100644 --- a/support/doctype/support_ticket/get_support_mails.py +++ b/support/doctype/support_ticket/get_support_mails.py @@ -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 '' From a10461e16c9c58d66bed5c4bae6451b28ff3b2aa Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 1 Mar 2013 16:12:50 +0530 Subject: [PATCH 3/3] minor fix in purchase receipt --- stock/doctype/purchase_receipt/purchase_receipt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stock/doctype/purchase_receipt/purchase_receipt.py b/stock/doctype/purchase_receipt/purchase_receipt.py index 88003ca682..b2f00a7efc 100644 --- a/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/stock/doctype/purchase_receipt/purchase_receipt.py @@ -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")