İçereği Atla
Menü
Bu soru işaretlendi

We are a language school and extensively use the Events application.  We just upgraded to Odoo 17 and lost the count of unconfirmed registrations at the Event level.  This is a major step back for us.  We now do not have this insight across all our events. 


To solve this I am trying to create a computed field in the Event model which calculates the total number of unconfirmed registrations per event.  

I have tried various approaches including the one below but only get zero values in the field. 


Model: event

Field Type: integer

Dependencies:registration_ids 


Code:

for record in self:

    record['x_event_unconfirmed_reg_count'] = len(record.registration_ids.filtered(lambda r: r.state == 'Unconfirmed'))


What is wrong? 


Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Nis 25
816
1
Ağu 23
1146
0
Şub 25
815