تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2774 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

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 

الصورة الرمزية
إهمال
الكاتب

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.

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 22
2815
3
سبتمبر 25
3254
0
أغسطس 25
798
1
أغسطس 25
3012
2
يوليو 25
8630