Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
4512 Prikazi

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

Avatar
Opusti
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
Opusti
Avtor

thanks a lot

Related Posts Odgovori Prikazi Aktivnost
1
mar. 22
4873
0
jul. 24
1861
1
mar. 24
2142
4
feb. 24
5172
1
jul. 23
2795