[minor] UX fixes for Daily Work Summary
diff --git a/erpnext/config/hr.py b/erpnext/config/hr.py
index 51c258b..39d8878 100644
--- a/erpnext/config/hr.py
+++ b/erpnext/config/hr.py
@@ -185,6 +185,10 @@
"name": "Designation",
"description": _("Employee designation (e.g. CEO, Director etc.).")
},
+ {
+ "type": "doctype",
+ "name": "Daily Work Summary Settings"
+ },
]
},
{
diff --git a/erpnext/docs/assets/img/human-resources/daily-work-summary-settings.png b/erpnext/docs/assets/img/human-resources/daily-work-summary-settings.png
new file mode 100644
index 0000000..c4801c2
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/daily-work-summary-settings.png
Binary files differ
diff --git a/erpnext/docs/user/manual/en/human-resources/daily-work-summary.md b/erpnext/docs/user/manual/en/human-resources/daily-work-summary.md
new file mode 100644
index 0000000..d3ba22a
--- /dev/null
+++ b/erpnext/docs/user/manual/en/human-resources/daily-work-summary.md
@@ -0,0 +1,15 @@
+# Daily Work Summary
+
+Daily Work Summary is way to get a automated way to get a summary of work done by all employees in a company. Once you set it up, each active Employee of the Company gets an email asking them what did they work on during the day.
+
+Replies of all employees who choose to respond is collected and sent as a summary at midnight. Emails are only sent based on the Holiday List setup in the Company or Employee master.
+
+*Note:* You must have one active incoming email account setup for this to work.
+
+### How to Use
+
+Go to "Daily Work Summary Settings" via HR module or search bar and set the company for which you want to activate this feature.
+
+You can also choose to Customize the Message you send to your employees:
+
+<img class="screenshot" alt="Department" src="{{docs_base_url}}/assets/img/human-resources/department.png">
diff --git a/erpnext/docs/user/manual/en/human-resources/index.txt b/erpnext/docs/user/manual/en/human-resources/index.txt
index 33ee4bb..2543b4b 100644
--- a/erpnext/docs/user/manual/en/human-resources/index.txt
+++ b/erpnext/docs/user/manual/en/human-resources/index.txt
@@ -12,4 +12,5 @@
setup
holiday-list
human-resource-setup
+daily-work-summary
articles
diff --git a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.json b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.json
index 43cef68..b457cf2 100644
--- a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.json
+++ b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.json
@@ -22,7 +22,6 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Company",
@@ -53,7 +52,6 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Status",
@@ -83,7 +81,6 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Email Sent To",
@@ -106,13 +103,13 @@
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
- "in_create": 0,
+ "in_create": 1,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-18 12:09:01.580414",
+ "modified": "2016-11-21 01:05:55.258867",
"modified_by": "Administrator",
"module": "HR",
"name": "Daily Work Summary",
@@ -144,7 +141,7 @@
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
- "create": 1,
+ "create": 0,
"delete": 1,
"email": 1,
"export": 1,
@@ -159,11 +156,11 @@
"set_user_permissions": 0,
"share": 1,
"submit": 0,
- "write": 1
+ "write": 0
}
],
"quick_entry": 1,
- "read_only": 0,
+ "read_only": 1,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
diff --git a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py
index fe5fd8e..0e0abc4 100644
--- a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py
+++ b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py
@@ -9,6 +9,7 @@
from email_reply_parser import EmailReplyParser
from erpnext.hr.doctype.employee.employee import is_holiday
from frappe.utils import formatdate
+from markdown2 import markdown
class DailyWorkSummary(Document):
def send_mails(self, settings, emails):
@@ -46,7 +47,7 @@
if d.sender in did_not_reply:
did_not_reply.remove(d.sender)
if d.text_content:
- d.content = EmailReplyParser.parse_reply(d.text_content)
+ d.content = markdown(EmailReplyParser.parse_reply(d.text_content))
did_not_reply = [(frappe.db.get_value("Employee", {"user_id": email}, "employee_name") or email)
@@ -89,7 +90,7 @@
if e.user_id:
if only_working and is_holiday(e.name):
# don't add if holiday
- pass
+ continue
out.append(e.user_id)
return out
diff --git a/erpnext/hr/doctype/daily_work_summary_settings/daily_work_summary_settings.json b/erpnext/hr/doctype/daily_work_summary_settings/daily_work_summary_settings.json
index 00e90ea..f52af39 100644
--- a/erpnext/hr/doctype/daily_work_summary_settings/daily_work_summary_settings.json
+++ b/erpnext/hr/doctype/daily_work_summary_settings/daily_work_summary_settings.json
@@ -16,6 +16,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "description": "Emails will be sent to all Active Employees of the company at the given hour, if they do not have holiday. Summary of responses will be sent at midnight.",
"fieldname": "select_companies",
"fieldtype": "Section Break",
"hidden": 0,
@@ -165,7 +166,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-08 05:48:53.068957",
+ "modified": "2016-11-21 00:55:20.726328",
"modified_by": "Administrator",
"module": "HR",
"name": "Daily Work Summary Settings",