[minor] fixes to daily work summary formatting
This commit is contained in:
parent
d3344ebcd1
commit
4e61564f73
@ -39,11 +39,14 @@ class DailyWorkSummary(Document):
|
|||||||
|
|
||||||
replies = frappe.get_all('Communication', fields=['content', 'text_content', 'sender'],
|
replies = frappe.get_all('Communication', fields=['content', 'text_content', 'sender'],
|
||||||
filters=dict(reference_doctype=self.doctype, reference_name=self.name,
|
filters=dict(reference_doctype=self.doctype, reference_name=self.name,
|
||||||
communication_type='Communication', sent_or_received='Received'))
|
communication_type='Communication', sent_or_received='Received'),
|
||||||
|
order_by='creation asc')
|
||||||
|
|
||||||
did_not_reply = self.email_sent_to.split()
|
did_not_reply = self.email_sent_to.split()
|
||||||
|
|
||||||
for d in replies:
|
for d in replies:
|
||||||
|
d.sender_name = frappe.db.get_value("Employee", {"user_id": d.sender},
|
||||||
|
"employee_name") or d.sender
|
||||||
if d.sender in did_not_reply:
|
if d.sender in did_not_reply:
|
||||||
did_not_reply.remove(d.sender)
|
did_not_reply.remove(d.sender)
|
||||||
if d.text_content:
|
if d.text_content:
|
||||||
@ -62,17 +65,17 @@ class DailyWorkSummary(Document):
|
|||||||
|
|
||||||
def get_summary_template(self):
|
def get_summary_template(self):
|
||||||
return '''
|
return '''
|
||||||
<h4>{{ title }}</h4>
|
<h3>{{ title }}</h3>
|
||||||
|
|
||||||
{% for reply in replies %}
|
{% for reply in replies %}
|
||||||
<h5>{{ frappe.db.get_value("Employee", {"user_id": reply.sender}, "employee_name") or reply.sender }}<h5>
|
<h4>{{ reply.sender_name }}</h4>
|
||||||
<p style="padding-bottom: 20px">
|
<p style="padding-bottom: 20px">
|
||||||
{{ reply.content }}
|
{{ reply.content }}
|
||||||
</p>
|
</p>
|
||||||
|
<hr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if did_not_reply %}
|
{% if did_not_reply %}
|
||||||
<hr>
|
|
||||||
<p>{{ did_not_reply_title }}: {{ did_not_reply }}</p>
|
<p>{{ did_not_reply_title }}: {{ did_not_reply }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "",
|
"depends_on": "",
|
||||||
"description": "List of employee which has \"Salary Slip Based on Timesheet\" is enabled in salary structure.",
|
"description": "",
|
||||||
"fieldname": "employee",
|
"fieldname": "employee",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -877,7 +877,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-11-07 06:00:12.460318",
|
"modified": "2016-11-22 01:42:54.204441",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Projects",
|
"module": "Projects",
|
||||||
"name": "Timesheet",
|
"name": "Timesheet",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user