From 93a586be7cce364425da0bcb691da145c8f5f2a5 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 29 Aug 2018 08:57:37 +0200 Subject: [PATCH] [FIX] calendar: recurring events Do not parse the rule with `rrulestr`, because converting back to string will change the original rule. --- addons/calendar/models/calendar.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/calendar/models/calendar.py b/addons/calendar/models/calendar.py index d4b30bcfee7..1fd4bcbf1c4 100644 --- a/addons/calendar/models/calendar.py +++ b/addons/calendar/models/calendar.py @@ -1757,8 +1757,6 @@ class Meeting(models.Model): def _fix_rrule(self, values): rule_str = values.get('rrule') if rule_str: - rule = rrule.rrulestr(rule_str) - if not rule._until and not rule._count: - rule._count = 100 - rule_str = str(rule).split('RRULE:')[-1] + if 'UNTIL' not in rule_str and 'COUNT' not in rule_str: + rule_str += ';COUNT=100' return rule_str