att_file = fields.Binary(string='Attach File')
name="att_file" widget="binary" options="{'accept': '.pdf, image/*'}" filename="name" string="Attachment"/>
This is my Html code is any one can help me to specify the file input type.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
att_file = fields.Binary(string='Attach File')
name="att_file" widget="binary" options="{'accept': '.pdf, image/*'}" filename="name" string="Attachment"/>
This is my Html code is any one can help me to specify the file input type.
Hi,
Along with the field definition you can specify as follows:
options="{'accepted_file_extensions': '.pdf'}"
Sample:
field name="worksheet_document" string="Document" options="{'accepted_file_extensions': '.pdf'}"
Thanks
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Sep 23
|
9034 | ||
|
1
Feb 22
|
6027 | ||
|
2
Jul 19
|
2355 | ||
|
0
Nov 18
|
2523 | ||
|
4
Sep 18
|
4327 |