Skip to Content
Menú
This question has been flagged
1 Respondre
4673 Vistes

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

Avatar
Descartar
Best Answer

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
Descartar
Autor

thanks a lot

Related Posts Respostes Vistes Activitat
1
de març 22
4996
0
de jul. 24
2112
1
de març 24
2330
4
de febr. 24
5460
1
de jul. 23
2977