Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4513 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

thanks a lot

Powiązane posty Odpowiedzi Widoki Czynność
1
mar 22
4873
0
lip 24
1861
1
mar 24
2142
Out of Stock Rozwiązane
4
lut 24
5174
1
lip 23
2796