Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4524 Представления

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
4876
0
июл. 24
1873
1
мар. 24
2152
Out of Stock Решено
4
февр. 24
5186
1
июл. 23
2807