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

[ADD][12.0] module mail_send_bcc to receive all mail sent by Odoo in bcc #462

Merged
merged 2 commits into from
Jan 9, 2021

Conversation

legalsylvain
Copy link
Contributor

@legalsylvain legalsylvain commented Nov 13, 2019

Supersed OCA/server-tools#1722. (bad repository)

Migrate a simple module from GRAP V8 incubator repository.

This module overload the send of email in odoo. For each mail sent, odoo will add, in the "Bcc" field, the email present in the "From" field.

Consequently, when the users are sending mail via Odoo to a partner (customer, supplier), they will receive a copy of the email.
Also, if the partner answer to the email, and your mail provider is handling correctly thread (as Gmail does), you'll have the whole history of the mails in your mailbox.

CC : @quentinDupont, @etobella, @pedrobaeza

#GRAPOCA

@legalsylvain legalsylvain added this to the 12.0 milestone Nov 13, 2019
Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Just a small nitpicking (non blocking)

"category": "Social Network",
"author": "GRAP"
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-tools",
Copy link
Member

Choose a reason for hiding this comment

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

OCA/social

@JordiBForgeFlow
Copy link
Member

@legalsylvain what do you think about this module supporting cc as well? Do you think that would be feasible?

@legalsylvain
Copy link
Contributor Author

legalsylvain commented Nov 13, 2019

@legalsylvain what do you think about this module supporting cc as well? Do you think that would be feasible?

Which module ? This one : https://github.com/OCA/social/tree/8.0/base_mail_bcc

If yes, that is different need. base_mail_bcc send allways to the same adresses. My module send to the sender. (from field)
base_mail_bcc is useless in my situation. I have a DB with multi company enabled (50 companies) and adress should be dynamic.

So propose to keep both modules in the OCA. (even if in reality, the module base_mail_bcc is only available for V 8.)

@JordiBForgeFlow
Copy link
Member

@legalsylvain I mean to add the ability to add people in CC and in BCC. Seems that this module only supports BCC. Right?

@legalsylvain
Copy link
Contributor Author

@jbeficent : OK. I get it.
yes it is feasable, adding configuration in res.config.settings.
But it is not in the scope of this PR.

I renamed the module to mail_send_copy and add a section in the Roadmap. Feel free to implement this feature.
Otherwise, is the PR OK ?

regards.

@legalsylvain legalsylvain force-pushed the 12.0-ADD-mail_send_bcc branch from 50ec07e to 6e3ac27 Compare January 17, 2020 19:00
@legalsylvain legalsylvain changed the title [ADD] mail_send_bcc [MIG] mail_send_bcc Mar 18, 2020
@legalsylvain legalsylvain changed the title [MIG] mail_send_bcc [ADD][12.0] module mail_send_bcc to receive all mail sent by Odoo in bcc Mar 19, 2020
Copy link

@quentinDupont quentinDupont left a comment

Choose a reason for hiding this comment

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

Works fine for user ✔️

Travis fail for a good reason : a mail_tracking test is failing with this module

This is this test.The test failed because we can send the email even if there is no partner email.
Indeed, with this module, we automatically add the BCC field, and so the email is sent even if there is not partner email.

Maybe we can check if there is a partner email before adding BCC ?

@legalsylvain
Copy link
Contributor Author

Travis fail for a good reason : a mail_tracking test is failing with this module

This is this test.The test failed because we can send the email even if there is no partner email.
Indeed, with this module, we automatically add the BCC field, and so the email is sent even if there is not partner email.

Maybe we can check if there is a partner email before adding BCC ?

Thanks a lot @quentinDupont for your analysis. I'll take a look.

@legalsylvain legalsylvain force-pushed the 12.0-ADD-mail_send_bcc branch from 6e3ac27 to 5eca5f0 Compare September 1, 2020 08:08
@legalsylvain legalsylvain force-pushed the 12.0-ADD-mail_send_bcc branch from 5eca5f0 to fc2fc00 Compare September 1, 2020 08:53
@legalsylvain
Copy link
Contributor Author

Hi.
There is an error for runbot, but the error is also present on 12.0 Branch.
image

Ref : https://runbot.odoo-community.org/runbot/repo/https-github-com-oca-social-205

that's weird, because the runbot seems to have failed in the previous merged PR from @pedrobaeza available here : #602

but the bot seems to have ignored and merged.
I thought that using bot was preventing having main branches red.

Any idea ? @sbidoul maybe ?

thanks !

@sbidoul
Copy link
Member

sbidoul commented Sep 1, 2020

I thought that using bot was preventing having main branches red.

ocabot merge ignores runbot errors. Why is runbot red and travis green?

@legalsylvain
Copy link
Contributor Author

Hi @sbidoul

ocabot merge ignores runbot errors.

thanks for your answer. I didn't know.

Why is runbot red and travis green?

No idea. there are some errors here : https://runbot3.odoo-community.org/runbot/static/build/3437583-462-fc2fc0/logs/job_10_test_base.txt but seems fully unrelated to my PR.

AttributeError: module 'subprocess' has no attribute '_optim_args_from_interpreter_flags'

...

[91mnpm WARN saveError ENOENT: no such file or directory, open '/home/odoo/build/OCA/social/package.json'

...

Building wheel for pyldap (setup.py): finished with status 'error'
[91m  ERROR: Command errored out with exit status 1:
   command: /.repo_requirements/virtualenv/python3.5/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kd21hkwp/pyldap/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kd21hkwp/pyldap/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-sgoo2or7
       cwd: /tmp/pip-install-kd21hkwp/pyldap/

...

  Building wheel for suds-jurko (setup.py): finished with status 'error'
[91m  ERROR: Command errored out with exit status 1:
   command: /.repo_requirements/virtualenv/python3.5/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kd21hkwp/suds-jurko/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kd21hkwp/suds-jurko/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-7dqfofcs
       cwd: /tmp/pip-install-kd21hkwp/suds-jurko/

@sbidoul
Copy link
Member

sbidoul commented Sep 1, 2020

Looks like an issue with the latest setuptools. pypa/setuptools#2357 seems related.

@sbidoul
Copy link
Member

sbidoul commented Sep 1, 2020

We can try this: OCA/maintainer-quality-tools#675

@legalsylvain
Copy link
Contributor Author

now green. Thanks @sbidoul !

@legalsylvain
Copy link
Contributor Author

Hi @OCA/social-maintainers : this PR could be merged IMO.

@sebastienbeau
Copy link
Member

/ocabot merge nobump
Thanks for your work @legalsylvain

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 12.0-ocabot-merge-pr-462-by-sebastienbeau-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 21472ba into OCA:12.0 Jan 9, 2021
@OCA-git-bot
Copy link
Contributor

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

@rafaelbn
Copy link
Member

@legalsylvain
Copy link
Contributor Author

Thanks ! I didn't know ! The module looks way more complex than the current one. (with full overwrite of odoo functions)

but looks promising and is more complete !

SiesslPhillip pushed a commit to grueneerde/OCA-social that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/social (13.0)
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.

8 participants