İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4227 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
6861
Todays Filter Çözüldü
2
Şub 24
9951
3
May 23
4651
1
Tem 24
842
1
Haz 24
1405