Skip to Content
Menu
This question has been flagged
1 Odpoveď
4675 Zobrazenia

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

Avatar
Zrušiť
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
Zrušiť
Autor

thanks a lot

Related Posts Replies Zobrazenia Aktivita
1
mar 22
4997
0
júl 24
2113
1
mar 24
2331
4
feb 24
5466
1
júl 23
2977