2 In Order to test base_calendar, I will first create One Simple Event with real data
4 !record {model: calendar.event, id: calendar_event_technicalpresentation0}:
6 date: '2010-04-30 16:00:00'
7 date_deadline: '2010-04-30 18:30:00'
8 description: The Technical Presentation will cover following topics:\n* Creating OpenERP
9 class\n* Views\n* Wizards\n* Workflows
11 location: OpenERP S.A.
12 name: Technical Presentation
15 Now I will set recurrence for this event to occure monday and friday of week
17 !python {model: calendar.event}: |
18 self.write(cr, uid, [ref("calendar_event_technicalpresentation0")], {'fr': 1, 'mo': 1, 'interval': 1, 'freq': 'weekly', 'rrule_type': 'custom'})
20 In order to check that recurrent events are views successfully in calenadar view,
21 I will open calendar view of events
23 !python {model: calendar.event}: |
24 self.fields_view_get(cr, uid, False, 'calendar', context)
26 In order to check that recurrent events are views successfully in calenadar view,
27 I will search for one of the recurrent event and count the number of events
29 !python {model: calendar.event}: |
30 ids = self.search(cr, uid, [('date', '>=', '2010-05-01 00:00:00'), ('date', '<=', '2010-05-31 00:00:00')] )
33 Now I will make All day event and test it
35 !record {model: calendar.event, id: calendar_event_alldaytestevent0}:
38 date: '2010-04-30 00:00:00'
39 date_deadline: '2010-04-30 00:00:00'
40 description: 'All day technical test '
42 name: All day test event
45 In order to check reminder I will first create reminder
47 !record {model: res.alarm, id: res_alarm_daybeforeeventstarts0}:
48 name: 1 Day before event starts
50 trigger_interval: days
51 trigger_occurs: before
52 trigger_related: start
54 Now I will assign this reminder to all day event
56 !python {model: calendar.event}: |
57 self.write(cr, uid, [ref("calendar_event_alldaytestevent0")], {'alarm_id': ref("res_alarm_daybeforeeventstarts0")})
59 In order to assign attendee I will invite Demo user
61 !record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}:
63 partner_id: base.res_partner_9 # Put bcz of problem in read
67 Then I click on Invite Button
69 !python {model: base_calendar.invite.attendee}: |
70 self.do_invite(cr, uid, [ref("base_calendar_invite_attendee_0")], {'active_id': ref("calendar_event_alldaytestevent0"), 'model' : 'calendar.event', 'attendee_field':'attendee_ids'})
72 Now I will Accept this invitation
74 !python {model: calendar.attendee}: |
75 ids = self.search(cr, uid, [('ref', '=', 'calendar.event' + ',' + str(ref("calendar_event_alldaytestevent0")))])
77 self.do_accept(cr, uid, ids, context=context)