Module Import Fix (#21433)
diff --git a/erpnext/hr/doctype/attendance/attendance.py b/erpnext/hr/doctype/attendance/attendance.py
index 7355a56..b6c8065 100644
--- a/erpnext/hr/doctype/attendance/attendance.py
+++ b/erpnext/hr/doctype/attendance/attendance.py
@@ -7,7 +7,7 @@
from frappe.utils import getdate, nowdate
from frappe import _
from frappe.model.document import Document
-from frappe.utils import cstr, get_datetime, format_date
+from frappe.utils import cstr, get_datetime, formatdate
class Attendance(Document):
def validate(self):
@@ -52,16 +52,16 @@
if d.half_day_date == getdate(self.attendance_date):
self.status = 'Half Day'
frappe.msgprint(_("Employee {0} on Half day on {1}")
- .format(self.employee, format_date(self.attendance_date)))
+ .format(self.employee, formatdate(self.attendance_date)))
else:
self.status = 'On Leave'
frappe.msgprint(_("Employee {0} is on Leave on {1}")
- .format(self.employee, format_date(self.attendance_date)))
+ .format(self.employee, formatdate(self.attendance_date)))
if self.status in ("On Leave", "Half Day"):
if not leave_record:
frappe.msgprint(_("No leave record found for employee {0} on {1}")
- .format(self.employee, format_date(self.attendance_date)), alert=1)
+ .format(self.employee, formatdate(self.attendance_date)), alert=1)
elif self.leave_type:
self.leave_type = None
self.leave_application = None
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index 916b64a..8a4da7e 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -5,7 +5,7 @@
import frappe, erpnext
import datetime, math
-from frappe.utils import add_days, cint, cstr, flt, getdate, rounded, date_diff, money_in_words, format_date
+from frappe.utils import add_days, cint, cstr, flt, getdate, rounded, date_diff, money_in_words, formatdate
from frappe.model.naming import make_autoname
from frappe import msgprint, _
@@ -329,7 +329,7 @@
if d.status in ('Half Day', 'On Leave') and d.leave_type and d.leave_type not in lwp_leave_types:
continue
- if format_date(d.attendance_date, "yyyy-mm-dd") in holidays:
+ if formatdate(d.attendance_date, "yyyy-mm-dd") in holidays:
if d.status == "Absent" or \
(d.leave_type and d.leave_type in lwp_leave_types and not lwp_leave_types[d.leave_type]):
continue