Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2820 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
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 Odpovědi Zobrazení Aktivita
1
zář 22
2866
3
zář 25
3276
0
srp 25
811
1
srp 25
3038
2
čvc 25
8682