在调拨单确认生成欠单时,修改对应采购申请明细行的目标移动
This commit is contained in:
@@ -33,3 +33,13 @@ class StockPicking(models.Model):
|
|||||||
'view_mode': 'tree,form',
|
'view_mode': 'tree,form',
|
||||||
})
|
})
|
||||||
return action
|
return action
|
||||||
|
|
||||||
|
def _action_done(self):
|
||||||
|
res = super(StockPicking, self)._action_done()
|
||||||
|
# 将采购申请明细行的move_dest_ids设置为backorder_ids
|
||||||
|
backorder_ids = self.backorder_ids
|
||||||
|
if backorder_ids:
|
||||||
|
purchase_request_lines = self.move_ids.move_orig_ids.purchase_line_id.purchase_request_lines
|
||||||
|
if purchase_request_lines:
|
||||||
|
purchase_request_lines.move_dest_ids = [(4, x.id) for x in backorder_ids.move_ids]
|
||||||
|
return res
|
||||||
Reference in New Issue
Block a user