还原注释代码
This commit is contained in:
@@ -554,19 +554,19 @@ class StockPicking(models.Model):
|
||||
raise UserError(
|
||||
_('该入库单对应的单号为%s的出库单还未完成,不能进行验证操作!' % move_out.picking_id.name))
|
||||
res = super().button_validate()
|
||||
# if res is True:
|
||||
# if self.id == move_out.picking_id.id:
|
||||
# # if move_out.move_line_ids.workorder_id.state == 'progress':
|
||||
# move_in = self.env['stock.move'].search(
|
||||
# [('location_dest_id', '=', self.env['stock.location'].search(
|
||||
# [('barcode', 'ilike', 'WH-PREPRODUCTION')]).id),
|
||||
# ('location_id', '=', self.env['stock.location'].search(
|
||||
# [('barcode', 'ilike', 'VL-SPOC')]).id),
|
||||
# ('origin', '=', self.origin)])
|
||||
# production = self.env['mrp.production'].search([('name', '=', self.origin)])
|
||||
# if move_in:
|
||||
# move_in.write({'state': 'assigned'})
|
||||
# self.env['stock.move.line'].create(move_in.get_move_line(production, None))
|
||||
if res is True:
|
||||
if self.id == move_out.picking_id.id:
|
||||
# if move_out.move_line_ids.workorder_id.state == 'progress':
|
||||
move_in = self.env['stock.move'].search(
|
||||
[('location_dest_id', '=', self.env['stock.location'].search(
|
||||
[('barcode', 'ilike', 'WH-PREPRODUCTION')]).id),
|
||||
('location_id', '=', self.env['stock.location'].search(
|
||||
[('barcode', 'ilike', 'VL-SPOC')]).id),
|
||||
('origin', '=', self.origin)])
|
||||
production = self.env['mrp.production'].search([('name', '=', self.origin)])
|
||||
if move_in:
|
||||
move_in.write({'state': 'assigned'})
|
||||
self.env['stock.move.line'].create(move_in.get_move_line(production, None))
|
||||
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user