From 8d1e4a89c29163118a69ff3f48e27eef6204e697 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Fri, 29 Mar 2024 17:38:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?1=E3=80=81=E6=B2=A1=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E4=B8=8D=E8=83=BD=E5=AE=8C=E5=B7=A5=EF=BC=8C?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E5=90=8E=E6=89=8D=E5=8F=AF=E4=BB=A5=E5=AE=8C?= =?UTF-8?q?=E5=B7=A5=202=E3=80=81=E5=B7=A5=E5=8D=95=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E5=90=8E=E6=B2=A1=E5=AE=8C=E5=B7=A5=E5=8F=AF=E4=BB=A5=E6=8D=A2?= =?UTF-8?q?=E7=BB=91=203=E3=80=81=E5=B7=A5=E5=8D=95=E7=82=B9=E5=AE=8C?= =?UTF-8?q?=E5=B7=A5=E6=8C=89=E9=92=AE=E8=A6=81=E6=9C=89=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 5 ++++- sf_manufacturing/models/product_template.py | 4 ++-- sf_manufacturing/views/mrp_workorder_view.xml | 6 +++--- sf_sale/models/auto_quatotion_common.py | 2 +- sf_sale/models/quick_easy_order.py | 4 ++-- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 7b3467b7..95f484ef 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -606,6 +606,8 @@ class ResMrpWorkOrder(models.Model): if self.routing_type == '装夹预调': if not self.material_center_point and self.X_deviation_angle > 0: raise UserError("请对前置三元检测定位参数进行计算定位") + if not self.rfid_code: + raise UserError("请扫RFID码进行绑定") if self.picking_out_id: picking_out = self.env['stock.picking'].search([('id', '=', self.picking_out_id.id)]) if picking_out.workorder_out_id: @@ -869,7 +871,8 @@ class SfWorkOrderBarcodes(models.Model): [('production_id', '=', workorder.production_id.id)]) if workorder_rfid: for item in workorder_rfid: - item.write({'rfid_code': barcode}) + if item.state == "progress": + item.write({'rfid_code': barcode}) class WorkPieceDelivery(models.Model): diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index be0c09ae..ddc2ee6d 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -8,8 +8,8 @@ from odoo.exceptions import ValidationError from odoo.modules import get_resource_path -from OCC.Extend.DataExchange import read_step_file -from OCC.Extend.DataExchange import write_stl_file +# from OCC.Extend.DataExchange import read_step_file +# from OCC.Extend.DataExchange import write_stl_file class ResProductMo(models.Model): diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml index 4a766526..9797178e 100644 --- a/sf_manufacturing/views/mrp_workorder_view.xml +++ b/sf_manufacturing/views/mrp_workorder_view.xml @@ -104,7 +104,7 @@ - +