From e7aaaa34e245172353beeec1bd12caacb94a099e Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 9 Jan 2014 14:09:10 +0100 Subject: [PATCH] [FIX] base_calendar: back to same behaviour as previously, when setting a recurrent event the first is not taken into account bzr revid: mat@openerp.com-20140109130910-8ohh6kqt5m76jb7q --- addons/base_calendar/base_calendar.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 29f205f01d7..2e1503df504 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1202,17 +1202,14 @@ rule or repeating pattern of time to exclude from the recurring rule."), fields = list(set(fields + order_fields)) for data in super(calendar_event, self).read(cr, uid, select, fields, context=context): - result_data.append(data) if not data['recurrency'] or not data['rrule']: + result_data.append(data) result.append(data['id']) continue event_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S") # TOCHECK: the start date should be replaced by event date; the event date will be changed by that of calendar code - if not data['rrule']: - continue - exdate = data['exdate'] and data['exdate'].split(',') or [] rrule_str = data['rrule'] new_rrule_str = [] @@ -1411,8 +1408,8 @@ rule or repeating pattern of time to exclude from the recurring rule."), new_id = get_real_ids(arg[2]) new_arg = (arg[0], arg[1], new_id) new_args.append(new_arg) - #offset, limit, order and count must be treated separately as we may need to deal with virtual ids if context.get('virtual_id', True): + #offset, limit, order and count must be treated separately as we may need to deal with virtual ids res = super(calendar_event, self).search(cr, uid, new_args, offset=0, limit=0, order=None, context=context, count=False) res = self._get_recurrent_ids(cr, uid, res, args, limit, order=order, context=context) else: