I want to do some stuff before validating a delivery order in the inventory module. How can I override the validate method?
คำถามนี้ถูกตั้งค่าสถานะ
1
ตอบกลับ
6208
มุมมอง
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
|
6683 | ||
|
|
0
ก.ค. 24
|
4666 | ||
|
|
1
มี.ค. 24
|
4709 | ||
|
Out of Stock
แก้ไขแล้ว
|
|
4
ก.พ. 24
|
8141 | |
|
|
1
ก.ค. 23
|
5025 |