Skip to Content
Menu
This question has been flagged

I have an app that sends requests to Odoo and gets events from Calendar module. Everything is working except cyclic events.

I mean I have a python code like this:

data = models.execute_kw(db, uid, password,
    'calendar.event', 'search_read',
    [[['start', '>', '2019-09-10']]],        
    {'fields': ['name', 'allday', 'start', 'stop', 'partner_ids'], 'limit': 10})
# Response
# data = [{'name': 'Event', 'start': '2019-09-11', ...} ... ]

And it shows only non-cyclic events. All the cyclic ones even if they meet the restriction do not show.

If I send request like this:

data = models.execute_kw(db, uid, password,
    'calendar.event', 'search_read',
    [[['name', '=', 'Cyclic event']]],        
    {'fields': ['name', 'allday', 'start', 'stop', 'partner_ids'], 'limit': 10})
# Response
# data = [{'name': 'Cyclic event', 'start': '2019-09-11', ...} ... ]


I get my cyclic events (named "Cyclic event" for the sake of example) but as soon as I add date restriction they again disappear:  

data = models.execute_kw(db, uid, password,
    'calendar.event', 'search_read',
    [[['name', '=', 'Cyclic event'],['start', '>', '2019-09-10']]],        
    {'fields': ['name', 'allday', 'start', 'stop', 'partner_ids'], 'limit': 10})
# Response
# data = []  # EMPTY!

It honestly looks like a bug but I'm not sure. I realised that for cyclic events id isn't an integer but strange string so maybe this is a problem?

'id': '10842-20190730060000'

The problem exist in Odoo version 8 but it seems like is fixed in 12.

Please help :c ​


Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
gruod. 19
3594
1
lapkr. 20
4795
3
liep. 25
696
1
rugp. 23
13136
2
gruod. 23
12691