Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
15a7827
fix: apply company filter in leave period in leave control panel doctype
anwarpatelnoori Mar 14, 2026
63f4c9d
refactor: linter pass
anwarpatelnoori Mar 14, 2026
b6f179e
fix: removed redundant leave_period filter
anwarpatelnoori Mar 14, 2026
ed9291b
fix(salary_slip): update round() for remaining sub period
nareshkannasln Mar 17, 2026
74fe130
Merge branch 'frappe:develop' into TASK-2026-00001
anwarpatelnoori Mar 25, 2026
3c1e131
fix: Add make method for expense claim
deepeshgarg007 Apr 6, 2026
7d0e407
fix: add functionality to mark expired shift assignments as inactive
krishna-254 Apr 6, 2026
5b067f5
fix: update employee information to be non Query Report
krishna-254 Apr 6, 2026
f2cef3f
fix: French translations
frappe-pr-bot Apr 6, 2026
a464de2
fix: Spanish translations
frappe-pr-bot Apr 6, 2026
5417768
fix: Arabic translations
frappe-pr-bot Apr 6, 2026
34e8048
fix: Czech translations
frappe-pr-bot Apr 6, 2026
4fcef38
fix: Danish translations
frappe-pr-bot Apr 6, 2026
ee4fc26
fix: German translations
frappe-pr-bot Apr 6, 2026
056f7fe
fix: Hungarian translations
frappe-pr-bot Apr 6, 2026
50e7939
fix: Italian translations
frappe-pr-bot Apr 6, 2026
1b93a06
fix: Dutch translations
frappe-pr-bot Apr 6, 2026
3dee53c
fix: Polish translations
frappe-pr-bot Apr 6, 2026
f9ae0e3
fix: Portuguese translations
frappe-pr-bot Apr 6, 2026
f51b7c4
fix: Russian translations
frappe-pr-bot Apr 6, 2026
6ed439f
fix: Slovenian translations
frappe-pr-bot Apr 6, 2026
4d32bef
fix: Swedish translations
frappe-pr-bot Apr 6, 2026
f1fc2bd
fix: Turkish translations
frappe-pr-bot Apr 6, 2026
210243f
fix: Chinese Simplified translations
frappe-pr-bot Apr 6, 2026
540f0ee
fix: Vietnamese translations
frappe-pr-bot Apr 6, 2026
b156080
fix: Portuguese, Brazilian translations
frappe-pr-bot Apr 6, 2026
e0dc9b0
fix: Indonesian translations
frappe-pr-bot Apr 6, 2026
5a757b2
fix: Persian translations
frappe-pr-bot Apr 6, 2026
635a693
fix: Thai translations
frappe-pr-bot Apr 6, 2026
a3469a5
fix: Croatian translations
frappe-pr-bot Apr 6, 2026
51037a1
fix: Burmese translations
frappe-pr-bot Apr 6, 2026
63d655b
fix: Bosnian translations
frappe-pr-bot Apr 6, 2026
4a2cd6d
fix: Norwegian Bokmal translations
frappe-pr-bot Apr 6, 2026
5e9a54f
fix: Serbian (Latin) translations
frappe-pr-bot Apr 6, 2026
608598e
fix: Esperanto translations
frappe-pr-bot Apr 6, 2026
e1fe398
fix: Serbian (Cyrillic) translations
frappe-pr-bot Apr 6, 2026
dc66cb8
Merge branch 'develop' into l10n_develop
asmitahase Apr 7, 2026
e2cc389
Merge pull request #4319 from frappe/l10n_develop
asmitahase Apr 7, 2026
ab87bab
fix: correct employee grade filter field name in Employee Attendance
abishektridots-ctrl Apr 7, 2026
03e50bf
fix: better description and validation message for when attendance re…
asmitahase Apr 6, 2026
7e8a988
fix: wrap strings in translation function
asmitahase Apr 6, 2026
dd9a4f0
fix: simpler message
asmitahase Apr 7, 2026
ad88346
Merge pull request #4324 from abishektridots-ctrl/patch-1
asmitahase Apr 7, 2026
823ff6e
Merge pull request #4310 from asmitahase/include-holidays-tip
asmitahase Apr 7, 2026
55c4096
Merge pull request #4331 from krishna-254/fix-mark-expired-shift-assi…
deepeshgarg007 Apr 7, 2026
a8393ff
Merge pull request #4315 from deepeshgarg007/expense_claim_make_methods
deepeshgarg007 Apr 7, 2026
8013ea2
Merge pull request #4332 from krishna-254/fix-employee-information-re…
deepeshgarg007 Apr 7, 2026
fa0abb0
Merge pull request #4243 from aerele/remaining-sub-periods
deepeshgarg007 Apr 7, 2026
136b67b
Merge pull request #4234 from anwarpatelnoori/TASK-2026-00001
deepeshgarg007 Apr 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hrms/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@
"hrms.controllers.employee_reminders.send_work_anniversary_reminders",
"hrms.hr.doctype.daily_work_summary_group.daily_work_summary_group.send_summary",
"hrms.hr.doctype.interview.interview.send_daily_feedback_reminder",
"hrms.hr.doctype.shift_assignment.shift_assignment.mark_expired_shift_assignments_as_inactive",
"hrms.hr.doctype.job_opening.job_opening.close_expired_job_openings",
],
"daily_long": [
Expand Down
8 changes: 5 additions & 3 deletions hrms/hr/doctype/attendance_request/attendance_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,19 @@
},
{
"default": "0",
"description": "Select if any of the days selected for request are holidays",
"fieldname": "include_holidays",
"fieldtype": "Check",
"label": "Include Holidays"
}
],
"is_submittable": 1,
"links": [],
"modified": "2024-03-27 13:06:36.343091",
"modified": "2026-04-07 11:05:03.480492",
"modified_by": "Administrator",
"module": "HR",
"name": "Attendance Request",
"naming_rule": "Expression (old style)",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
Expand Down Expand Up @@ -201,9 +202,10 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"title_field": "employee_name",
"track_changes": 1
}
}
19 changes: 14 additions & 5 deletions hrms/hr/doctype/attendance_request/attendance_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,20 @@ def validate_no_attendance_to_create(self):
if len(attendance_warnings) == attendance_request_days and not any(
warning["action"] == "Overwrite" for warning in attendance_warnings
):
frappe.throw(
title=_("No attendance records to create"),
msg=_(
"Please check if employee is on leave or attendance with the same status exists for selected day(s)."
),
message_table = [[_("Date"), _("Reason"), _("Action")]]
for warning in attendance_warnings:
message_table.append(
[
format_date(warning["date"]),
_(warning["reason"]),
_(warning["action"]),
]
)
frappe.msgprint(
title=_("No attendance records to create due to following reasons"),
msg=message_table,
as_table=True,
raise_exception=True,
)

def validate_shifts(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_employees(
"company": company,
"employment_type": employment_type,
"designation": designation,
"employee_grade": employee_grade,
"grade": employee_grade,
}.items():
if value:
filters[field] = value
Expand Down
4 changes: 4 additions & 0 deletions hrms/hr/doctype/expense_claim/expense_claim.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ frappe.ui.form.on("Expense Claim", {
},
};
});

