From b2b0b37cc1c82b0c98229ff41a2bbb67cd32f0b0 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Thu, 5 May 2016 12:56:35 +0530 Subject: [PATCH] Added reference_doctype and reference_name to link Bulk Email to Salary Slip --- erpnext/hr/doctype/process_payroll/process_payroll.py | 2 +- erpnext/hr/doctype/salary_slip/salary_slip.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.py b/erpnext/hr/doctype/process_payroll/process_payroll.py index 12e5c07ad8..de41530d26 100644 --- a/erpnext/hr/doctype/process_payroll/process_payroll.py +++ b/erpnext/hr/doctype/process_payroll/process_payroll.py @@ -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 = """ - Salary Slips Submitted %s: + Salary Slips Submitted:

%s """ % ('
'.join(submitted_ss)) if not_submitted_ss: diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index 39adedd132..0c1f8c88b5 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -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))