[REF] base_calendar

bzr revid: qdp-launchpad@openerp.com-20121210142912-9pisd030jhmf8tqy
This commit is contained in:
Quentin (OpenERP) 2012-12-10 15:29:12 +01:00
parent c6475a4cf6
commit 9e9b0cc8b4
4 changed files with 12 additions and 12 deletions

View File

@ -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='',

View File

@ -101,7 +101,7 @@
<field name="show_as" string="Show Time as"/>
<field name="class" string="Privacy"/>
<field name="recurrent_id_date" invisible="1"/>
<field name="recurrent_uid" invisible="1"/>
<field name="recurrent_id" invisible="1"/>
</group>
<separator string="Description"/>
<field name="description"/>
@ -162,7 +162,7 @@
<group col="4" colspan="4" name="rrule">
<group col="4" colspan="4">
<field name="rrule_type" string="Recurrency period"
attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
attrs="{'readonly':[('recurrent_id','!=',False)]}"/>
<field name="interval"/>
<separator string="End of Recurrence" colspan="4"/>
<field name="end_type"/>

View File

@ -120,7 +120,7 @@
<group col="1">
<group>
<field name="recurrency"
attrs="{'readonly': [('recurrent_uid','!=',False)]}"/>
attrs="{'readonly': [('recurrent_id','!=',False)]}"/>
</group>
<group attrs="{'invisible': [('recurrency','=',False)]}">
<label for="interval"/>
@ -167,7 +167,7 @@
<field name="show_as"/>
<field name="rrule" invisible="1" readonly="1"/>
<field name="recurrent_id_date" invisible="1"/>
<field name="recurrent_uid" invisible="1"/>
<field name="recurrent_id" invisible="1"/>
</group>
</group>
</page>

View File

@ -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 !'