Skip to content

Commit

Permalink
[FIX] base_import_pdf_by_template: Add file_name to view to display t…
Browse files Browse the repository at this point in the history
…he file correctly

TT50003
  • Loading branch information
victoralmau committed Oct 7, 2024
1 parent 7a20bd6 commit 795253f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class WizardBaseImportPdfPreview(models.TransientModel):
_inherit = "wizard.base.import.pdf.mixin"

data_file = fields.Binary(string="File", attachment=True)
file_name = fields.Char(store=True)
data = fields.Text(string="RAW data", readonly=True)
total_pages = fields.Integer(string="Total pages", readonly=True)
template_id = fields.Many2one(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
<form>
<group>
<field name="extraction_mode" widget="radio" />
<field name="file_name" invisible="1" />
<field
name="data_file"
options="{'accepted_file_extensions': '.pdf'}"
filename="file_name"
/>
<field name="total_pages" invisible="total_pages == 0" />
</group>
Expand Down

0 comments on commit 795253f

Please sign in to comment.