Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2801 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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 

Imagine profil
Abandonează
Autor

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.

Related Posts Răspunsuri Vizualizări Activitate
1
sept. 22
2854
3
sept. 25
3260
0
aug. 25
799
1
aug. 25
3025
2
iul. 25
8656