frm.make_methods = {
"Payment Entry": () => frm.events.make_payment_entry(frm),
};
},

onload: function (frm) {
Expand Down
21 changes: 11 additions & 10 deletions hrms/hr/doctype/leave_control_panel/leave_control_panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

frappe.ui.form.on("Leave Control Panel", {
setup: function (frm) {
frm.set_value("company", frappe.defaults.get_default("company"));
frm.trigger("set_query");
frm.trigger("set_leave_details");
hrms.setup_employee_filter_group(frm);
Expand All @@ -26,15 +27,14 @@ frappe.ui.form.on("Leave Control Panel", {
},

company: function (frm) {
if (frm.doc.company) {
frm.set_query("department", function () {
return {
filters: {
company: frm.doc.company,
},
};
});
}
frm.trigger("set_leave_details");
frm.set_query("department", function () {
return {
filters: {
company: frm.doc.company,
},
};
});
frm.trigger("get_employees");
},

Expand Down Expand Up @@ -106,7 +106,7 @@ frappe.ui.form.on("Leave Control Panel", {
leave_type: null,
no_of_days: 0,
leave_policy: null,
company: frappe.defaults.get_default("company"),
company: frm.doc.company,
});
});
},
Expand Down Expand Up @@ -167,6 +167,7 @@ frappe.ui.form.on("Leave Control Panel", {
return {
filters: {
is_active: 1,
company: frm.doc.company,
},
};
});
Expand Down
7 changes: 4 additions & 3 deletions hrms/hr/doctype/leave_control_panel/leave_control_panel.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"field_order": [
"allocate_leaves_section",
"dates_based_on",
"company",
"leave_period",
"from_date",
"to_date",
Expand All @@ -17,12 +18,11 @@
"leave_type",
"no_of_days",
"quick_filters_section",
"company",
"branch",
"department",
"designation",
"column_break1",
"employment_type",
"designation",
"employee_grade",
"advanced_filters_section",
"filter_list",
Expand All @@ -34,6 +34,7 @@
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"mandatory_depends_on": "eval:doc.dates_based_on == 'Leave Period'",
"options": "Company",
"remember_last_selected_value": 1
},
Expand Down Expand Up @@ -186,7 +187,7 @@
"idx": 1,
"issingle": 1,
"links": [],
"modified": "2025-01-13 13:47:55.262534",
"modified": "2026-03-15 01:33:02.229280",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Control Panel",
Expand Down
19 changes: 19 additions & 0 deletions hrms/hr/doctype/shift_assignment/shift_assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,25 @@ def get_events(start: str | date, end: str | date, filters: list | None = None):
return get_shift_events(assignments)


def mark_expired_shift_assignments_as_inactive():
today = getdate()
shift_assignment = frappe.qb.DocType("Shift Assignment")

expired_assignments = (
frappe.qb.from_(shift_assignment)
.select(shift_assignment.name)
.where(
(shift_assignment.docstatus == 1)
& (shift_assignment.status == "Active")
& (shift_assignment.end_date.isnotnull())
& (shift_assignment.end_date < today)
)
).run(pluck=True)

for assignment in expired_assignments:
frappe.db.set_value("Shift Assignment", assignment, "status", "Inactive")


def get_shift_assignments(start: str, end: str, filters: str | list | None = None) -> list[dict]:
import json

Expand Down
33 changes: 33 additions & 0 deletions hrms/hr/doctype/shift_assignment/test_shift_assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
OverlappingShiftError,
get_actual_start_end_datetime_of_shift,
get_events,
mark_expired_shift_assignments_as_inactive,
)
from hrms.hr.doctype.shift_type.test_shift_type import make_shift_assignment, setup_shift_type
from hrms.payroll.doctype.salary_component.test_salary_component import create_salary_component
Expand Down Expand Up @@ -296,3 +297,35 @@ def test_auto_attendance_calculates_ot_for_default_shift(self):
self.assertEqual(attendance.overtime_type, shift_type.overtime_type)
self.assertEqual(attendance.working_hours, 11.0)
self.assertEqual(attendance.actual_overtime_duration, 2.0)

def test_mark_expired_shift_assignments_as_inactive(self):
today = getdate()
shift_type = setup_shift_type(shift_type="Expired Shift", start_time="08:00:00", end_time="16:00:00")

expired_employee = make_employee("test_expired_shift_assignment@example.com", company="_Test Company")
active_employee = make_employee("test_active_shift_assignment@example.com", company="_Test Company")
ongoing_employee = make_employee("test_ongoing_shift_assignment@example.com", company="_Test Company")

expired_assignment = make_shift_assignment(
shift_type.name,
expired_employee,
add_days(today, -7),
add_days(today, -1),
)
active_assignment = make_shift_assignment(
shift_type.name,
active_employee,
add_days(today, -1),
add_days(today, 2),
)
ongoing_assignment = make_shift_assignment(shift_type.name, ongoing_employee, add_days(today, -3))

mark_expired_shift_assignments_as_inactive()

expired_assignment.reload()
active_assignment.reload()
ongoing_assignment.reload()

self.assertEqual(expired_assignment.status, "Inactive")
self.assertEqual(active_assignment.status, "Active")
self.assertEqual(ongoing_assignment.status, "Active")
108 changes: 55 additions & 53 deletions hrms/hr/workspace/hr_setup/hr_setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,58 +135,6 @@
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 0,
"label": "Other Reports",
"link_count": 4,
"onboard": 0,
"type": "Card Break"
},
{
"dependencies": "Employee",
"hidden": 0,
"is_query_report": 1,
"label": "Employee Information",
"link_count": 0,
"link_to": "Employee Information",
"link_type": "Report",
"onboard": 0,
"type": "Link"
},
{
"dependencies": "Employee",
"hidden": 0,
"is_query_report": 1,
"label": "Employee Birthday",
"link_count": 0,
"link_to": "Employee Birthday",
"link_type": "Report",
"onboard": 0,
"type": "Link"
},
{
"dependencies": "Employee",
"hidden": 0,
"is_query_report": 1,
"label": "Employees Working on a Holiday",
"link_count": 0,
"link_to": "Employees working on a holiday",
"link_type": "Report",
"onboard": 0,
"type": "Link"
},
{
"dependencies": "Daily Work Summary",
"hidden": 0,
"is_query_report": 1,
"label": "Daily Work Summary Replies",
"link_count": 0,
"link_to": "Daily Work Summary Replies",
"link_type": "Report",
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 0,
Expand Down Expand Up @@ -382,9 +330,63 @@
"link_type": "DocType",
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 0,
"label": "Other Reports",
"link_count": 4,
"link_type": "DocType",
"onboard": 0,
"type": "Card Break"
},
{
"dependencies": "Employee",
"hidden": 0,
"is_query_report": 0,
"label": "Employee Information",
"link_count": 0,
"link_to": "Employee Information",
"link_type": "Report",
"onboard": 0,
"report_ref_doctype": "Employee",
"type": "Link"
},
{
"dependencies": "Employee",
"hidden": 0,
"is_query_report": 1,
"label": "Employee Birthday",
"link_count": 0,
"link_to": "Employee Birthday",
"link_type": "Report",
"onboard": 0,
"type": "Link"
},
{
"dependencies": "Employee",
"hidden": 0,
"is_query_report": 1,
"label": "Employees Working on a Holiday",
"link_count": 0,
"link_to": "Employees working on a holiday",
"link_type": "Report",
"onboard": 0,
"type": "Link"
},
{
"dependencies": "Daily Work Summary",
"hidden": 0,
"is_query_report": 1,
"label": "Daily Work Summary Replies",
"link_count": 0,
"link_to": "Daily Work Summary Replies",
"link_type": "Report",
"onboard": 0,
"type": "Link"
}
],
"modified": "2026-03-11 12:49:12.920080",
"modified": "2026-04-06 19:29:59.207478",
"modified_by": "Administrator",
"module": "HR",
"name": "HR Setup",
Expand Down
Loading
Loading