diff --git a/sf_manufacturing/data/stock_data.xml b/sf_manufacturing/data/stock_data.xml
index 3558e892..07d59708 100644
--- a/sf_manufacturing/data/stock_data.xml
+++ b/sf_manufacturing/data/stock_data.xml
@@ -74,25 +74,25 @@
True
11
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py
index 40c35833..02b64bc6 100644
--- a/sf_manufacturing/models/mrp_workorder.py
+++ b/sf_manufacturing/models/mrp_workorder.py
@@ -911,9 +911,11 @@ class ResMrpWorkOrder(models.Model):
})
tem_date_planned_finished = record.date_planned_finished
super().button_finish()
- record.write({
- 'date_planned_finished': tem_date_planned_finished # 保持原值
- })
+ # 表面工艺工单完成不走该修改
+ if record.routing_type != '表面工艺':
+ record.write({
+ 'date_planned_finished': tem_date_planned_finished # 保持原值
+ })
is_production_id = True
for workorder in record.production_id.workorder_ids:
if workorder.state != 'done':
diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py
index 39c0f4bf..f6198f02 100644
--- a/sf_manufacturing/models/stock.py
+++ b/sf_manufacturing/models/stock.py
@@ -552,8 +552,8 @@ class StockPicking(models.Model):
[('workorder_id', '=', sorted_workorders.id), ('production_id', '=', item.id)])
if not outcontract_stock_move:
new_picking = True
- location_id = self.env.ref(
- 'sf_manufacturing.stock_location_locations_virtual_outcontract').id,
+ location_id = self.env['stock.location'].search(
+ [('barcode', 'ilike', 'VL-SPOC')]).id,
location_dest_id = self.env['stock.location'].search(
[('barcode', 'ilike', 'WH-PREPRODUCTION')]).id,
outcontract_picking_type_in = self.env.ref(
diff --git a/sf_warehouse/security/ir.model.access.csv b/sf_warehouse/security/ir.model.access.csv
index 4940d040..394eeddf 100644
--- a/sf_warehouse/security/ir.model.access.csv
+++ b/sf_warehouse/security/ir.model.access.csv
@@ -112,7 +112,7 @@ access_stock_inventory_warning,stock.inventory.warning,stock.model_stock_invento
access_stock_inventory_adjustment_name,stock.inventory.adjustment.name,stock.model_stock_inventory_adjustment_name,sf_base.group_plan_dispatch,1,0,0,0
access_mrp_production_group_purchase,mrp_production_group_purchase,mrp.model_mrp_production,sf_base.group_purchase,1,0,0,0
-access_mrp_production_group_purchase_director,mrp_production_group_purchase_director,mrp.model_mrp_production,sf_base.group_purchase_director,1,0,0,0
+access_mrp_production_group_purchase_director,mrp_production_group_purchase_director,mrp.model_mrp_production,sf_base.group_purchase_director,1,0,1,0
access_mrp_workorder_group_purchase,mrp_workorder_group_purchase,mrp.model_mrp_workorder,sf_base.group_purchase,1,0,0,0
access_mrp_workorder_group_purchase_director,mrp_workorder_group_purchase_director,mrp.model_mrp_workorder,sf_base.group_purchase_director,1,0,0,0
access_mrp_unbuild_group_purchase,mrp_unbuild_group_purchase,mrp.model_mrp_unbuild,sf_base.group_purchase,1,0,0,0