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

[IMP] mass_mailing_custom_unsubscribe: GDPR compliance #278

Merged
merged 7 commits into from
Jun 13, 2018

Conversation

chienandalu
Copy link
Member

Implement #267 in 9.0

  • [IMP] mass_mailing_custom_unsubscribe: GDPR compliance
  • Record resubscriptions too.
  • Record action metadata.
  • Make ESLint happy.
  • Quick color-based action distinction in tree view.
  • Add useful quick groupings.
  • Display (un)subscription metadata.
  • Pivot & graph views.

cc @Tecnativa

@chienandalu chienandalu changed the title [IMP] mass_mailing_custom_unsubscribe: GDPR compliance (#267) [IMP] mass_mailing_custom_unsubscribe: GDPR compliance May 24, 2018
* [IMP] mass_mailing_custom_unsubscribe: GDPR compliance

- Record resubscriptions too.
- Record action metadata.
- Make ESLint happy.
- Quick color-based action distinction in tree view.
- Add useful quick groupings.
- Display (un)subscription metadata.
- Pivot & graph views.
@chienandalu chienandalu force-pushed the 9.0-mass_mailing_custom_unsubscribe-gdpr branch from 2267575 to dd2bb17 Compare May 24, 2018 15:32
for one in self:
if one.action == "unsubscription" and not one.reason_id:
raise exceptions.ReasonRequiredError(
_("Please indicate why are you unsubscribing."))
Copy link
Member

@yajo yajo May 25, 2018

Choose a reason for hiding this comment

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

The tour fails because of an error 500. This seems to be the cause.

Most likely, you need to alter the tour, so it indicates the unsubscription reason.

Or maybe the error pops up in a different form, since this shouldn't be printing an error 500 in the 1st place.

Copy link
Member Author

Choose a reason for hiding this comment

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

Grrr, I can't reproduce in my local even with the whole repo CI 😕

@rafaelbn rafaelbn added this to the 9.0 milestone May 25, 2018
@pedrobaeza
Copy link
Member

@yajo please help in this.

@yajo
Copy link
Member

yajo commented May 29, 2018

You still get an error raised to the tour, resulting in a 500 error page 😕
https://travis-ci.org/OCA/social/jobs/385122118#L1101-L1171

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

You nailed it!

Indeed, I was forgetting that v9 lacks the env autoreset when context changes.

.travis.yml Outdated
- TESTS="1" ODOO_REPO="odoo/odoo" EXCLUDE="mass_mailing_custom_unsubscribe"
- TESTS="1" ODOO_REPO="OCA/OCB" EXCLUDE="mass_mailing_custom_unsubscribe"
- TESTS="1" ODOO_REPO="odoo/odoo"INCLUDE="mass_mailing_custom_unsubscribe"
- TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="mass_mailing_custom_unsubscribe"
Copy link
Member

Choose a reason for hiding this comment

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

Remove this change. It wasn't the problem.

request.context,
default_reason_id=reason_id,
default_details=post.get("details") or False,
)
Copy link
Member

@yajo yajo May 29, 2018

Choose a reason for hiding this comment

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

After changing request.context, do a del request.env.

@chienandalu
Copy link
Member Author

@yajo Two problems I'm getting into:

@chienandalu
Copy link
Member Author

To note also, that functional tests are working as far as I could try

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

I detected one failure, let's see if that's the ❌ cause.

Also, you can add timeout to tests if you need it.

extra_context["default_reason_id"] = int(reason_id)
if details:
extra_context["default_details"] = details
request.context = dict(request.context, **extra_context)
Copy link
Member

Choose a reason for hiding this comment

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

After changing request.context, do a del request.env.

Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

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

Hi @chienandalu @yajo , Travis is still RED but functionally tested 👍 in my side after getting travis green we can merge safety

@chienandalu
Copy link
Member Author

Yes there's still a problem with the tour I can't reproduce manually 😕

@rafaelbn
Copy link
Member

@yajo what can we do with travis 🔴 here? could you check it? Functionally this works! and could be merge!

@yajo yajo merged commit 0aacb23 into OCA:9.0 Jun 13, 2018
@yajo yajo deleted the 9.0-mass_mailing_custom_unsubscribe-gdpr branch June 13, 2018 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.

4 participants