Fix grammar error in HR Training Results (#9076)

* Fix Typo in message

Issue #9074

* Added  condition for notifying user of grade.
This commit is contained in:
bcornwellmott 2017-05-30 03:26:02 -07:00 committed by Nabin Hait
parent a85b68ee77
commit 0d38a6b495

View File

@ -13,7 +13,9 @@ class TrainingResult(Document):
def send_result(self): def send_result(self):
for emp in self.employees: for emp in self.employees:
message = "Thank You for attending {0}. You grade is {1}".format(self.training_event, emp.grade) message = "Thank You for attending {0}.".format(self.training_event)
if emp.grade:
message = message + "Your grade: {0}".format(emp.grade)
frappe.sendmail(frappe.db.get_value("Employee", emp.employee, "company_email"), \ frappe.sendmail(frappe.db.get_value("Employee", emp.employee, "company_email"), \
subject=_("{0} Results".format(self.training_event)), \ subject=_("{0} Results".format(self.training_event)), \
content=message) content=message)