Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4525 มุมมอง

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