Skip to content

18.0 migration survey result mail#230

Open
layadelcarmen wants to merge 15 commits into
OCA:18.0from
layadelcarmen:18.0-migration-survey_result_mail
Open

18.0 migration survey result mail#230
layadelcarmen wants to merge 15 commits into
OCA:18.0from
layadelcarmen:18.0-migration-survey_result_mail

Conversation

@layadelcarmen

Copy link
Copy Markdown

No description provided.

chienandalu and others added 12 commits June 17, 2026 16:45
Currently translated at 100.0% (15 of 15 strings)

Translation: survey-15.0/survey-15.0-survey_result_mail
Translate-URL: https://translation.odoo-community.org/projects/survey-15-0/survey-15-0-survey_result_mail/it/
- noupdate template
- set default sender
- fix extra comments responses to show up in simple render
- debug field for basic html render

TT40979
We need to group the mail condition so it doesn't send the mail when the
last one is true.

TT48644
Format dates in the basic html render result.

TT55323
@OCA-git-bot OCA-git-bot added series:18.0 mod:survey_result_mail Module survey_result_mail labels Jun 17, 2026
Laya Rabasa added 3 commits June 18, 2026 12:27
Add 9 new tests covering previously untested branches in
models/survey_user_input.py:
- _mark_done: send_result_mail=False, no partner/email, custom template
- _build_answers_html: char_box, date, datetime, multiple_choice, matrix,
  and skipped-line exclusion
- _compute_survey_result: basic mode and bootstrap mode
- test_build_answers_html_skipped_excluded: pass answer_type=False alongside
  skipped=True to satisfy the _check_answer_type_skipped constraint which
  rejects having both a non-null answer_type and skipped=True on the same line
- test_compute_survey_result_bootstrap_mode: mock _render_user_input to avoid
  rendering web.layout which requires an HTTP request context unavailable in
  unit tests; still verifies the bootstrap branch calls the right method
Odoo 18 raises ValueError if a compute method does not assign the field
for every record. Add else branch to _compute_survey_result so unknown
modes fall back to False instead of leaving the field unset.

Add test_compute_survey_result_bootstrap_mode: mock ir.ui.view._render_template
instead of _render_user_input so the full method body is covered.
Add test_compute_survey_result_unknown_mode to cover the new else branch.
@layadelcarmen

Copy link
Copy Markdown
Author

@benbrich Check this out when you have a chance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:survey_result_mail Module survey_result_mail series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants