Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4511 Переглядів

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

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Автор

thanks a lot

Related Posts Відповіді Переглядів Дія
1
бер. 22
4873
0
лип. 24
1860
1
бер. 24
2141
Out of Stock Вирішено
4
лют. 24
5171
1
лип. 23
2795