Skip to Content
Menu
This question has been flagged

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

Avatar
Discard
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
Discard
Author

thanks a lot

Related Posts Replies Views Activity
1
Mar 22
4093
0
Jul 24
242
1
Mar 24
364
4
Feb 24
2433
1
Jul 23
908