From 49e4f92a915f508d0bf939546195806e6a2d3bdb Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Mon, 22 Apr 2024 20:03:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E5=A4=B9=E9=A2=84=E8=B0=83=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E8=A6=81=E5=B8=A6=E5=9B=BE=E7=BA=B8=E5=92=8C?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E6=96=87=E4=BB=B6=E5=8F=8A=E5=9D=AF=E6=96=99?= =?UTF-8?q?=E9=95=BF=E5=AE=BD=E9=AB=98=E5=8F=82=E6=95=B0=E7=9A=84=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 14 ++++++++++++++ sf_manufacturing/models/mrp_workorder.py | 13 +++++++++++++ .../views/mrp_production_addional_change.xml | 12 +++++++++++- sf_manufacturing/views/mrp_workorder_view.xml | 13 +++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index dff2763b..f5863616 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -56,6 +56,20 @@ class MrpProduction(models.Model): plan_start_processing_time = fields.Datetime('计划开始加工时间') production_line_state = fields.Selection([('待上产线', '待上产线'), ('已上产线', '已上产线'), ('已下产线', '已下产线')], string='上/下产线', default='待上产线') + # 加工状态 + process_state = fields.Selection([ + ('待排程', '待排程'), + ('待装夹', '待装夹'), + ('待CNC加工', '待CNC加工'), + ('待解除装夹', '待解除装夹'), + ('已完成', '已完成') + ], string='加工状态', default='待排程') + + # 零件图号 + part_number = fields.Char('零件图号') + + # 上传零件图纸 + part_drawing = fields.Binary('零件图纸') @api.depends( 'move_raw_ids.state', 'move_raw_ids.quantity_done', 'move_finished_ids.state', diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 3ccef829..ec4482e0 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -121,6 +121,19 @@ class ResMrpWorkOrder(models.Model): # 获取数据状态 data_state = fields.Boolean(string='获取数据状态', default=False) + # 坯料长宽高 + material_length = fields.Float(string='长') + material_width = fields.Float(string='宽') + material_height = fields.Float(string='高') + # 零件图号 + part_number = fields.Char(string='零件图号') + # 工序状态 + process_state = fields.Selection([ + ('待装夹', '待装夹'), + ('待检测', '待检测'), + ('已完工', '已完工') + ], string='工序状态', default='待装夹') + @api.depends('production_id') def _compute_save_name(self): """ diff --git a/sf_manufacturing/views/mrp_production_addional_change.xml b/sf_manufacturing/views/mrp_production_addional_change.xml index 6ba78573..26aaa0e2 100644 --- a/sf_manufacturing/views/mrp_production_addional_change.xml +++ b/sf_manufacturing/views/mrp_production_addional_change.xml @@ -65,14 +65,24 @@ draft,confirmed,progress,pending_processing,completed,done - + + + + + + + + + + +