diff --git a/sf_base/static/src/scss/test.scss b/sf_base/static/src/scss/test.scss index faef4815..3868fb09 100644 --- a/sf_base/static/src/scss/test.scss +++ b/sf_base/static/src/scss/test.scss @@ -119,4 +119,22 @@ td.o_required_modifier { .o_kanban_record_bottom { font-family: '华文中宋'; //font-weight: bold; +} + +.o_list_table th > div > i { + display: none !important; +} + +body .o_list_table th:nth-child(4) { + width: 100px !important; +} + +//body .o_list_table th:nth-child(5) { +// width: 500px !important; +//} + +.o_list_renderer .o_list_table tbody > tr > td:not(.o_list_record_selector):not(.o_handle_cell):not(.o_list_button):not(.o_list_record_remove).o_list_text { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; } \ No newline at end of file diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index dbeb7814..16e65e85 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -1,8 +1,8 @@ from odoo import models, fields, api 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 import logging import base64 import hashlib @@ -566,20 +566,20 @@ class ResProductMo(models.Model): item.model_file = self.transition_glb_file(report_path, model_code) # 将attach的datas内容转为glb文件 - def transition_glb_file(self, report_path, code): - shapes = read_step_file(report_path) - output_file = os.path.join('/tmp', str(code) + '.stl') - write_stl_file(shapes, output_file, 'binary', 0.03, 0.5) - # 转化为glb - output_glb_file = os.path.join('/tmp', str(code) + '.glb') - util_path = get_resource_path('sf_dlm', 'static/util') - cmd = 'python3 %s/stl2gltf.py %s %s -b' % (util_path, output_file, output_glb_file) - os.system(cmd) - # 转base64 - with open(output_glb_file, 'rb') as fileObj: - image_data = fileObj.read() - base64_data = base64.b64encode(image_data) - return base64_data + # def transition_glb_file(self, report_path, code): + # shapes = read_step_file(report_path) + # output_file = os.path.join('/tmp', str(code) + '.stl') + # write_stl_file(shapes, output_file, 'binary', 0.03, 0.5) + # # 转化为glb + # output_glb_file = os.path.join('/tmp', str(code) + '.glb') + # util_path = get_resource_path('sf_dlm', 'static/util') + # cmd = 'python3 %s/stl2gltf.py %s %s -b' % (util_path, output_file, output_glb_file) + # os.system(cmd) + # # 转base64 + # with open(output_glb_file, 'rb') as fileObj: + # image_data = fileObj.read() + # base64_data = base64.b64encode(image_data) + # return base64_data class ResMrpBomMo(models.Model):