fix throw_overlap_error in Shift Assignment (#15103)

fix throw_overlap_error in Shift Assignment
This commit is contained in:
ahmad zaqout 2018-08-08 08:06:40 +03:00 committed by Nabin Hait
parent 3be899caff
commit 63a741e5c8

View File

@ -38,7 +38,7 @@ class ShiftAssignment(Document):
def throw_overlap_error(self, d):
msg = _("Employee {0} has already applied for {1} on {2} : ").format(self.employee,
d['shift_type'], formatdate(d['date'])) \
+ """ <b><a href="#Form/Shift Request/{0}">{0}</a></b>""".format(d["name"])
+ """ <b><a href="#Form/Shift Assignment/{0}">{0}</a></b>""".format(d["name"])
frappe.throw(msg, OverlapError)
@frappe.whitelist()
@ -77,4 +77,4 @@ def add_assignments(events, start, end, conditions=None):
"docstatus": d.docstatus
}
if e not in events:
events.append(e)
events.append(e)