Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4526 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

thanks a lot

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 22
4876
0
thg 7 24
1873
1
thg 3 24
2152
Out of Stock Đã xử lý
4
thg 2 24
5186
1
thg 7 23
2807