Added reference_doctype and reference_name to link Bulk Email to Salary Slip

This commit is contained in:
Neil Trini Lasrado 2016-05-05 12:56:35 +05:30
parent 71e93d6691
commit b2b0b37cc1
2 changed files with 3 additions and 2 deletions

View File

@ -127,7 +127,7 @@ class ProcessPayroll(Document):
submitted_ss = self.format_as_links(list(set(all_ss) - set(not_submitted_ss)))
if submitted_ss:
log = """
<b>Salary Slips Submitted %s:</b>
<b>Salary Slips Submitted:</b> <br><br>%s
""" % ('<br>'.join(submitted_ss))
if not_submitted_ss:

View File

@ -214,6 +214,7 @@ class SalarySlip(TransactionBase):
if receiver:
subj = 'Salary Slip - ' + cstr(self.month) +'/'+cstr(self.fiscal_year)
frappe.sendmail([receiver], subject=subj, message = _("Please see attachment"),
attachments=[frappe.attach_print(self.doctype, self.name, file_name=self.name)], bulk=True)
attachments=[frappe.attach_print(self.doctype, self.name, file_name=self.name)],
bulk=True, reference_doctype= self.doctype, reference_name= self.name)
else:
msgprint(_("{0}: Employee email not found, hence email not sent").format(self.employee_name))