From f36c2ac096e6ce01521d8c7c3d05b8ae86110c71 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Thu, 16 Nov 2023 17:35:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_base/models/tool_other_features.py | 2 +- sf_dlm/models/product_supplierinfo.py | 1 - .../product_template_management_view.xml | 2 +- sf_manufacturing/models/product_template.py | 115 ++++++++++++------ sf_manufacturing/models/stock.py | 12 +- 5 files changed, 87 insertions(+), 45 deletions(-) diff --git a/sf_base/models/tool_other_features.py b/sf_base/models/tool_other_features.py index 7bb94711..84846c29 100644 --- a/sf_base/models/tool_other_features.py +++ b/sf_base/models/tool_other_features.py @@ -340,7 +340,7 @@ class FeedPerTooth(models.Model): cutting_speed = fields.Char('径向切宽 ae(mm)') machining_method = fields.Selection([('直铣', '直铣'), ('坡铣', '坡铣')], string='加工方式') materials_type_id = fields.Many2one('sf.materials.model', string='材料型号') - blade_diameter = fields.Char('刃部直径(mm)', readonly=True) + blade_diameter = fields.Integer('刃部直径(mm)', readonly=True) feed_per_tooth = fields.Char('每齿走刀量 (mm/z)') def _json_feed_per_tooth(self, obj): diff --git a/sf_dlm/models/product_supplierinfo.py b/sf_dlm/models/product_supplierinfo.py index f8055e1a..23102d43 100644 --- a/sf_dlm/models/product_supplierinfo.py +++ b/sf_dlm/models/product_supplierinfo.py @@ -95,7 +95,6 @@ class ResMrpBomMo(models.Model): limit=1, order='volume desc' ) - logging.info('get_bom-vals:%s' % embryo_has) if embryo_has: rate_of_waste = ((embryo_has.volume - product.model_volume) % embryo_has.volume) * 100 if rate_of_waste <= 20: diff --git a/sf_dlm_management/views/product_template_management_view.xml b/sf_dlm_management/views/product_template_management_view.xml index 692756da..01d40a17 100644 --- a/sf_dlm_management/views/product_template_management_view.xml +++ b/sf_dlm_management/views/product_template_management_view.xml @@ -262,7 +262,7 @@ (mm)&nbsp; + attrs="{'invisible': [('cutting_tool_type','not in',('刀柄','夹头'))]}"/> 0: - if item.product_id.categ_type == '夹具': - item._register_fixture() - elif item.product_id.categ_type == '刀具': - item._register_cutting_tool() + # for item in self.move_ids_without_package: + # if item.quantity_done > 0: + # if item.product_id.categ_type == '夹具': + # item._register_fixture() + # elif item.product_id.categ_type == '刀具': + # item._register_cutting_tool() return res # 创建 外协出库入单