Skip to Content
Menu
This question has been flagged
1 Atsakyti
4523 Rodiniai

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

Portretas
Atmesti
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

Portretas
Atmesti
Autorius

thanks a lot

Related Posts Replies Rodiniai Veikla
1
kov. 22
4876
0
liep. 24
1873
1
kov. 24
2152
4
vas. 24
5185
1
liep. 23
2807