跳至内容
菜单
此问题已终结
1 回复
1792 查看

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


形象
丢弃
相关帖文 回复 查看 活动
2
11月 24
1299
0
6月 17
3225
2
2月 25
1432
0
7月 23
2695
2
6月 23
2734