diff --git a/sf_manufacturing/controllers/controllers.py b/sf_manufacturing/controllers/controllers.py index 6f200926..e0e2a22c 100644 --- a/sf_manufacturing/controllers/controllers.py +++ b/sf_manufacturing/controllers/controllers.py @@ -667,7 +667,7 @@ class Manufacturing_Connect(http.Controller): logging.info('AGVDownProduct error:%s' % e) return json.JSONEncoder().encode(res) - @http.route('/AutoDeviceApi/GetAgvStationState', type='json', auth='none', methods=['GET', 'POST'], csrf=False, + @http.route('/AutoDeviceApi/AgvStationState', type='json', auth='none', methods=['GET', 'POST'], csrf=False, cors="*") def AGVStationState(self, **kw): """ diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 98631c41..6f6a4be9 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -966,10 +966,9 @@ class ResMrpWorkOrder(models.Model): workorder.state = 'ready' else: workorder.state = 'waiting' - - # else: - # if workorder.state not in ['cancel', 'rework']: - # workorder.state = 'rework' + elif workorder.production_id.state == 'scrap': + if workorder.routing_type == '解除装夹' and unclamp_workorder.test_results == '报废': + workorder.state = 'waiting' if workorder.routing_type == '装夹预调' and workorder.state in ['waiting', 'ready', 'pending']: workorder_ids = workorder.production_id.workorder_ids work_bo = True diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml index 107cf4b0..eab42424 100644 --- a/sf_manufacturing/views/mrp_workorder_view.xml +++ b/sf_manufacturing/views/mrp_workorder_view.xml @@ -218,7 +218,7 @@ - diff --git a/sf_manufacturing/wizard/production_wizard_views.xml b/sf_manufacturing/wizard/production_wizard_views.xml index 9c4dc190..1efef116 100644 --- a/sf_manufacturing/wizard/production_wizard_views.xml +++ b/sf_manufacturing/wizard/production_wizard_views.xml @@ -12,7 +12,7 @@ 重新生成制造订单 -
+
申请重新编程 diff --git a/sf_manufacturing/wizard/rework_wizard_views.xml b/sf_manufacturing/wizard/rework_wizard_views.xml index 08e5f8ef..8ba3f4dd 100644 --- a/sf_manufacturing/wizard/rework_wizard_views.xml +++ b/sf_manufacturing/wizard/rework_wizard_views.xml @@ -16,10 +16,10 @@ attrs='{"invisible": [("routing_type","=","装夹预调")]}' widget="many2many_tags"/>
- 注意: 该制造订单的产品已重复编程过次,且当前编程状态为 + style='color:red;'/>,且当前编程状态为