调整上传文件名
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user