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 - + - - - - + + + +