Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Roster Automation for next month #3922

Merged
merged 4 commits into from
Jan 13, 2025
Merged
Changes from all commits
Commits
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
6 changes: 2 additions & 4 deletions one_fm/one_fm/page/roster/roster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1367,8 +1367,8 @@ def create_employee_schedule():
"""
# Determine the target month (month after next)
today = frappe.utils.nowdate()
target_month_start = get_first_day(add_months(today, 2))
target_month_end = get_last_day(add_months(today, 2))
target_month_start = get_first_day(add_months(today, 1))
target_month_end = get_last_day(add_months(today, 1))

shifts_with_auto_roster = frappe.get_all(
"Operations Shift",
Expand Down Expand Up @@ -1455,8 +1455,6 @@ def create_or_update_schedule_for_employee(employee, date, availability, operati
schedule_doc.day_off_ot = day_off_ot
schedule_doc.start_datetime = start_datetime
schedule_doc.end_datetime = end_datetime
schedule_doc.modified_by = owner
schedule_doc.modified = creation
schedule_doc.save(ignore_permissions=True)
else:
# Create a new record
Expand Down
Loading