跳至內容
選單
此問題已被標幟
1 回覆
4534 瀏覽次數

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

相關帖文 回覆 瀏覽次數 活動
1
3月 22
4881
0
7月 24
1884
1
3月 24
2174
Out of Stock 已解決
4
2月 24
5194
1
7月 23
2830