Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3596 Переглядів

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 ​


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
груд. 19
3598
1
лист. 20
4798
3
лип. 25
698
1
серп. 23
13137
2
груд. 23
12693