fix in support ticket and email digest

This commit is contained in:
Anand Doshi 2012-02-20 18:38:33 +05:30
parent 2a7fa0451c
commit 0b3f4d40c4
2 changed files with 6 additions and 3 deletions

View File

@ -377,8 +377,11 @@ class DocType:
* Execute get method
* Send email to recipients
"""
if not self.doc.recipient_list: return
self.sending = True
result, email_body = self.get()
recipient_list = self.doc.recipient_list.split("\n")
# before sending, check if user is disabled or not
@ -633,7 +636,7 @@ class DocType:
[
"<span style='font-size: 16px; font-weight: normal'>%s</span>" % bank['name'],
currency_amount_str % (currency, fmt_money(bank['value']))
] for bank in result['bank_balance']
] for bank in result.get('bank_balance', [])
]
}),
'idx': 400

View File

@ -63,7 +63,7 @@ class SupportMailbox(POP3Mailbox):
st = get_obj('Support Ticket', thread_id)
st.make_response_record(content, mail.mail['From'], content_type)
webnotes.conn.set(st.doc, 'status', 'Open')
update_feed(st.doc)
update_feed(st.doc, 'on_update')
# extract attachments
self.save_attachments(st.doc, mail.attachments)
return
@ -84,7 +84,7 @@ class SupportMailbox(POP3Mailbox):
d.save(1)
# update feed
update_feed(d)
update_feed(d, 'on_update')
# send auto reply
self.send_auto_reply(d)