Skip to content

[17.0][MIG] survey_certification_py3o: Migration to version 17.0#173

Merged
OCA-git-bot merged 3 commits intoOCA:17.0from
Tecnativa:17.0-mig-survey_certification_py3o
May 27, 2025
Merged

[17.0][MIG] survey_certification_py3o: Migration to version 17.0#173
OCA-git-bot merged 3 commits intoOCA:17.0from
Tecnativa:17.0-mig-survey_certification_py3o

Conversation

@pilarvargas-tecnativa
Copy link
Copy Markdown

@pilarvargas-tecnativa pilarvargas-tecnativa commented May 23, 2025

@pilarvargas-tecnativa pilarvargas-tecnativa marked this pull request as ready for review May 23, 2025 11:34
@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot migration survey_certification_py3o

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone May 24, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request May 24, 2025
17 tasks
Copy link
Copy Markdown

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a user tries to print a report but the survey doesn't have a template, I get this error.

Could we handle the error and raise a UserError instead of showing a traceback?image

Additionally, please squash the administrative commits.

@pilarvargas-tecnativa
Copy link
Copy Markdown
Author

When a user tries to print a report but the survey doesn't have a template, I get this error.

This is a error handled in the report_py3o module. The priority of this module is to send the custom report in case of a defined template. Manual printing offers the possibility of downloading it from the backend by someone in charge to provide a copy or send it outside of odoo, although this should not be the usual flow.

@pilarvargas-tecnativa pilarvargas-tecnativa force-pushed the 17.0-mig-survey_certification_py3o branch from 62b3f71 to 4dc39ac Compare May 26, 2025 11:17
Copy link
Copy Markdown

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a error handled in the report_py3o module. The priority of this module is to send the custom report in case of a defined template. Manual printing offers the possibility of downloading it from the backend by someone in charge to provide a copy or send it outside of odoo, although this should not be the usual flow.

OK, I understand. Although I’d prefer to get a more user-friendly error instead of a traceback, but anyway, let’s go.

if model_instance._name == "survey.survey":
if (
model_instance._name == "survey.user_input"
and model_instance.py3o_template_id
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this model_instance.survey_id.py3o_template_id?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pilarvargas-tecnativa pilarvargas-tecnativa force-pushed the 17.0-mig-survey_certification_py3o branch from 4dc39ac to d009da1 Compare May 27, 2025 05:39
Copy link
Copy Markdown
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review OK

Copy link
Copy Markdown
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 17.0-ocabot-merge-pr-173-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 53f7396 into OCA:17.0 May 27, 2025
5 of 7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 4c180de. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 17.0-mig-survey_certification_py3o branch May 27, 2025 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants