Fixes for training Module

This commit is contained in:
Neil Trini Lasrado 2016-12-14 12:08:28 +05:30
parent fef568ecfa
commit 6a2fa29b4a
4 changed files with 59 additions and 8 deletions

View File

@ -7,8 +7,8 @@ Schedule seminars, workshops, conferences etc using Training Event. You can also
### Inviting Employees for Event
You can invite your employees to attend the event. You can do so by selecting the employees to be invited in the employee table.
By default the status of the employee will be 'Scheduled'.
The system shall notify the employee with status 'Scheduled' by sending a email to the office email address of the employee as mentioned in the employee master.
By default the status of the employee will be 'Open'.
The system shall notify the employee with status 'Open' by sending a email to the office email address of the employee as mentioned in the employee master if you have selected 'Send Email' checkbox.
The status is changed to 'Invited' when an invitation email is sent to the employee by the system.
When an Employee confirms his/her presence for the event you can change the status to 'Confirmed'.

View File

@ -32,6 +32,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@ -60,6 +61,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@ -86,6 +88,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -114,6 +117,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@ -140,6 +144,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -167,6 +172,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -195,6 +201,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -221,6 +228,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -249,6 +257,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -276,6 +285,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -302,6 +312,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -330,6 +341,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -357,6 +369,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@ -383,6 +396,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -410,6 +424,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@ -437,6 +452,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@ -463,6 +479,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -490,6 +507,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@ -509,6 +527,7 @@
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Attendees",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@ -516,6 +535,36 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "Will send an email about the event to employees with status 'Open'",
"fieldname": "send_email",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Send Email",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -544,6 +593,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -571,6 +621,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -588,7 +639,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-04 04:34:23.541193",
"modified": "2016-12-14 11:46:25.712779",
"modified_by": "Administrator",
"module": "HR",
"name": "Training Event",

View File

@ -13,7 +13,7 @@ class TrainingEvent(Document):
self.invite_employee()
def on_update_after_submit(self):
if self.event_status == "Scheduled":
if self.event_status == "Scheduled" and self.send_email:
self.invite_employee()
def invite_employee(self):
@ -21,7 +21,7 @@ class TrainingEvent(Document):
.format(self.type, self.event_name, self.start_time, self.end_time, self.location))
for emp in self.employees:
if emp.status== "Scheduled":
if emp.status== "Open":
frappe.sendmail(frappe.db.get_value("Employee", emp.employee, "company_email"), \
subject=subject, content= self.introduction)
emp.status= "Invited"

View File

@ -100,7 +100,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Scheduled",
"default": "Open",
"fieldname": "status",
"fieldtype": "Select",
"hidden": 0,
@ -112,7 +112,7 @@
"label": "Status",
"length": 0,
"no_copy": 1,
"options": "Scheduled\nInvited\nConfirmed\nAttended\nCompleted\nWithdrawn",
"options": "Open\nInvited\nConfirmed\nAttended\nWithdrawn",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@ -136,7 +136,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-11-11 05:04:11.997096",
"modified": "2016-12-14 11:43:40.996578",
"modified_by": "Administrator",
"module": "HR",
"name": "Training Event Employee",