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:
parent
a85b68ee77
commit
0d38a6b495
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user