İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4432 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
7124
Todays Filter Çözüldü
2
Şub 24
10457
3
May 23
5188
1
Tem 24
979
1
Haz 24
1678