[FIX] crm, base_calendar: Fixed yaml warnings.
bzr revid: uco@tinyerp.com-20110413092626-ylqsbtg6l11sbfpj
This commit is contained in:
parent
cf5132a148
commit
ebd9fa95dc
|
@ -15,7 +15,8 @@
|
|||
Now I will set recurrence for this event to occur monday and friday of week
|
||||
-
|
||||
!python {model: calendar.event}: |
|
||||
self.write(cr, uid, [ref("calendar_event_technicalpresentation0")], {'fr': 1, 'mo': 1, 'interval': 1, 'rrule_type': 'weekly'})
|
||||
data = {'fr': 1, 'mo': 1, 'interval': 1, 'rrule_type': 'weekly', 'end_type': 'end_date', 'end_date': '2011-05-31 00:00:00'}
|
||||
self.write(cr, uid, [ref("calendar_event_technicalpresentation0")], data)
|
||||
- |
|
||||
In order to check that recurrent events are views successfully in calendar view,
|
||||
I will open calendar view of events
|
||||
|
@ -27,7 +28,7 @@
|
|||
I will search for one of the recurrent event and count the number of events
|
||||
-
|
||||
!python {model: calendar.event}: |
|
||||
ids = self.search(cr, uid, [('date', '>=', '2011-04-30 16:00:00'), ('date', '<=', '2011-05-31 00:00:00')] )
|
||||
ids = self.search(cr, uid, [('date', '>=', '2011-04-30 16:00:00'), ('date', '<=', '2011-05-31 00:00:00')], context={'virtual_id': True} )
|
||||
assert len(ids) == 9
|
||||
- |
|
||||
Now I will make All day event and test it
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
!python {model: crm.meeting}: |
|
||||
import time
|
||||
from datetime import datetime, date, timedelta
|
||||
ids = self.search(cr, uid, [('date', '>=', time.strftime('%Y-%m-%d 00:00:00')), ('date', '<=', (datetime.now()+timedelta(31)).strftime('%Y-%m-%d 00:00:00')), ('name', '=', 'Regarding Presentation')] )
|
||||
ids = self.search(cr, uid, [('date', '>=', time.strftime('%Y-%m-%d 00:00:00')), ('date', '<=', (datetime.now()+timedelta(31)).strftime('%Y-%m-%d 00:00:00')), ('name', '=', 'Regarding Presentation')], context={'virtual_id': True})
|
||||
assert len(ids) == 10
|
||||
|
||||
- |
|
||||
|
|
|
@ -94,5 +94,5 @@
|
|||
!python {model: crm.meeting}: |
|
||||
meeting_ids = self.search(cr, uid, [('recurrent_uid', '=', ref('crm_meeting_reviewcodewithprogrammer0')), ('recurrent_id','=','2011-04-25 12:47:00')], context)
|
||||
assert meeting_ids, 'Meeting is not edited !'
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue