回滚代码

This commit is contained in:
jinling.yang
2024-11-26 16:08:30 +08:00
parent 3bd4e6723e
commit 43ee2d1836
4 changed files with 24 additions and 16 deletions

View File

@@ -21,7 +21,6 @@ class ProductionTechnologyReAdjustWizard(models.TransientModel):
technology_designs = self.env['sf.technology.design'].sudo().search(
[('production_id', '=', self.production_id.id), ('active', 'in', [True, False])])
productions = self.env['mrp.production'].search(domain)
for production_item in productions:
# 该制造订单的其他同一销售订单的制造订单的工艺设计处理
if production_item != self.production_id:
@@ -80,12 +79,8 @@ class ProductionTechnologyReAdjustWizard(models.TransientModel):
if line.product_id.server_product_process_parameters_id == workorder.surface_technics_parameters_id:
purchase_order.write({'state': 'cancel'})
else:
if special.route_id.routing_type == '表面工艺':
display_name = special.process_parameters_id.display_name
else:
display_name = special.route_id.display_name
workorder = self.env['mrp.workorder'].search(
[('name', '=', display_name), ('production_id', '=', special.production_id.id)])
[('technology_design_id', '=', special.id), ('production_id', '=', special.production_id.id)])
if not workorder:
if special.route_id.routing_type == '表面工艺':
product_production_process = self.env['product.template'].search(

View File

@@ -46,8 +46,8 @@ class ProductionTechnologyWizard(models.TransientModel):
if ro.route_id.routing_type == '表面工艺':
domain += [('process_parameters_id', '=', ro.process_parameters_id.id)]
elif ro.route_id.routing_tag == 'special' and ro.is_auto is False:
display_name = ro.route_id.display_name
domain += [('name', 'ilike', display_name)]
# display_name = ro.route_id.display_name
domain += [('id', '=', ro.route_id.id)]
elif ro.panel is not False:
domain += [('panel', '=', ro.panel)]
td_upd = self.env['sf.technology.design'].sudo().search(domain)