From aed33dbb3563a35c425aa7793eaff374efdafd6d Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Mon, 16 Jun 2025 16:02:43 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=86=85=E9=83=A8=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=EF=BC=9A=E8=A1=8C=E6=98=8E=E7=BB=86=E5=A2=9E=E5=8A=A0=E4=BA=A4?= =?UTF-8?q?=E6=9C=9F=E7=AD=89=EF=BC=9B=202=E3=80=81=E5=A4=84=E7=90=86=20bf?= =?UTF-8?q?m=E5=B9=B3=E5=8F=B0=E4=B8=8B=E5=8D=95-=E5=A1=AB=E5=86=99?= =?UTF-8?q?=E4=BA=86=E5=90=88=E5=90=8C=E7=9B=B8=E5=85=B3=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E4=B8=8A=E4=BC=A0=E5=90=88=E5=90=8C=EF=BC=8C?= =?UTF-8?q?=E5=90=88=E5=90=8C=E7=9A=84=E7=9B=B8=E5=85=B3=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=9C=AA=E4=BC=A0=E5=88=B0sf=E9=94=80=E5=94=AE=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_dlm/models/product_template.py | 2 ++ .../views/product_template_management_view.xml | 3 ++- sf_manufacturing/controllers/main.py | 5 ++--- sf_manufacturing/models/product_template.py | 2 ++ sf_manufacturing/models/sale_order.py | 17 ++++++++++++++--- sf_sale/models/sale_order.py | 4 +++- sf_sale/views/sale_order_view.xml | 4 ++++ 7 files changed, 29 insertions(+), 8 deletions(-) diff --git a/sf_dlm/models/product_template.py b/sf_dlm/models/product_template.py index f9825c88..a2d848c2 100644 --- a/sf_dlm/models/product_template.py +++ b/sf_dlm/models/product_template.py @@ -10,6 +10,7 @@ class ResProductTemplate(models.Model): model_name = fields.Char('模型名称') categ_type = fields.Selection( [("成品", "成品"), ("胚料", "胚料"), ("原材料", "原材料")], string='产品的类别', related='categ_id.type', store=True) + blank_type = fields.Selection([('圆料', '圆料'), ('方料', '方料')], string='坯料分类') model_long = fields.Float('模型长[mm]', digits=(16, 3)) model_width = fields.Float('模型宽[mm]', digits=(16, 3)) model_height = fields.Float('模型高[mm]', digits=(16, 3)) @@ -74,6 +75,7 @@ class ResProductTemplate(models.Model): attachment = self.attachment_create(item['model_name'], item['model_data']) vals = { 'name': '%s-%s-%s' % ('P', order_id.name, i), + 'blank_type': item.get('blank_type'), 'model_long': item['model_long'] + model_type.embryo_tolerance, 'model_width': item['model_width'] + model_type.embryo_tolerance, 'model_height': item['model_height'] + model_type.embryo_tolerance, diff --git a/sf_dlm_management/views/product_template_management_view.xml b/sf_dlm_management/views/product_template_management_view.xml index 672251e4..bb9904a7 100644 --- a/sf_dlm_management/views/product_template_management_view.xml +++ b/sf_dlm_management/views/product_template_management_view.xml @@ -95,7 +95,7 @@ -