From e2ae08c33f73f92cf6c478e73b5520eb2ceecfa0 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Tue, 31 Jan 2023 10:32:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E9=80=A0=E5=92=8C=E9=94=80=E5=94=AE?= =?UTF-8?q?=E9=87=8C=E7=9A=84=E4=BA=A7=E5=93=81=E7=9A=84=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E5=99=A8=EF=BC=8C=E8=83=9A=E6=96=99=E7=9A=84=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=98=AF=E5=90=A6=E4=B8=BA=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E6=96=B0=E5=BB=BA=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E5=8C=B9=E9=85=8Dbom=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=8F=AA?= =?UTF-8?q?=E8=83=BD=E5=8C=B9=E9=85=8D=E6=89=8B=E5=8A=A8=E5=BB=BA=E7=9A=84?= =?UTF-8?q?bom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_dlm/models/product_template.py | 5 +++-- sf_dlm/views/product_template_view.xml | 14 +++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/sf_dlm/models/product_template.py b/sf_dlm/models/product_template.py index fc0ebea3..8d271396 100644 --- a/sf_dlm/models/product_template.py +++ b/sf_dlm/models/product_template.py @@ -37,7 +37,7 @@ class ResProductTemplate(models.Model): single_manufacturing = fields.Boolean(string="单个制造") upload_model_file = fields.Many2many('ir.attachment', 'upload_model_file_attachment_ref', string='上传模型文件') model_code = fields.Char('模型编码') - is_bfm = fields.Boolean('业务平台是否自动创建产品', default=False) + is_bfm = fields.Boolean('业务平台是否自动创建', default=False) def _get_volume_uom_id_from_ir_config_parameter(self): product_length_in_feet_param = self.env['ir.config_parameter'].sudo().get_param('product.volume_in_cubic_feet') @@ -152,6 +152,7 @@ class ResProductTemplate(models.Model): 'list_price': item['price'], 'materials_id': materials_id.id, 'materials_type_id': materials_type_id.id, + 'is_bfm': True, # 'route_ids': self._get_routes(route_type), # 'categ_id': self.env.ref('sf_dlm.product_category_embryo_sf').id, # 'model_surface_process_id': self.env['sf.production.process'].search( @@ -255,7 +256,7 @@ class ResMrpBom(models.Model): embryo_has = self.env['product.product'].search( [('categ_id.type', '=', '胚料'), ('materials_type_id', '=', product.materials_type_id.id), ('length', '>', product.length), ('width', '>', product.width), - ('height', '>', product.height) + ('height', '>', product.height), ('is_bfm', '=', False) ], limit=1, order='volume desc' diff --git a/sf_dlm/views/product_template_view.xml b/sf_dlm/views/product_template_view.xml index 81a90119..907b3ce3 100644 --- a/sf_dlm/views/product_template_view.xml +++ b/sf_dlm/views/product_template_view.xml @@ -127,16 +127,16 @@ - - mrp.product.template.search + + product.template.search product.template - + - - - - + + + +