summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Grazioso (agr-odoo) <agr@odoo.com>2020-12-18 14:37:20 +0000
committerAndrea Grazioso (agr-odoo) <agr@odoo.com>2020-12-18 14:37:20 +0000
commit4cb599f694eecd2a3c96ed25a055f0b9030a5864 (patch)
tree37676f84464b16dc37346522abe95d97933d5489
parent98797332149a78262710751c67e0b95da6075da0 (diff)
[FIX] microsoft_calendar: fix recurrence event creation
Create an event as follows: - Recurrent - Repeat every 1 Months - Until End date <far in future> - Day of Month Day of Month First Monday An exception will raise opw-2412598 closes odoo/odoo#63590 Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
-rw-r--r--addons/microsoft_calendar/models/calendar.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/addons/microsoft_calendar/models/calendar.py b/addons/microsoft_calendar/models/calendar.py
index 51e7e720cba..dfb1976b472 100644
--- a/addons/microsoft_calendar/models/calendar.py
+++ b/addons/microsoft_calendar/models/calendar.py
@@ -320,13 +320,13 @@ class Meeting(models.Model):
pattern['firstDayOfWeek'] = 'sunday'
if recurrence.rrule_type == 'monthly' and recurrence.month_by == 'day':
- byday_selection = [
- ('1', 'first'),
- ('2', 'second'),
- ('3', 'third'),
- ('4', 'fourth'),
- ('-1', 'last')
- ]
+ byday_selection = {
+ '1': 'first',
+ '2': 'second',
+ '3': 'third',
+ '4': 'fourth',
+ '-1': 'last',
+ }
pattern['index'] = byday_selection[recurrence.byday]
rule_range = {