diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 4602c85ba2a..6f09e533917 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -949,13 +949,13 @@ class calendar_event(osv.osv): def unlink_events(self, cr, uid, ids, context=None): """ - This function deletes event which are linked with the event with recurrent_uid + This function deletes event which are linked with the event with recurrent_id (Removes the events which refers to the same UID value) """ if context is None: context = {} for event_id in ids: - cr.execute("select id from %s where recurrent_uid=%%s" % (self._table), (event_id,)) + cr.execute("select id from %s where recurrent_id=%%s" % (self._table), (event_id,)) r_ids = map(lambda x: x[0], cr.fetchall()) self.unlink(cr, uid, r_ids, context=context) return True @@ -1033,7 +1033,7 @@ rule or repeating pattern of time to exclude from the recurring rule."), 'alarm_id': fields.many2one('res.alarm', 'Reminder', states={'done': [('readonly', True)]}, help="Set an alarm at this time, before the event occurs" ), 'base_calendar_alarm_id': fields.many2one('calendar.alarm', 'Alarm'), - 'recurrent_uid': fields.integer('Recurrent ID'), + 'recurrent_id': fields.integer('Recurrent ID'), 'recurrent_id_date': fields.datetime('Recurrent ID date'), 'vtimezone': fields.selection(_tz_get, size=64, string='Timezone'), 'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}), @@ -1391,7 +1391,7 @@ rule or repeating pattern of time to exclude from the recurring rule."), if data.get('rrule'): data.update( vals, - recurrent_uid=real_event_id, + recurrent_id=real_event_id, recurrent_id_date=data.get('date'), rrule_type=False, rrule='', diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index 00c41332553..e3ad980dae7 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -101,7 +101,7 @@ - + @@ -162,7 +162,7 @@ + attrs="{'readonly':[('recurrent_id','!=',False)]}"/> diff --git a/addons/base_calendar/crm_meeting_view.xml b/addons/base_calendar/crm_meeting_view.xml index 0c11189d505..110ee509e14 100644 --- a/addons/base_calendar/crm_meeting_view.xml +++ b/addons/base_calendar/crm_meeting_view.xml @@ -120,7 +120,7 @@ + attrs="{'readonly': [('recurrent_id','!=',False)]}"/> diff --git a/addons/base_calendar/test/test_crm_recurrent_meeting_case2.yml b/addons/base_calendar/test/test_crm_recurrent_meeting_case2.yml index a2c68a31c6b..0fd34fdd010 100644 --- a/addons/base_calendar/test/test_crm_recurrent_meeting_case2.yml +++ b/addons/base_calendar/test/test_crm_recurrent_meeting_case2.yml @@ -11,7 +11,7 @@ duration: 1.0 name: Test Meeting recurrency: true - recurrent_uid: 0.0 + recurrent_id: 0.0 rrule_type: daily sequence: 0.0 - @@ -37,7 +37,7 @@ we: true name: Review code with programmer recurrency: true - recurrent_uid: 0.0 + recurrent_id: 0.0 rrule_type: weekly sequence: 0.0 - @@ -57,7 +57,7 @@ duration: 1.0 name: Sprint Review recurrency: true - recurrent_uid: 0.0 + recurrent_id: 0.0 rrule_type: monthly sequence: 0.0 - @@ -92,6 +92,6 @@ I check whether the record is edited perfectly or not. - !python {model: crm.meeting}: | - meeting_ids = self.search(cr, uid, [('recurrent_uid', '=', ref('crm_meeting_reviewcodewithprogrammer0')), ('recurrent_id_date','=','2011-04-25 12:47:00')], context) + meeting_ids = self.search(cr, uid, [('recurrent_id', '=', ref('crm_meeting_reviewcodewithprogrammer0')), ('recurrent_id_date','=','2011-04-25 12:47:00')], context) assert meeting_ids, 'Meeting is not edited !'