diff --git a/jikimo_frontend/static/src/js/custom_form_status_indicator.js b/jikimo_frontend/static/src/js/custom_form_status_indicator.js
index ec64e553..0b6a6b50 100644
--- a/jikimo_frontend/static/src/js/custom_form_status_indicator.js
+++ b/jikimo_frontend/static/src/js/custom_form_status_indicator.js
@@ -62,7 +62,7 @@ patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
const dom1 = buttonsDom.children('.o_form_button_save')
const dom2 = buttonsDom.children('.o_form_button_cancel')
dom1.append('保存')
- dom2.append('放弃保存')
+ dom2.append('不保存')
}
} catch (e) {
console.log(e)
diff --git a/sf_manufacturing/controllers/controllers.py b/sf_manufacturing/controllers/controllers.py
index 2a5e4d3e..64a981ad 100644
--- a/sf_manufacturing/controllers/controllers.py
+++ b/sf_manufacturing/controllers/controllers.py
@@ -596,6 +596,9 @@ class Manufacturing_Connect(http.Controller):
if panel_workorder:
panel_workorder.write({'production_line_state': '已下产线'})
workorder.write({'state': 'to be detected'})
+ workorder.check_ids.filtered(
+ lambda ch: ch.quality_state == 'waiting').write(
+ {'quality_state': 'none'})
else:
res = {'Succeed': False, 'ErrorCode': 204,
'Error': 'DeviceId为%s没有对应的已配送工件数据' % ret['DeviceId']}
diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py
index 1bfa5f07..d7c6d53d 100644
--- a/sf_manufacturing/models/mrp_production.py
+++ b/sf_manufacturing/models/mrp_production.py
@@ -1674,13 +1674,13 @@ class MrpProduction(models.Model):
url = '/api/intelligent_programming/reset_state_again'
config_url = configsettings['sf_url'] + url
ret = requests.post(config_url, json=res, data=None, headers=config_header)
- ret = ret.json()
- result = json.loads(ret['result'])
- logging.info('update_programming_state-ret:%s' % result)
- if result['status'] == 1:
- self.write({'is_rework': True})
- else:
- raise UserError(ret['message'])
+ # ret = ret.json()
+ # result = json.loads(ret['result'])
+ # logging.info('update_programming_state-ret:%s' % result)
+ # if result['status'] == 1:
+ # self.write({'is_rework': True})
+ # else:
+ # raise UserError(ret['message'])
except Exception as e:
logging.info('update_programming_state error:%s' % e)
raise UserError("更新编程单状态失败,请联系管理员")
diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py
index 1980ae1a..f8197783 100644
--- a/sf_manufacturing/models/mrp_workorder.py
+++ b/sf_manufacturing/models/mrp_workorder.py
@@ -1543,7 +1543,8 @@ class ResMrpWorkOrder(models.Model):
# 修改工单状态
self.write({'state': 'to be detected'})
# 若关联的【质量检查_需送检】=true,则质量检查单的状态从“等待”更新为“待处理”
- self.check_ids.filtered(lambda ch: ch.is_inspect is True).write({'quality_state': 'none'})
+ self.check_ids.filtered(lambda ch: ch.is_inspect is True and ch.quality_state == 'waiting').write(
+ {'quality_state': 'none'})
class CNCprocessing(models.Model):
diff --git a/sf_manufacturing/views/mrp_production_addional_change.xml b/sf_manufacturing/views/mrp_production_addional_change.xml
index d71ba4a5..aaeff8c8 100644
--- a/sf_manufacturing/views/mrp_production_addional_change.xml
+++ b/sf_manufacturing/views/mrp_production_addional_change.xml
@@ -74,7 +74,9 @@
1
-
+
+
+
diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml
index 505d0c41..971a39ad 100644
--- a/sf_manufacturing/views/mrp_workorder_view.xml
+++ b/sf_manufacturing/views/mrp_workorder_view.xml
@@ -182,7 +182,7 @@
+ attrs="{'invisible': ['|', '|', '|',('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False),'&','&',('state', 'in', ('progress')), ('is_inspect', '=', True), ('routing_type','!=','CNC加工')]}"/>