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

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

Avatar
Abbandona
Risposta migliore

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

thanks a lot

Post correlati Risposte Visualizzazioni Attività
1
mar 22
4904
0
lug 24
1969
1
mar 24
2228
4
feb 24
5265
1
lug 23
2861