İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4241 Görünümler

Hi

I need to calculate the count of products by a given attribute  instead of gouping them by this same attibute.

What would be the code to add to a new filter?

Thanks in advance

Avatar
Vazgeç
En İyi Yanıt

Try to use search_count() like this:

self.env['your.model'].search_count([('attribute', '=', 'value_of_attribute')])
Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Mar 25
6868
Todays Filter Çözüldü
2
Şub 24
9961
3
May 23
4666
1
Tem 24
849
1
Haz 24
1408