Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2848 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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.

Post correlati Risposte Visualizzazioni Attività
1
set 22
2908
3
set 25
3342
0
ago 25
862
1
ago 25
3112
2
lug 25
8747