Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][ADD] survey_partner_representative: New module #105

Merged

Conversation

chienandalu
Copy link
Member

@chienandalu chienandalu commented Jan 10, 2024

When we have the modules survey_contact_generation, survey_sale_generation or survey_crm_generation a salesman or a portal users could want to act as a representative of another using the surveys that generate those documents as an entry point.

Pending:

  • Tests

cc @Tecnativa TT46965

ready for review @pedrobaeza @victoralmau

@pedrobaeza
Copy link
Member

It seems a temporary deb file has slipped into the PR.

@chienandalu chienandalu force-pushed the 15.0-add-survey_partner_representative branch from e0b540a to 27748ce Compare January 11, 2024 08:07
@chienandalu
Copy link
Member Author

Oh, weird, maybe it has to do with the new fragments conversion

@chienandalu chienandalu force-pushed the 15.0-add-survey_partner_representative branch 2 times, most recently from e363e02 to 643b579 Compare January 11, 2024 09:38
Comment on lines 16 to 19
if self.allow_partner_representing:
return super(
SurveySurvey, self.with_context(survey_partner_representative=True)
)._create_answer(*args, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

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

This way is more compact and readable:

Suggested change
if self.allow_partner_representing:
return super(
SurveySurvey, self.with_context(survey_partner_representative=True)
)._create_answer(*args, **kwargs)
if self.allow_partner_representing:
self = self.with_context(survey_partner_representative=True)

@pedrobaeza pedrobaeza added this to the 15.0 milestone Jan 12, 2024
@chienandalu chienandalu force-pushed the 15.0-add-survey_partner_representative branch from 643b579 to 7f5d7ae Compare January 12, 2024 08:40
Do surveys on behalf of others.

TT46965
@chienandalu chienandalu force-pushed the 15.0-add-survey_partner_representative branch from 7f5d7ae to b2bb903 Compare January 12, 2024 09:33
@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 15.0-ocabot-merge-pr-105-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit bbc9b0b into OCA:15.0 Jan 16, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@pedrobaeza pedrobaeza deleted the 15.0-add-survey_partner_representative branch January 16, 2024 07:32
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.

4 participants