Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3603 Представления

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
3608
1
нояб. 20
4801
3
июл. 25
701
1
авг. 23
13137
2
дек. 23
12695