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

[FIX] account: only put internal users as followers of vendor bills c… #32110

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
4 participants
@len-odoo
Copy link
Contributor

commented Mar 25, 2019

…reated by emails

When the pdf of a vendor bill is sent to the alias of a journal,
all the partners that match one of the email address present in the mail thread
are added as followers of the newly created record.
This is a problem since the vendors are actually not concerned by the internal
work that is done, only internal users are.
As a result they get spammed by useless emails, and complain to Christine.
It was put in commit a4df9f8 despite not appearing in the task description.

We filter the partners to only keep the ones that belong to internal users.

opw 1958729

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@len-odoo len-odoo requested a review from nim-odoo Mar 25, 2019

@robodoo robodoo added the seen 🙂 label Mar 25, 2019

@C3POdoo C3POdoo added the OE label Mar 25, 2019

@robodoo robodoo added the CI 🤖 label Mar 25, 2019

# Subscribe internal users on the newly created bill
partners = self.env['res.partner'].browse(seen_partner_ids)
is_internal = lambda p: (p.user_ids and
all(p.user_ids.mapped(lambda u: u.has_group('base.group_user'))))

This comment has been minimized.

Copy link
@nim-odoo

nim-odoo Mar 26, 2019

Contributor

user_has_groups

[FIX] account: only put internal users as followers of vendor bills c…
…reated by emails

When the pdf of a vendor bill is sent to the alias of a journal,
all the partners that match one of the email address present in the mail thread
are added as followers of the newly created record.
This is a problem since the vendors are actually not concerned by the internal
work that is done, only internal users are.
As a result they get spammed by useless emails, and complain to Christine.
It was put in commit a4df9f8 despite not appearing in the task description.

We filter the partners to only keep the ones that belong to internal users.

opw 1958729

@len-odoo len-odoo force-pushed the odoo-dev:12.0-opw1958729-mlals-len branch from d697217 to 3307549 Mar 26, 2019

@len-odoo

This comment has been minimized.

Copy link
Contributor Author

commented Mar 26, 2019

robodoo r+

@robodoo

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2019

Merged, thanks!

@len-odoo len-odoo deleted the odoo-dev:12.0-opw1958729-mlals-len branch Mar 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.