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

Mails are being sent when unchecking the validations. #27

Open
rubencabrera opened this issue May 5, 2021 · 2 comments
Open

Mails are being sent when unchecking the validations. #27

rubencabrera opened this issue May 5, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@rubencabrera
Copy link
Owner

rubencabrera commented May 5, 2021

The email for receipt validation is being sent twice. Once as soon as the contact is saved, from here:

    def _send_validate_mail(self):
        self.ensure_one()
        partner = self
        module_name = 'partner_portal_extra_details'
        template = self.env.ref(
            "%s.email_template_send_user_valid_receipt" % module_name
        )
        template.send_mail(partner.id, force_send=True)
@rubencabrera rubencabrera added the bug Something isn't working label May 5, 2021
@rubencabrera
Copy link
Owner Author

rubencabrera commented May 5, 2021

Same behaviour as here. Looks like the force_send=True doesn't avoid the email getting in the send queue. I don't think it's so urgent to keep the force here, testing locally if removing that argument fixes it and will remove if that's the case.

@rubencabrera
Copy link
Owner Author

Removing the force_send just delayed the behaviour, but still got 2 emails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant