Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
4515 Visninger

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

Avatar
Kassér
Bedste svar

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
Kassér
Forfatter

thanks a lot

Related Posts Besvarelser Visninger Aktivitet
1
mar. 22
4875
0
jul. 24
1865
1
mar. 24
2150
4
feb. 24
5179
1
jul. 23
2800