OdooWiki OCA HUB

Survey binary question type

survey_question_type_binary folder_open OCA/survey open_in_new
Uncategorised License: AGPL-3

This module add binary field question type for attach on survey page.

auto_awesome What this module does

AI-generated from the code · Odoo 17.0

Adds two new survey question types that let respondents upload one or several files as their answer, with optional limits on file type and size.

This module extends the Surveys app so that when you build a survey you can choose two new question types: "Binary" (a single file upload) and "Multiple: Binary" (several file uploads).

On the question form, when one of these types is selected, two extra settings appear: allowed file MIME types (for example image/png,image/jpeg) and a maximum file size in bytes, defaulting to 50 MB. Leaving them empty allows any file type or size.

Respondents see a file upload control on the survey page and can attach files. The system checks the answer: if the question is mandatory and no file is given, an error is shown; if the file type is not in the allowed list, or the file is larger than the maximum, the answer is rejected with a clear message. These checks also run when answers are saved.

In the back office, each uploaded file is stored as its own record with its filename, detected MIME type, size and a flag telling whether it is an image. On the answer line, files are shown in a small kanban card with an image preview or a document icon (PDF, Word, Excel, PowerPoint, text, code, zip), plus filename, MIME type and size. Single-file answers display the filename; multi-file answers display the number of files. A dedicated form view shows the file details.

Depends on

survey
Models and fields (4)
  • survey.question · extends an existing modelmax_filesize, question_type, allowed_filemimetypes
  • survey.user_input · extends an existing model
  • survey.user_input.line · extends an existing modelanswer_type, answer_binary_ids
  • survey.user_input.line_binary · new modelfilename, value_binary, input_line_id, is_binary_image, value_binary_size, value_binary_type

Text generated by AI (DeepSeek) from reading the Odoo 17.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 4 confirmed, 5 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 17.0

Once installed from the configuration of the questions, in the options, you can indicate the allowed mime types (Allowed Filemimetypes) and the maximum file size to upload (Max Filesize).

In addition to the binary option, a Multi: Binary option is supported which has the same functionality as the single option but allows the user to add more than one file.

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.