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

Example: In product.product there is field qty_available which is compute field and no store, so in the change of that field i want to put some logic if quantity will less than zero.


Thanks

Avatar
Vazgeç
En İyi Yanıt

You can override compute method and add your custom code to track changes of that field and make your custom code work.Try below code.

def _compute_quantities(self):
    super()._compute_quantities()
    # Add Your custom code here 

Avatar
Vazgeç
Üretici

Thanks, I thought too this same but this method is using by many fields so i thought it will risky but let's try if no any other alternative solution is there.

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Eyl 22
2866
3
Eyl 25
3273
0
Ağu 25
807
1
Ağu 25
3030
2
Tem 25
8668