Skip to content
Snippets Groups Projects
Commit 461b6305 authored by Benjamin - Le Filament's avatar Benjamin - Le Filament
Browse files

[UPD] survey report xlsx for AECT and AECI answer

parent 38e966b4
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,15 @@ from odoo import models ...@@ -7,6 +7,15 @@ from odoo import models
class ReportSurveyXlsx(models.AbstractModel): class ReportSurveyXlsx(models.AbstractModel):
_inherit = "report.survey.xlsx" _inherit = "report.survey.xlsx"
def _pre_generate_xlsx_report_header(self, sheet, results, cols, bold):
"""
Hérite la fonction parente pour ajouter les informations du stagiaire si il
s'agit d'un questionnaire AECT ou AECI
"""
super()._pre_generate_xlsx_report_header(sheet, results, cols, bold)
if results.filtered(lambda s: s.training_survey_type in ["aeci", "aect"]):
sheet.write(0, cols["student_id"], "Stagiaire", bold)
def _get_input_domain(self, results): def _get_input_domain(self, results):
domain = super()._get_input_domain(results) domain = super()._get_input_domain(results)
if self.env.context.get("training_id"): if self.env.context.get("training_id"):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment