From db5b055138b8836a30d85544ca2fe8d0296d0ecf Mon Sep 17 00:00:00 2001 From: "Chong Wang (cwg)" Date: Fri, 22 Oct 2021 08:21:51 +0000 Subject: [PATCH] [FIX] calendar: fix recurrence name change the wrong recurrence name like "Every 1 Months on the -1 Last for 3 events" to "Every 1 Months on the Last Thursday for 3 events" before this task, If you create a recurrence event and invite another partner in calendar with * Repeat Every: xxx "Months" * Day of Month: Day of month: Last Thurday The recurrence name in the email would be like "Every 1 Months on the -1 Last for 3 events" closes odoo/odoo#78809 Signed-off-by: Arnaud Joset --- addons/calendar/models/calendar_recurrence.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/calendar/models/calendar_recurrence.py b/addons/calendar/models/calendar_recurrence.py index 7e12a7d58b2..d8a94e22c21 100644 --- a/addons/calendar/models/calendar_recurrence.py +++ b/addons/calendar/models/calendar_recurrence.py @@ -153,8 +153,9 @@ class RecurrenceRule(models.Model): on = _("on %s") % ", ".join([day_name for day_name in day_strings]) elif recurrence.rrule_type == 'monthly': if recurrence.month_by == 'day': - weekday_label = dict(BYDAY_SELECTION)[recurrence.byday] - on = _("on the %(position)s %(weekday)s", position=recurrence.byday, weekday=weekday_label) + position_label = dict(BYDAY_SELECTION)[recurrence.byday] + weekday_label = dict(WEEKDAY_SELECTION)[recurrence.weekday] + on = _("on the %(position)s %(weekday)s", position=position_label, weekday=weekday_label) else: on = _("day %s", recurrence.day) else: