修复外协位置
This commit is contained in:
@@ -796,8 +796,8 @@ class ResMrpWorkOrder(models.Model):
|
||||
move_out = self.env['stock.move'].search(
|
||||
[('location_id', '=', self.env['stock.location'].search(
|
||||
[('barcode', 'ilike', 'WH-PREPRODUCTION')]).id),
|
||||
('location_dest_id', '=', self.env.ref(
|
||||
'sf_manufacturing.stock_location_locations_virtual_outcontract').id),
|
||||
('location_dest_id', '=', self.env['stock.location'].search(
|
||||
[('barcode', 'ilike', 'VL-SPOC')]).id),
|
||||
('origin', '=', self.production_id.name)])
|
||||
purchase = self.env['purchase.order'].search([('origin', '=', self.production_id.name)])
|
||||
if purchase and move_out:
|
||||
@@ -910,7 +910,9 @@ class ResMrpWorkOrder(models.Model):
|
||||
'order_line': order_line_ids,
|
||||
})
|
||||
tem_date_planned_finished = record.date_planned_finished
|
||||
logging.info('routing_type:%s' % record.routing_type)
|
||||
super().button_finish()
|
||||
logging.info('date_planned_finished:%s' % record.date_planned_finished)
|
||||
# 表面工艺工单完成不走该修改
|
||||
if record.routing_type != '表面工艺':
|
||||
record.write({
|
||||
|
||||
Reference in New Issue
Block a user