Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3910 Vizualizări

I have an app which lets participants create events in the calendar and there will be many recurrent events among non-recurrent events. To achieve this I have created a separate class that inherits from the attendees class of the odoo calendar module, which basically maps events to res.partners. I've had to add some extra fields, specifically, there's a field called 'is_excused', which if set to True, means that this attendee is not expected for this meeting.

Our app lets the participants mark their planned absence for a certain duration. So when they do this, we have some code in the custom create/write methods in the attendees class that looks for meetings that fall within this duration and mark those meetings' 'is_excused' field as true. 

This works fine for normal meetings, but for recurrent meetings Odoo just dynamically creates these meetings/attendees so there are no individual records for each instance. So how do I mark the is_excused to be true for that particular attendee record?

Imagine profil
Abandonează
Cel mai bun răspuns

Hi, 

You will need to check for records who have virtual_id= True in context

In fact, If virtual_id=False, it means that it will only get non Virtual events.

Hope this helps. If not, please write back for further analysis.

Regards.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
iun. 16
4935
0
mar. 15
3709
0
mai 24
1490
0
mai 15
4373
1
iul. 25
436