diff --git a/addons/hr_work_entry_contract/static/src/views/work_entry_calendar/work_entry_calendar_controller.js b/addons/hr_work_entry_contract/static/src/views/work_entry_calendar/work_entry_calendar_controller.js index 2b3acc05876..f3d9849a4b3 100644 --- a/addons/hr_work_entry_contract/static/src/views/work_entry_calendar/work_entry_calendar_controller.js +++ b/addons/hr_work_entry_contract/static/src/views/work_entry_calendar/work_entry_calendar_controller.js @@ -12,6 +12,7 @@ export class WorkEntryCalendarController extends CalendarController { const { onRegenerateWorkEntries } = useWorkEntry({ getEmployeeIds: this.getEmployeeIds.bind(this), getRange: this.model.computeRange.bind(this.model), + onClose: this.model.load.bind(this.model) }); this.onRegenerateWorkEntries = onRegenerateWorkEntries; } diff --git a/addons/hr_work_entry_contract/static/src/views/work_entry_hook.js b/addons/hr_work_entry_contract/static/src/views/work_entry_hook.js index f34170ca9e9..b5df837b574 100644 --- a/addons/hr_work_entry_contract/static/src/views/work_entry_hook.js +++ b/addons/hr_work_entry_contract/static/src/views/work_entry_hook.js @@ -3,7 +3,7 @@ import { serializeDate } from "@web/core/l10n/dates"; import { useService } from "@web/core/utils/hooks"; -export function useWorkEntry({ getEmployeeIds, getRange }) { +export function useWorkEntry({ getEmployeeIds, getRange, onClose}) { const orm = useService("orm"); const action = useService("action"); @@ -15,7 +15,7 @@ export function useWorkEntry({ getEmployeeIds, getRange }) { default_employee_ids: getEmployeeIds(), date_start: serializeDate(start), date_end: serializeDate(end), - } + }, onClose: onClose }); }, generateWorkEntries: () => {