1、优化调拨单验证方法;2、隐藏请购明细列表视图字段
This commit is contained in:
@@ -88,6 +88,16 @@ class StockPicking(models.Model):
|
||||
self.send_to_bfm()
|
||||
return info
|
||||
|
||||
def _action_done(self):
|
||||
"""处理创建欠单时,新单据验证序列号无法使用问题"""
|
||||
todo_moves = self.move_ids.filtered(
|
||||
lambda self: self.state in ['draft', 'waiting', 'partially_available', 'assigned', 'confirmed'])
|
||||
res = super(StockPicking, self)._action_done()
|
||||
todo_move = todo_moves.filtered(lambda mv: mv.quantity_done == 0)
|
||||
if todo_move:
|
||||
todo_move.move_line_nosuggest_ids.write({'qty_done': 1})
|
||||
return res
|
||||
|
||||
def deal_move_ids(self, send_move_ids, send_move_line_ids):
|
||||
move_ids = [] # 本次发货单
|
||||
move_line_ids = [] # 本次发货单行
|
||||
|
||||
Reference in New Issue
Block a user