[ADD] survey_xlsx_expand_multiple_choice, survey_xlsx_extra_fields
survey_xlsx_expand_multiple_choice: expand multiple_choice questions into one Oui/Non column per option, and matrix questions into one column per row (value = selected option). Relies on the extension hooks added to survey_xlsx. survey_xlsx_extra_fields: bridge (auto_install) with survey_extra_fields that excludes 'file' question types from the XLSX export. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1
survey_xlsx_extra_fields/report/__init__.py
Normal file
1
survey_xlsx_extra_fields/report/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import report_survey_xlsx
|
||||
15
survey_xlsx_extra_fields/report/report_survey_xlsx.py
Normal file
15
survey_xlsx_extra_fields/report/report_survey_xlsx.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright 2025 Elabore
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import models
|
||||
|
||||
|
||||
class ReportSurveyXlsx(models.AbstractModel):
|
||||
_inherit = "report.survey.xlsx"
|
||||
|
||||
def _write_question_header(self, sheet, question, cols, bold):
|
||||
# "file" questions store uploaded attachments that cannot be rendered
|
||||
# in a spreadsheet cell: skip them so no column is created. Without a
|
||||
# column, _process_user_answer ignores their answers automatically.
|
||||
if question.question_type == "file":
|
||||
return
|
||||
return super()._write_question_header(sheet, question, cols, bold)
|
||||
Reference in New Issue
Block a user