diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py
index 84f36747..948a81a2 100644
--- a/sf_manufacturing/models/mrp_production.py
+++ b/sf_manufacturing/models/mrp_production.py
@@ -1537,7 +1537,7 @@ class MrpProduction(models.Model):
product_id = self.env['product.product'].browse(vals['product_id'])
is_self_process = product_id.materials_type_id and product_id.materials_type_id.gain_way and product_id.materials_type_id.gain_way != '自加工'
is_customer_provided = product_id.is_customer_provided
- if not is_custemer_group_id.get(is_customer_provided):
+ if not is_custemer_group_id.get(is_customer_provided) and is_self_process:
is_custemer_group_id[is_customer_provided] = self.env["procurement.group"].create({'name': vals.get('name')}).id
# if not (is_first_customer or is_first_not_customer) and is_self_process:
# is_first = True
diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py
index 0f29d2fd..09f08c0b 100644
--- a/sf_manufacturing/models/mrp_workorder.py
+++ b/sf_manufacturing/models/mrp_workorder.py
@@ -1288,7 +1288,7 @@ class ResMrpWorkOrder(models.Model):
'test_results': record.test_results,
'test_report': record.detection_report})],
'is_scrap': True if record.test_results == '报废' else False,
- 'state': 'rework' if (record.routing_type != 'CNC加工' and record.test_results == '返工') else record.state
+ 'state': 'rework' if (record.routing_type != 'CNC加工' and record.test_results == '返工') else record.production_id.state
})
if record.routing_type == '解除装夹':
'''
diff --git a/sf_manufacturing/views/mrp_production_addional_change.xml b/sf_manufacturing/views/mrp_production_addional_change.xml
index 19d2051f..2091f956 100644
--- a/sf_manufacturing/views/mrp_production_addional_change.xml
+++ b/sf_manufacturing/views/mrp_production_addional_change.xml
@@ -85,6 +85,9 @@
mrp.production
+
+ {'invisible': True}
+