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

I have added a 'back to draft' option on a customized stock_picking. When back in draft state, if any move is modified and save is called then picking successfully moves to 'ready' state. Issue occurs if a combined move is edited, in this case the save method is not called.

I am looking for a way to override 'Save' so whenever picking is edited in 'draft' state it moves to 'ready' state.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can override "save" by using this 2 function:

# override function create
@api.model
def create(self, vals):
# your code
res = super(StockPicking, self).create(vals)
return res

# override function write (write = update)
def write(self, vals):
# your code
res = super(StockPicking, self).write(vals)
return res


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
พ.ย. 24
1299
0
มิ.ย. 17
3225
2
ก.พ. 25
1432
0
ก.ค. 23
2696
2
มิ.ย. 23
2735