Arnaud Pineux (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/7.0-base-calendar-api into 
lp:openobject-addons/7.0.

Requested reviews:
  qdp (OpenERP) (qdp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-base-calendar-api/+merge/143072

This branch change many things in the behavior of base_calendar.
- When a meeting is created:
   - It must have minimum one attendee or organizer that are a 'user'
   - A copy of the meeting is done for each attendee and organizer and each of 
these meeting have the same information except the user_id.
- When a meeting is removed:
   - It remove every linked meeting if the user_id of that meeting is also the 
organizer of the meeting.
   - If we try to remove another meeting, it will fail (no meeting will be 
deleted).
- When an attendee is removed from a meeting:
   - The attendee is also removed from other linked meetings
   - The linked meetings with user_id = this attendee are removed
- A recurrent meeting is also recurrent for each attendee
- When an attendee is added to an already existing meeting:
   - The attendee is added to every linked meeting
   - A copy of the meeting is created with the new attendee as user_id

The code isn't clear and copy, create, write and unlink methods are overloaded. 
To change this, we need to rewrite the calendar, meeting, etc... in the way it 
can handle many attendees, recurrent meeting, private meeting,...
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-base-calendar-api/+merge/143072
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/7.0-base-calendar-api.
=== modified file 'base_calendar/base_calendar.py'
--- base_calendar/base_calendar.py	2012-12-28 11:18:53 +0000
+++ base_calendar/base_calendar.py	2013-01-14 10:58:28 +0000
@@ -23,7 +23,7 @@
 from dateutil import parser
 from dateutil import rrule
 from dateutil.relativedelta import relativedelta
-from openerp.osv import fields, osv
+from openerp.osv import fields, osv, orm
 from openerp.service import web_services
 from openerp.tools.translate import _
 import pytz
@@ -56,6 +56,7 @@
         exdate = []
 
     rset1 = rrule.rrulestr(str(rrulestring), dtstart=startdate, forceset=True)
+
     for date in exdate:
         datetime_obj = todate(date)
         rset1._exdate.append(datetime_obj)
@@ -63,7 +64,7 @@
     if exrule:
         rset1.exrule(rrule.rrulestr(str(exrule), dtstart=startdate))
 
-    return list(rset1)
+    return list(rset1)[1:]
 
 def base_calendar_id2real_id(base_calendar_id=None, with_date=False):
     """
@@ -592,7 +593,7 @@
             if vals.ref and vals.ref.user_id:
                 mod_obj = self.pool.get(vals.ref._name)
                 res=mod_obj.read(cr,uid,[vals.ref.id],['duration','class'],context)
-                defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id,'duration':res[0]['duration'],'class':res[0]['class']}
+                defaults = {'user_id': vals.user_id.id, 'duration':res[0]['duration'],'class':res[0]['class']}
                 mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
             self.write(cr, uid, vals.id, {'state': 'accepted'}, context)
 
@@ -1071,7 +1072,7 @@
         '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)]}),
+        'user_id': fields.many2one('res.users', 'Attendee', states={'done': [('readonly', True)]}),
         'organizer': fields.char("Organizer", size=256, states={'done': [('readonly', True)]}), # Map with organizer attribute of VEvent.
         'organizer_id': fields.many2one('res.users', 'Organizer', states={'done': [('readonly', True)]}),
         'end_type' : fields.selection([('count', 'Number of repetitions'), ('end_date','End date')], 'Recurrence Termination'),
@@ -1123,9 +1124,14 @@
                 attendees[att.partner_id.id] = True
             new_attendees = []
             mail_to = ""
+            organizer_is_attendee = False
+            if not event.organizer_id:
+                organizer_is_attendee = True
             for partner in event.partner_ids:
                 if partner.id in attendees:
                     continue
+                if event.organizer_id and event.organizer_id.id in partner.user_ids:
+                    organizer_is_attendee = True
                 att_id = self.pool.get('calendar.attendee').create(cr, uid, {
                     'partner_id': partner.id,
                     'user_id': partner.user_ids and partner.user_ids[0].id or False,
@@ -1139,18 +1145,32 @@
                 }, context=context)
                 new_attendees.append(att_id)
 
+            if not organizer_is_attendee:
+                att_id = self.pool.get('calendar.attendee').create(cr, uid, {
+                    'partner_id': event.organizer_id.partner_id.id,
+                    'user_id': event.organizer_id.id,
+                    'ref': self._name+','+str(event.id),
+                    'email': event.organizer_id.email
+                }, context=context)
+                if event.organizer_id.partner_id.email:
+                    mail_to = mail_to + " " + event.organizer_id.partner_id.email
+                new_attendees.append(att_id)
+
             if mail_to and current_user.email:
                 att_obj._send_mail(cr, uid, new_attendees, mail_to,
                     email_from = current_user.email, context=context)
         return True
 
-    def default_organizer(self, cr, uid, context=None):
-        user_pool = self.pool.get('res.users')
-        user = user_pool.browse(cr, uid, uid, context=context)
-        res = user.name
-        if user.email:
-            res += " <%s>" %(user.email)
-        return res
+    def onchange_organizer(self, cr, uid, ids, organizer_id,context=None):
+        res = ""
+        if organizer_id:
+            user_pool = self.pool.get('res.users')
+            user = user_pool.browse(cr, uid, organizer_id, context=context)
+            if 'name' in user and user.name:
+                res = user.name
+            if 'email' in user and user.email:
+                res += " <%s>" %(user.email)
+        return {'value': {'organizer': res}}
 
     _defaults = {
             'end_type': 'count',
@@ -1163,7 +1183,7 @@
             'interval': 1,
             'active': 1,
             'user_id': lambda self, cr, uid, ctx: uid,
-            'organizer': default_organizer,
+            'organizer_id': lambda self, cr, uid, ctx: uid,
     }
 
     def _check_closing_date(self, cr, uid, ids, context=None):
@@ -1269,7 +1289,7 @@
             if data.get('end_date'):
                 data['end_date_new'] = ''.join((re.compile('\d')).findall(data.get('end_date'))) + 'T235959Z'
 
-            return (data.get('end_type') == 'count' and (';COUNT=' + str(data.get('count'))) or '') +\
+            return (data.get('end_type') == 'count' and (';COUNT=' + str(data.get('count')+1)) or '') +\
                              ((data.get('end_date_new') and data.get('end_type') == 'end_date' and (';UNTIL=' + data.get('end_date_new'))) or '')
 
         freq = data.get('rrule_type', False)
@@ -1364,7 +1384,7 @@
         #offset, limit 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=order, context=context, count=False)
         if context.get('virtual_id', True):
-            res = self.get_recurrent_ids(cr, uid, res, new_args, limit, context=context)
+            res += self.get_recurrent_ids(cr, uid, super(calendar_event, self).search(cr, uid, [('recurrency','=',1)], offset=0, limit=0, order=order, context=context, count=False), new_args, limit, context=context)
         if count:
             return len(res)
         elif limit:
@@ -1442,14 +1462,76 @@
         if vals.get('vtimezone', '') and vals.get('vtimezone', '').startswith('/freeassociation.sourceforge.net/tzfile/'):
             vals['vtimezone'] = vals['vtimezone'][40:]
 
-        res = super(calendar_event, self).write(cr, uid, ids, vals, context=context)
-        if vals.get('partner_ids', False):
-            self.create_attendees(cr, uid, ids, context)
-
         if ('alarm_id' in vals or 'base_calendar_alarm_id' in vals)\
                 or ('date' in vals or 'duration' in vals or 'date_deadline' in vals):
             alarm_obj = self.pool.get('res.alarm')
             alarm_obj.do_alarm_create(cr, uid, ids, self._name, 'date', context=context)
+
+        if 'organizer_id' in vals and vals['organizer']:
+            linked_event_ids = []
+            event = self.browse(cr, uid, ids[0], context=context)
+            old_organizer = event['organizer_id']
+            if old_organizer:
+                linked_event_ids = [base_calendar_id2real_id(id) for id in self.search(cr, uid, [('attendee_ids', 'like', [attendee.id for attendee in event['attendee_ids']]), ('user_id', '=', old_organizer.id)], context=context)]
+                #remove the event if the organizer_id already exists as user_id
+                already_existing_event = [base_calendar_id2real_id(id) for id in self.search(cr, uid, [('attendee_ids', 'like', [attendee.id for attendee in event['attendee_ids']]), ('user_id', '=', vals['organizer_id'])], context=context)]
+                if already_existing_event:
+                    super(calendar_event, self).write(cr, uid, linked_event_ids, {'active': False}, context=context)
+                else:
+                    partner_from_organizer = self.pool.get('res.users').browse(cr, uid, vals['organizer_id'], context=context)['partner_id']
+                    if 'partner_ids' in vals and partner_from_organizer.id in vals['partner_ids'][0][2]:
+                        super(calendar_event, self).write(cr, uid, linked_event_ids, {'active': False}, context=context)
+                    else:
+                        super(calendar_event, self).write(cr, uid, linked_event_ids, {'user_id': vals['organizer_id']}, context=context)
+            
+        if 'partner_ids' in vals and vals['partner_ids']:
+            #If partner_ids belongs to vals, it means that we added or removed at least one "partner" from the event
+            linked_event_ids = []
+            for event in self.browse(cr, uid, ids, context=context):
+                #Get every event linked to the current event. (Every copy of that event)
+                linked_event_ids = [base_calendar_id2real_id(id) for id in self.search(cr, uid, [('attendee_ids', 'like', [attendee.id for attendee in event['attendee_ids']])], context=context)]
+                #We collect the list of partners from the Event and from the vals to look if we remove a partner or add one to the event.
+                partners_event = set([attendee.partner_id.id for attendee in event['attendee_ids']])
+                partners_vals = set(vals['partner_ids'][0][2])
+                #We collect a dictionnary of partner.id : attendee for later
+                partner_to_attendee = {attendee.partner_id.id : attendee for attendee in event['attendee_ids']}
+                #We change the partners on every linked_event
+                res = super(calendar_event, self).write(cr, uid, linked_event_ids, vals, context=context)
+                #if we add a new partner, it means that partners_vals contains more elements than partners_event
+                if partners_vals - partners_event:
+                    #We create the new attendee(s)
+                    self.create_attendees(cr, uid, [event.id], context=context)
+                    #We create a new meeting with the new attendee as user_id if he is a user
+                    for id in partners_vals - partners_event:
+                        for user_id in self.pool.get("res.partner").browse(cr, uid, id, context=context)['user_ids']:
+                            new = self.copy(cr, uid, event.id, context={'copy':True})
+                            super(calendar_event, self).write(cr, uid, new, {'user_id': user_id.id}, context=context)
+                            linked_event_ids.append(new)
+                    #We add the new attendees to linked_events
+                    attendee_ids = self.browse(cr, uid, event.id, context=context)['attendee_ids']
+                    for linked_event in self.browse(cr, uid, list(set(linked_event_ids)-set([event.id])), context=context):
+                        for attendee in attendee_ids:
+                            if not attendee.id in linked_event['attendee_ids']:
+                                linked_event.write({'attendee_ids': [(4, attendee.id)]}, context=context)
+                #if we remove a partner, it means that partners_event contains more elements than partners_vals
+                if partners_event - partners_vals:
+                    partner_ids_to_remove = partners_event - partners_vals
+                    for partner_to_remove in partner_ids_to_remove:
+                        #We get the attendee to remove
+                        attendee_to_remove = partner_to_attendee[partner_to_remove]
+                        #We remove the meeting where the attendee to remove is the responsible so the user_id
+                        for linked_event in self.browse(cr, uid, linked_event_ids, context=context):
+                            if linked_event['user_id'] in attendee_to_remove.partner_id.user_ids:
+                                super(calendar_event, self).write(cr, uid, [linked_event.id], {'active':False}, context=context)
+                                linked_event_ids = list(set(linked_event_ids) - set([linked_event.id]))
+                        #We finaly remove the attendee
+                        attendee_to_remove.unlink(context=context)
+            return linked_event_ids or True
+        else:
+            res = super(calendar_event, self).write(cr, uid, ids, vals, context=context)
+            for event in self.browse(cr, uid, ids, context=context):
+                linked_event_ids = [base_calendar_id2real_id(id) for id in self.search(cr, uid, [('attendee_ids', 'like', [attendee.id for attendee in event['attendee_ids']])], context=context)]
+                super(calendar_event, self).write(cr, uid, linked_event_ids, vals, context=context)
         return res or True and False
 
     def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
@@ -1474,7 +1556,7 @@
             context = {}
         fields2 = fields and fields[:] or None
 
-        EXTRAFIELDS = ('class','user_id','duration')
+        EXTRAFIELDS = ('class','user_id','duration','count')
         for f in EXTRAFIELDS:
             if fields and (f not in fields):
                 fields2.append(f)
@@ -1530,6 +1612,9 @@
         if context is None:
             context = {}
 
+        if 'copy' in context and context['copy']:
+            return super(calendar_event, self).copy(cr, uid, base_calendar_id2real_id(id), default=default, context=context)
+
         res = super(calendar_event, self).copy(cr, uid, base_calendar_id2real_id(id), default, context)
         alarm_obj = self.pool.get('res.alarm')
         alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context)
@@ -1540,39 +1625,97 @@
             ids = [ids]
         res = False
         attendee_obj=self.pool.get('calendar.attendee')
-        for event_id in ids[:]:
-            if len(str(event_id).split('-')) == 1:
-                continue
 
-            real_event_id = base_calendar_id2real_id(event_id)
-            data = self.read(cr, uid, real_event_id, ['exdate'], context=context)
-            date_new = event_id.split('-')[1]
-            date_new = time.strftime("%Y%m%dT%H%M%S", \
-                         time.strptime(date_new, "%Y%m%d%H%M%S"))
-            exdate = (data['exdate'] and (data['exdate'] + ',')  or '') + date_new
-            self.write(cr, uid, [real_event_id], {'exdate': exdate})
-            ids.remove(event_id)
         for event in self.browse(cr, uid, ids, context=context):
-            if event.attendee_ids:
-                attendee_obj.unlink(cr, uid, [x.id for x in event.attendee_ids], context=context)
-
-        res = super(calendar_event, self).unlink(cr, uid, ids, context=context)
-        self.pool.get('res.alarm').do_alarm_unlink(cr, uid, ids, self._name)
-        self.unlink_events(cr, uid, ids, context=context)
+            if 'organizer_id' in event and event['organizer_id'] and event['organizer_id'] == event['user_id']:
+                if 'attendee_ids' in event and event['attendee_ids']:
+                    copy_event_ids = [base_calendar_id2real_id(id) for id in self.search(cr, uid, [('attendee_ids', 'like', [attendee.id for attendee in event['attendee_ids']])], context=context)]
+                else:
+                    copy_event_ids = ids
+                for event_id in copy_event_ids[:]:
+                    if len(str(event_id).split('-')) == 1:
+                        continue
+
+                    real_event_id = base_calendar_id2real_id(event_id)
+                    data = self.read(cr, uid, real_event_id, ['exdate'], context=context)
+                    date_new = event_id.split('-')[1]
+                    date_new = time.strftime("%Y%m%dT%H%M%S", \
+                                 time.strptime(date_new, "%Y%m%d%H%M%S"))
+                    exdate = (data['exdate'] and (data['exdate'] + ',')  or '') + date_new
+                    self.write(cr, uid, [real_event_id], {'exdate': exdate})
+                    copy_event_ids.remove(event_id)
+
+                for event_id in self.browse(cr, uid, copy_event_ids, context=context):
+                    if event_id.attendee_ids:
+                        attendee_obj.unlink(cr, uid, [x.id for x in event_id.attendee_ids], context=context)
+
+                res = super(calendar_event, self).unlink(cr, uid, copy_event_ids, context=context)
+                self.pool.get('res.alarm').do_alarm_unlink(cr, uid, copy_event_ids, self._name)
+                self.unlink_events(cr, uid, copy_event_ids, context=context)
+
         return res
 
     def create(self, cr, uid, vals, context=None):
         if context is None:
             context = {}
 
+        if 'copy' in context and context['copy']:
+            return super(calendar_event, self).create(cr, uid, vals, context)
+
         if vals.get('vtimezone', '') and vals.get('vtimezone', '').startswith('/freeassociation.sourceforge.net/tzfile/'):
             vals['vtimezone'] = vals['vtimezone'][40:]
 
-        res = super(calendar_event, self).create(cr, uid, vals, context)
-        alarm_obj = self.pool.get('res.alarm')
-        alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context)
-        self.create_attendees(cr, uid, [res], context)
-        return res
+        if 'partner_ids' in vals and vals['partner_ids']:
+            meeting_copy_number = 0
+            result = -1
+            partner_pool = self.pool.get('res.partner')
+            alarm_pool = self.pool.get('res.alarm')
+            organizer_is_attendee = True
+            if 'organizer_id' in vals and vals['organizer_id']:
+                organizer_is_attendee = False
+            for elmt in vals['partner_ids']:
+                for partner_id in elmt[2]:
+                    partner = partner_pool.browse(cr, uid, partner_id, context=context)
+                    if 'user_ids' in partner and partner['user_ids']:
+                        for user in partner['user_ids']:
+                            if 'organizer_id' in  vals and vals['organizer_id'] and vals['organizer_id'] == user.id:
+                                organizer_is_attendee = True
+                            vals['user_id'] = user.id
+                            if meeting_copy_number == 0:
+                                result = super(calendar_event, self).create(cr, uid, vals, context)
+                                alarm_pool.do_alarm_create(cr, uid, [result], self._name, 'date', context=context)
+                                self.create_attendees(cr, uid, [result], context)
+                                meeting_copy_number += 1
+                            else:
+                                attendee_ids = self.browse(cr, uid, result, context=context)['attendee_ids']
+                                result = super(calendar_event, self).create(cr, uid, vals, context)
+                                for attendee in attendee_ids:
+                                    self.write(cr, uid, [result], {'attendee_ids': [(4, attendee.id)]}, context=context)                       
+            if not organizer_is_attendee:
+                attendee_ids = []
+                if result != -1:
+                    attendee_ids = self.browse(cr, uid, result, context=context)['attendee_ids']
+                vals['user_id'] = vals['organizer_id']
+                result = super(calendar_event, self).create(cr, uid, vals, context=context)
+                for attendee in attendee_ids:
+                    self.write(cr, uid, [result], {'attendee_ids': [(4, attendee.id)]}, context=context)
+                meeting_copy_number += 1
+
+            if meeting_copy_number == 0:
+                raise orm.except_orm(_('Error!'),
+                     _('You must select at least one user as attendee or organizer'))
+            else:
+                return result
+        else:
+            if 'organizer_id' in  vals and vals['organizer_id']:
+                vals['user_id'] = vals['organizer_id']
+                result = super(calendar_event, self).create(cr, uid, vals, context=context)
+                alarm_pool.do_alarm_create(cr, uid, [result], self._name, 'date', context=context)
+                self.create_attendees(cr, uid, [result], context)
+                return result
+            else:
+                raise orm.except_orm(_('Error!'),
+                     _('You must select at least one Attendee or organizer'))
 
     def do_tentative(self, cr, uid, ids, context=None, *args):
         """ Makes event invitation as Tentative

=== modified file 'base_calendar/crm_meeting.py'
--- base_calendar/crm_meeting.py	2012-12-20 12:49:27 +0000
+++ base_calendar/crm_meeting.py	2013-01-14 10:58:28 +0000
@@ -64,6 +64,7 @@
     }
     _defaults = {
         'state': 'open',
+        'partner_ids' : lambda self,cr,uid,c: [self.pool.get('res.users').browse(cr, uid, uid, c).partner_id.id],
     }
 
     def message_get_subscription_data(self, cr, uid, ids, context=None):

=== modified file 'base_calendar/crm_meeting_demo.xml'
--- base_calendar/crm_meeting_demo.xml	2012-11-29 22:26:45 +0000
+++ base_calendar/crm_meeting_demo.xml	2013-01-14 10:58:28 +0000
@@ -15,6 +15,7 @@
             <field name="categ_ids" eval="[(6,0,[ref('categ_meet1')])]"/>
             <field eval="time.strftime('%Y-%m-03 16:30:00')" name="date_deadline"/>
             <field eval="6.3" name="duration"/>
+            <field name="partner_ids" eval="[(6,0,[ref('base.partner_root')])]"/>
             <field name="state">open</field>
         </record>
 
@@ -27,6 +28,7 @@
             <field eval="time.strftime('%Y-%m-05 12:00:00')" name="date"/>
             <field eval="time.strftime('%Y-%m-05 19:00:00')" name="date_deadline"/>
             <field eval="7.0" name="duration"/>
+            <field name="partner_ids" eval="[(6,0,[ref('base.partner_root')])]"/>
             <field name="state">open</field>
         </record>
 
@@ -39,6 +41,7 @@
             <field eval="time.strftime('%Y-%m-12 15:55:05')" name="date"/>
             <field eval="time.strftime('%Y-%m-12 18:55:05')" name="date_deadline"/>
             <field eval="3.0" name="duration"/>
+            <field name="partner_ids" eval="[(6,0,[ref('base.partner_root')])]"/>
             <field name="state">open</field>
         </record>
 
@@ -50,6 +53,7 @@
             <field eval="time.strftime('%Y-%m-20 8:00:00')" name="date"/>
             <field eval="time.strftime('%Y-%m-20 10:30:00')" name="date_deadline"/>
             <field eval="2.5" name="duration"/>
+            <field name="partner_ids" eval="[(6,0,[ref('base.partner_demo')])]"/>
             <field name="state">open</field>
         </record>
 
@@ -60,6 +64,7 @@
             <field name="categ_ids" eval="[(6,0,[ref('categ_meet1')])]"/>
             <field eval="time.strftime('%Y-%m-22 11:05:00')" name="date"/>
             <field eval="time.strftime('%Y-%m-22 16:05:00')" name="date_deadline"/>
+            <field name="partner_ids" eval="[(6,0,[ref('base.partner_demo')])]"/>
             <field eval="5" name="duration"/>
             <field name="state">open</field>
         </record>
@@ -72,6 +77,7 @@
             <field eval="time.strftime('%Y-%m-18 2:00:00')" name="date"/>
             <field eval="time.strftime('%Y-%m-18 10:30:00')" name="date_deadline"/>
             <field eval="8.5" name="duration"/>
+            <field name="partner_ids" eval="[(6,0,[ref('base.partner_root')])]"/>
             <field name="state">open</field>
         </record>
     </data>

=== modified file 'base_calendar/crm_meeting_view.xml'
--- base_calendar/crm_meeting_view.xml	2012-12-28 08:48:40 +0000
+++ base_calendar/crm_meeting_view.xml	2013-01-14 10:58:28 +0000
@@ -68,7 +68,7 @@
                                     on_change="onchange_dates(date,False,date_deadline)"/>
                             </group>
                             <group>
-                                <field name="user_id" groups="base.group_no_one"/>
+                                <field name="organizer_id" groups="base.group_no_one" on_change="onchange_organizer(organizer_id)"/>
                                 <field name="categ_ids" widget="many2many_tags"/>
                                 <field name="location"/>
                                 <field name="organizer" groups="base.group_no_one"/>
@@ -133,52 +133,7 @@
                             </group>
                         </group>
                     </page>
-                    <page string="Invitations">
-                        <field name="attendee_ids" widget="one2many" mode="tree">
-                            <tree string="Invitation details" editable="top">
-                                <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
-                                <field name="email" string="Mail To"/>
-                                <field name="state"/>
-                                <button name="do_tentative"
-                                    states="needs-action,declined,accepted"
-                                    string="Uncertain" type="object"
-                                    icon="terp-crm"/>
-                                <button name="do_accept" string="Accept"
-                                    states="needs-action,tentative,declined"
-                                    type="object" icon="gtk-apply"/>
-                                <button name="do_decline" string="Decline"
-                                    states="needs-action,tentative,accepted"
-                                    type="object" icon="gtk-cancel"/>
-                            </tree>
-                            <form string="Invitation details" version="7.0">
-                                <header>
-                                    <button name="do_tentative" type="object"
-                                        states="needs-action,declined,accepted"
-                                        string="Uncertain"/>
-                                    <button name="do_accept" type="object"
-                                        states="needs-action,tentative,declined"
-                                        string="Accept"/>
-                                    <button name="do_decline" type="object"
-                                        states="needs-action,tentative,accepted"
-                                        string="Decline"/>
-                                    <field name="state" widget="statusbar" statusbar_visible="draft,open,done"/>
-                                </header>
-                                <group>
-                                    <group>
-                                        <field name="email"/>
-                                        <field name="rsvp"/>
-                                        <field name="cutype"/>
-                                        <field name="role"/>
-                                    </group>
-                                    <group>
-                                        <field name="partner_id"/>
-                                        <field name="user_id"/>
-                                    </group>
-                                </group>
-                            </form>
-                        </field>
-                    </page>
-
+                    
                     </notebook>
                 </sheet>
             </form>

=== modified file 'base_calendar/i18n/nl.po'
--- base_calendar/i18n/nl.po	2013-01-14 05:18:17 +0000
+++ base_calendar/i18n/nl.po	2013-01-14 10:58:28 +0000
@@ -8,14 +8,14 @@
 "Project-Id-Version: openobject-addons\n"
 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
 "POT-Creation-Date: 2012-12-21 17:05+0000\n"
-"PO-Revision-Date: 2013-01-13 18:22+0000\n"
-"Last-Translator: Erwin van der Ploeg (Endian Solutions) <Unknown>\n"
+"PO-Revision-Date: 2012-12-21 23:00+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: Dutch <n...@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-01-14 05:17+0000\n"
-"X-Generator: Launchpad (build 16420)\n"
+"X-Launchpad-Export-Date: 2012-12-22 07:07+0000\n"
+"X-Generator: Launchpad (build 16378)\n"
 
 #. module: base_calendar
 #: selection:calendar.alarm,trigger_related:0
@@ -574,7 +574,7 @@
 #. module: base_calendar
 #: model:ir.model,name:base_calendar.model_mail_wizard_invite
 msgid "Invite wizard"
-msgstr "Uitnodigen wizard"
+msgstr ""
 
 #. module: base_calendar
 #: selection:calendar.event,month_list:0
@@ -1163,7 +1163,7 @@
 #. module: base_calendar
 #: selection:calendar.alarm,state:0
 msgid "Done"
-msgstr "Verwerkt"
+msgstr "Klaar"
 
 #. module: base_calendar
 #: help:calendar.event,interval:0
@@ -1452,7 +1452,7 @@
 #. module: base_calendar
 #: model:ir.model,name:base_calendar.model_mail_message
 msgid "Message"
-msgstr "Bericht"
+msgstr ""
 
 #. module: base_calendar
 #: field:calendar.event,base_calendar_alarm_id:0

=== modified file 'base_calendar/test/base_calendar_test.yml'
--- base_calendar/test/base_calendar_test.yml	2012-12-12 17:42:15 +0000
+++ base_calendar/test/base_calendar_test.yml	2013-01-14 10:58:28 +0000
@@ -10,6 +10,7 @@
         duration: 2.5
         location: OpenERP S.A.
         name: Technical Presentation
+        partner_ids: [base.partner_root]
 -
   Now I will set recurrence for this event to occur monday and friday of week
 -
@@ -38,6 +39,7 @@
         description: 'All day technical test '
         location: School
         name: All day test event
+        partner_ids: [base.partner_root]
 -
   In order to check reminder I will first create reminder
 -

=== modified file 'hr_holidays/hr_holidays.py'
--- hr_holidays/hr_holidays.py	2013-01-04 14:50:30 +0000
+++ hr_holidays/hr_holidays.py	2013-01-14 10:58:28 +0000
@@ -345,6 +345,7 @@
                     'duration': record.number_of_days_temp * 8,
                     'description': record.notes,
                     'user_id': record.user_id.id,
+                    'partner_ids' : [(6,0,[self.pool.get('res.users').browse(cr, uid, record.user_id.id, context=context).partner_id.id])],
                     'date': record.date_from,
                     'end_date': record.date_to,
                     'date_deadline': record.date_to,

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to