From 675fb54d375d9a81acabdbbed298c7297bd2d924 Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Fri, 27 Dec 2024 17:28:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=B9=E5=85=B7=E7=89=A9=E6=96=99=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_tool_management/models/maintenance_equipment.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sf_tool_management/models/maintenance_equipment.py b/sf_tool_management/models/maintenance_equipment.py index 5da56016..af9d4931 100644 --- a/sf_tool_management/models/maintenance_equipment.py +++ b/sf_tool_management/models/maintenance_equipment.py @@ -126,16 +126,16 @@ class StockLot(models.Model): tool_material_search_id = fields.Many2one('sf.tool.material.search', string='刀具物料搜索') fixture_material_search_id = fields.Many2one('sf.fixture.material.search', string='夹具物料搜索') tool_material_status = fields.Selection( - [('未入库', '未入库'), ('可用', '可用'), ('在用', '空闲'), ('报废', '报废')], string='状态', + [('未入库', '未入库'), ('可用', '空闲'), ('在用', '占用'), ('报废', '报废')], string='状态', compute='_compute_tool_material_status', store=True) @api.depends('quant_ids') def _compute_tool_material_status(self): for record in self: if record: - if record.product_id.categ_id.name in ['刀具', '夹具']: + if record.product_id.categ_id.name in ['刀具']: if record.quant_ids: - if record.quant_ids[-1].location_id.name in ['刀具房', '夹具房']: + if record.quant_ids[-1].location_id.name in ['刀具房']: record.tool_material_status = '可用' elif record.quant_ids[-1].location_id.name == '刀具组装位置': record.tool_material_status = '在用'