Accept Merge Request #2029: (feature/制造功能优化 -> develop)

Merge Request: 调整上传文件名

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/2029?initial=true
This commit is contained in:
马广威
2025-04-22 13:17:03 +08:00
committed by Coding
2 changed files with 3 additions and 1 deletions

View File

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

View File

@@ -6,7 +6,8 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form> <form>
<group> <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> </group>
<footer> <footer>
<button string="确认导入" name="import_data" type="object" class="btn-primary"/> <button string="确认导入" name="import_data" type="object" class="btn-primary"/>