mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
fix throw_overlap_error in Shift Assignment (#15103)
fix throw_overlap_error in Shift Assignment
This commit is contained in:
@@ -38,7 +38,7 @@ class ShiftAssignment(Document):
|
|||||||
def throw_overlap_error(self, d):
|
def throw_overlap_error(self, d):
|
||||||
msg = _("Employee {0} has already applied for {1} on {2} : ").format(self.employee,
|
msg = _("Employee {0} has already applied for {1} on {2} : ").format(self.employee,
|
||||||
d['shift_type'], formatdate(d['date'])) \
|
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.throw(msg, OverlapError)
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
@@ -77,4 +77,4 @@ def add_assignments(events, start, end, conditions=None):
|
|||||||
"docstatus": d.docstatus
|
"docstatus": d.docstatus
|
||||||
}
|
}
|
||||||
if e not in events:
|
if e not in events:
|
||||||
events.append(e)
|
events.append(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user