Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2795 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Auteur

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.

Gerelateerde posts Antwoorden Weergaven Activiteit
1
sep. 22
2851
3
sep. 25
3257
0
aug. 25
799
1
aug. 25
3024
2
jul. 25
8654