Accept Merge Request #352: (feature/必填字段label添加星号 -> develop)

Merge Request: sf品牌页面表格样式的修改

Created By: @许何哲
Accepted By: @许何哲
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/352?initial=true
This commit is contained in:
许何哲
2023-08-29 15:15:20 +08:00
committed by Coding
2 changed files with 34 additions and 16 deletions

View File

@@ -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;
}

View File

@@ -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):