From a21b4302d4eee3df77d9dab471e250787a5243c9 Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Wed, 16 Oct 2024 17:01:15 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A4=84=E7=90=86=20=E5=9B=A0?= =?UTF-8?q?=E4=B8=BA=E6=9D=83=E9=99=90=E5=AF=BC=E8=87=B4=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=88=80=E5=85=B7=E5=AE=89=E5=85=A8=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=82=B9=E5=87=BB=E4=BB=BB=E6=84=8F=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8A=A5=E9=94=99=EF=BC=9B=202=E3=80=81=E5=A4=84?= =?UTF-8?q?=E7=90=86=20=E4=B8=8B=E5=8F=91=E7=A8=8B=E5=BA=8F=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E5=88=80=E5=85=B7=E6=9C=89=E6=97=A0=E6=95=88=E5=88=80?= =?UTF-8?q?=E6=97=B6=E5=88=B6=E9=80=A0=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_tool_management/models/base.py | 2 +- sf_tool_management/models/functional_tool.py | 2 +- sf_tool_management/models/mrp_workorder.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sf_tool_management/models/base.py b/sf_tool_management/models/base.py index 2e90f76f..237d5b91 100644 --- a/sf_tool_management/models/base.py +++ b/sf_tool_management/models/base.py @@ -687,7 +687,7 @@ class FunctionalToolAssembly(models.Model): sf_cam_work_order_program_knife_plan_id = fields.Many2one('sf.cam.work.order.program.knife.plan', 'CAM工单程序用刀计划', readonly=True) - active = fields.Boolean(string='已归档', default=True, groups='base.user_root') + active = fields.Boolean(string='已归档', default=True) code = fields.Char('功能刀具编码', compute='_compute_code') diff --git a/sf_tool_management/models/functional_tool.py b/sf_tool_management/models/functional_tool.py index 6cfaee2d..e8523cd3 100644 --- a/sf_tool_management/models/functional_tool.py +++ b/sf_tool_management/models/functional_tool.py @@ -554,7 +554,7 @@ class RealTimeDistributionOfFunctionalTools(models.Model): sf_functional_tool_entity_ids = fields.One2many('sf.functional.cutting.tool.entity', 'safe_inventory_id', string='功能刀具信息') - active = fields.Boolean(string='已归档', default=True, groups='base.user_root') + active = fields.Boolean(string='已归档', default=True) @api.depends('functional_name_id', 'functional_name_id.diameter', 'functional_name_id.angle', 'functional_name_id.functional_cutting_tool_model_id') diff --git a/sf_tool_management/models/mrp_workorder.py b/sf_tool_management/models/mrp_workorder.py index 96198cbb..9326b511 100644 --- a/sf_tool_management/models/mrp_workorder.py +++ b/sf_tool_management/models/mrp_workorder.py @@ -194,8 +194,8 @@ class MrpProduction(models.Model): # 自动调用重新获取编程的方法 logging.info('cnc用刀校验到无效刀自动调用重新编程方法:update_programming_state()') self[0].update_programming_state() - # 修改制造订单 编程状态变为“编程中” - self.write({'programming_state': '编程中', 'work_state': '编程中'}) + # 修改制造订单 编程状态变为“编程中” 制造订单状态为‘返工’ + self.write({'programming_state': '编程中', 'work_state': '编程中', 'state': 'rework'}) if missing_tool_1: # 修改 修改cnc程序的‘刀具状态’ 为 ‘缺刀’ cnc_ids = self.env['sf.cnc.processing'].sudo().search(