还原注释代码
This commit is contained in:
@@ -933,7 +933,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
purchase_orders = self.env['purchase.order'].search(
|
||||
[('origin', '=', ','.join(production_list))])
|
||||
for line in purchase_orders.order_line:
|
||||
if line.product_id.server_product_process_parameters_id == order.surface_technics_parameters_id and line.product_qty == len(
|
||||
if line.product_id.server_product_process_parameters_id == workorder.surface_technics_parameters_id and line.product_qty == len(
|
||||
production_programming):
|
||||
if purchase_orders.state == 'purchase':
|
||||
workorder.state = 'ready'
|
||||
|
||||
@@ -9,8 +9,8 @@ from odoo.exceptions import ValidationError, UserError
|
||||
from odoo.modules import get_resource_path
|
||||
|
||||
|
||||
# from OCC.Extend.DataExchange import read_step_file
|
||||
# from OCC.Extend.DataExchange import write_stl_file
|
||||
from OCC.Extend.DataExchange import read_step_file
|
||||
from OCC.Extend.DataExchange import write_stl_file
|
||||
|
||||
|
||||
class ResProductMo(models.Model):
|
||||
|
||||
@@ -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