I want to do some stuff before validating a delivery order in the inventory module. How can I override the validate method?
Cette question a été signalée
1
Répondre
6191
Vues
Hi,
You can over ride the validate button in the inventory transfers(stock.picking) like this, Inherit the corresponding model, then call super like this,
class Picking(models.Model):
_inherit = "stock.picking"
def button_validate(self):
# do your necessary actions here
res = super(Picking, self).button_validate()
return res
Thanks
thanks a lot
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
|
|
1
mars 22
|
6672 | ||
|
|
0
juil. 24
|
4653 | ||
|
|
1
mars 24
|
4699 | ||
|
Out of Stock
Résolu
|
|
4
févr. 24
|
8129 | |
|
|
1
juil. 23
|
5016 |