Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4520 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

thanks a lot

Related Posts Răspunsuri Vizualizări Activitate
1
mar. 22
4875
0
iul. 24
1870
1
mar. 24
2152
4
feb. 24
5182
1
iul. 23
2806