From 3b98b8d89e372397f7d119302cc149a35e7ef60a Mon Sep 17 00:00:00 2001 From: "Merlin (megu)" Date: Tue, 28 Dec 2021 10:31:29 +0000 Subject: [PATCH] [FIX] hr_holidays: translate field names of form dialogs 'New Time Off' and 'Allocation Request' dialogs were not translated to the user's language Steps to reproduce: 1. Install the Time Off app 2. Go to General Settings, add a language and switch to it 3. Open the Time Off app and click on the button 'New Time Off' (which is now translated to the language you chose) 4. The field names of the dialog that opens are not translated Solution: Add the user's language to the context of the dialogs OPW-2715396 closes odoo/odoo#82246 X-original-commit: bb4c568fe6cc32e7a0a26960276999113b858144 Signed-off-by: Guillaume Merlin (megu) --- .../src/js/time_off_calendar/time_off_calendar_controller.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/hr_holidays/static/src/js/time_off_calendar/time_off_calendar_controller.js b/addons/hr_holidays/static/src/js/time_off_calendar/time_off_calendar_controller.js index c9f15a3afa7..0ece094d944 100644 --- a/addons/hr_holidays/static/src/js/time_off_calendar/time_off_calendar_controller.js +++ b/addons/hr_holidays/static/src/js/time_off_calendar/time_off_calendar_controller.js @@ -185,12 +185,14 @@ export const TimeOffCalendarController = CalendarController.extend({ return { 'default_date_from': moment().format('YYYY-MM-DD'), 'default_date_to': moment().add(1, 'days').format('YYYY-MM-DD'), + 'lang': this.context.lang, }; }, _getAllocationContext() { return { 'default_state': 'confirm', + 'lang': this.context.lang, }; },