Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2167 Tampilan

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.

Avatar
Buang
Jawaban Terbai

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


Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
3
Okt 25
1928
0
Jun 17
3616
2
Feb 25
1916
0
Jul 23
3217
2
Jun 23
3280