Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4521 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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šit
Autor

thanks a lot

Related Posts Odpovědi Zobrazení Aktivita
1
bře 22
4876
0
čvc 24
1873
1
bře 24
2152
Out of Stock Vyřešeno
4
úno 24
5183
1
čvc 23
2807