调整适配零件图号为数字
This commit is contained in:
@@ -169,7 +169,12 @@ class ImportComplexModelWizard(models.TransientModel):
|
||||
|
||||
if row[2] == '':
|
||||
continue
|
||||
if row[1] != quality_check.part_number:
|
||||
logging.info('================%s, %s==' % (row[1], type(row[1])))
|
||||
|
||||
compare_value = row[1]
|
||||
if type(compare_value) == float:
|
||||
compare_value = str(int(compare_value))
|
||||
if compare_value != quality_check.part_number:
|
||||
print(sheet.row_values(row_index))
|
||||
raise UserError(_('上传内容图号错误,请修改'))
|
||||
for row_index in range(1, sheet.nrows):
|
||||
@@ -435,7 +440,8 @@ class ImportComplexModelWizard(models.TransientModel):
|
||||
# )
|
||||
|
||||
def download_excel_template(self):
|
||||
base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url') + '/quality_control/static/src/binary/出厂检验报告上传模版.xlsx'
|
||||
base_url = self.env['ir.config_parameter'].sudo().get_param(
|
||||
'web.base.url') + '/quality_control/static/src/binary/出厂检验报告上传模版.xlsx'
|
||||
|
||||
# 只有当原始 URL 使用 http 时才替换为 https
|
||||
if base_url.startswith("http://"):
|
||||
|
||||
Reference in New Issue
Block a user