Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4510 Vues

I want to do some stuff before validating a delivery order in the inventory module. How can I override the validate method?

Avatar
Ignorer
Meilleure réponse

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

Avatar
Ignorer
Auteur

thanks a lot

Publications associées Réponses Vues Activité
1
mars 22
4873
0
juil. 24
1860
1
mars 24
2141
4
févr. 24
5171
1
juil. 23
2795