+
申请重新编程
+ attrs='{"readonly": ["|",("is_reprogramming_readonly","=",False),("tool_state", "=", "2")]}'/>
From b731ffba331fc57959578190d78fca7096f1cd66 Mon Sep 17 00:00:00 2001
From: yuxianghui <3437689193@qq.com>
Date: Fri, 26 Jul 2024 14:51:23 +0800
Subject: [PATCH 3/4] =?UTF-8?q?1=E3=80=81=E4=BC=98=E5=8C=96=E5=B7=A5?=
=?UTF-8?q?=E5=8D=95=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_manufacturing/models/mrp_production.py | 5 +++++
sf_tool_management/models/mrp_workorder.py | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py
index 27baa7be..0bbda373 100644
--- a/sf_manufacturing/models/mrp_production.py
+++ b/sf_manufacturing/models/mrp_production.py
@@ -50,6 +50,7 @@ class MrpProduction(models.Model):
def _compute_tool_state(self):
for item in self:
if item.workorder_ids:
+ tool_state = item.tool_state
workorder_ids = item.workorder_ids.filtered(lambda a: a.state not in ('rework', '返工'))
if workorder_ids.filtered(lambda a: a.tool_state == '2'):
item.tool_state = '2'
@@ -57,6 +58,10 @@ class MrpProduction(models.Model):
item.tool_state = '1'
else:
item.tool_state = '0'
+ if tool_state == '2' and item.tool_state != '2':
+ item.detection_result_ids.filtered(
+ lambda a: a.detailed_reason == '无效功能刀具' and a.handle_result == '待处理').write(
+ {'handle_result': '已处理'})
# state = fields.Selection(selection_add=[
# ('pending_scheduling', '待排程'),
diff --git a/sf_tool_management/models/mrp_workorder.py b/sf_tool_management/models/mrp_workorder.py
index 352162b7..f3fc3484 100644
--- a/sf_tool_management/models/mrp_workorder.py
+++ b/sf_tool_management/models/mrp_workorder.py
@@ -105,6 +105,12 @@ class CNCprocessing(models.Model):
'test_results': '返工',
'handle_result': '待处理'
})
+ if not production_id.is_rework:
+ production_id.write({
+ 'is_rework': True
+ })
+ production_id.workorder_ids.filtered(
+ lambda a: a.processing_panel == key and not a.is_rework).write({'is_rework': True})
# 对缺刀信息进行处理
for key in data2:
if data2.get(key):
From 3e61e31314b303953b277599ed89a8ead0ddfd5c Mon Sep 17 00:00:00 2001
From: hy <1298386937@qq.com>
Date: Fri, 26 Jul 2024 15:44:52 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=80=E5=85=B7?=
=?UTF-8?q?=E6=8B=86=E8=A7=A3=E6=97=B6=E9=80=89=E6=8B=A9=E7=9B=AE=E6=A0=87?=
=?UTF-8?q?=E8=B4=A7=E4=BD=8D=E4=BC=9A=E5=87=BA=E7=8E=B0=E9=87=8D=E5=8F=A0?=
=?UTF-8?q?=E7=9A=84=E7=8E=B0=E8=B1=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jikimo_frontend/static/src/scss/custom_style.scss | 6 ------
1 file changed, 6 deletions(-)
diff --git a/jikimo_frontend/static/src/scss/custom_style.scss b/jikimo_frontend/static/src/scss/custom_style.scss
index cbd1bb4d..d7e6414c 100644
--- a/jikimo_frontend/static/src/scss/custom_style.scss
+++ b/jikimo_frontend/static/src/scss/custom_style.scss
@@ -532,9 +532,3 @@ div:has(.o_required_modifier) > label::before {
position: unset;
}
-// 修改表格下拉框会被表格下面数据框覆盖的bug
-.tab-pane .o_field_widget {
- position: relative;
- z-index: 1;
-}
-