调整上传文件名

This commit is contained in:
mgw
2025-04-22 13:16:15 +08:00
parent 666c0167d7
commit 7c2ddd8a0c
2 changed files with 3 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ _logger = logging.getLogger(__name__)
class ImportComplexModelWizard(models.TransientModel):
_name = 'quality.check.import.complex.model.wizard'
file_data = fields.Binary("数据文件")
filename = fields.Char(string='文件名')
model_name = fields.Char(string='Model Name')
field_basis = fields.Char(string='Field Basis')
check_id = fields.Many2one(string='质检单', comodel_name='quality.check')

View File

@@ -6,7 +6,8 @@
<field name="arch" type="xml">
<form>
<group>
<field name="file_data" widget="binary" options="{'accepted_file_extensions': '.xls,.xlsx'}"/>
<field name="file_data" widget="binary" filename="filename" options="{'accepted_file_extensions': '.xls,.xlsx'}"/>
<field name="filename" invisible="1"/>
</group>
<footer>
<button string="确认导入" name="import_data" type="object" class="btn-primary"/>