[REF] base_calendar
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Mon, 10 Dec 2012 14:29:12 +0000 (15:29 +0100)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Mon, 10 Dec 2012 14:29:12 +0000 (15:29 +0100)
bzr revid: qdp-launchpad@openerp.com-20121210142912-9pisd030jhmf8tqy

addons/base_calendar/base_calendar.py
addons/base_calendar/base_calendar_view.xml
addons/base_calendar/crm_meeting_view.xml
addons/base_calendar/test/test_crm_recurrent_meeting_case2.yml

index 4602c85..6f09e53 100644 (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='',
index 00c4133..e3ad980 100644 (file)
                              <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"/>
                         <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"/>
index 0c11189..110ee50 100644 (file)
                             <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"/>
                                 <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>
index a2c68a3..0fd34fd 100644 (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 !'