Skip to content

Commit

Permalink
[MIG] mail_composer_cc_bcc_account: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
trisdoan committed Jul 21, 2024
1 parent 2f8bea8 commit 217a993
Show file tree
Hide file tree
Showing 23 changed files with 277 additions and 114 deletions.
8 changes: 4 additions & 4 deletions mail_composer_cc_bcc/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ Configuration

In company form there are two fields to set default cc and bcc partners.

|image|
|res_company_form_default_cc_bcc|

In template form there are two fields to set cc and bcc emails.

|image1|
|email_template_form_cc_bcc|

.. |image| image:: https://raw.githubusercontent.com/OCA/social/17.0/mail_composer_cc_bcc/static/img/res_company_form_default_cc_bcc.png
.. |image1| image:: https://raw.githubusercontent.com/OCA/social/17.0/mail_composer_cc_bcc/static/img/email_template_form_cc_bcc.png
.. |res_company_form_default_cc_bcc| image:: https://raw.githubusercontent.com/OCA/social/17.0/mail_composer_cc_bcc/static/img/res_company_form_default_cc_bcc.png
.. |email_template_form_cc_bcc| image:: https://raw.githubusercontent.com/OCA/social/17.0/mail_composer_cc_bcc/static/img/email_template_form_cc_bcc.png

Usage
=====
Expand Down
1 change: 0 additions & 1 deletion mail_composer_cc_bcc/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"preloadable": True,
"depends": [
"mail",
"account",
],
"data": [
"views/res_company_views.xml",
Expand Down
4 changes: 2 additions & 2 deletions mail_composer_cc_bcc/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
In company form there are two fields to set default cc and bcc partners.

> ![image](../static/img/res_company_form_default_cc_bcc.png)
> ![res_company_form_default_cc_bcc](../static/img/res_company_form_default_cc_bcc.png)
In template form there are two fields to set cc and bcc emails.

> ![image](../static/img/email_template_form_cc_bcc.png)
> ![email_template_form_cc_bcc](../static/img/email_template_form_cc_bcc.png)
76 changes: 39 additions & 37 deletions mail_composer_cc_bcc/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -366,23 +367,24 @@ <h1 class="title">Email CC and BCC</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5e1148fbb1ae19217b0286fcf623c67d487dbee6edd8b1fc072ce53c825f9a0b
!! source digest: sha256:254245c99d868f3a2c4cfdfec26f8d1be09fdc4b8bd2ec691e7f1db4cda9902b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/social/tree/16.0/mail_composer_cc_bcc"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_composer_cc_bcc"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/social&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Odoo native does not support defining a Cc field in the Mail Composer
by default; instead, it only has a unique Recipients fields, which is
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/social/tree/17.0/mail_composer_cc_bcc"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_composer_cc_bcc"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/social&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Odoo native does not support defining a Cc field in the Mail Composer by
default; instead, it only has a unique Recipients fields, which is
confusing for a lot of end users.</p>
<p>This module allows to properly separate To:, Cc:, and Bcc: fields
in the Mail Composer.</p>
<p>This module allows to properly separate To:, Cc:, and Bcc: fields in the
Mail Composer.</p>
<div class="section" id="features">
<h1>Features</h1>
<ul class="simple">
<li>Add Cc and Bcc fields to mail composer form. Send only once to multiple email
addresses.</li>
<li>Add Cc and Bcc fields to company form to use them as default in mail composer
form.</li>
<li>Add Bcc field to mail template form. Use Cc and Bcc fields to lookup partners
by email then add them to corresponding fields in mail composer form.</li>
<li>Add Cc and Bcc fields to mail composer form. Send only once to
multiple email addresses.</li>
<li>Add Cc and Bcc fields to company form to use them as default in mail
composer form.</li>
<li>Add Bcc field to mail template form. Use Cc and Bcc fields to lookup
partners by email then add them to corresponding fields in mail
composer form.</li>
</ul>
<div class="admonition important">
<p class="first admonition-title">Important</p>
Expand All @@ -402,42 +404,38 @@ <h1>Features</h1>
</div>
<div class="section" id="configuration">
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
<p>In company form there are two fields to set default cc and bcc
partners.</p>
<p>In company form there are two fields to set default cc and bcc partners.</p>
<blockquote>
<img alt="https://raw.githubusercontent.com/OCA/social/16.0/mail_composer_cc_bcc/static/img/res_company_form_default_cc_bcc.png" src="https://raw.githubusercontent.com/OCA/social/16.0/mail_composer_cc_bcc/static/img/res_company_form_default_cc_bcc.png" />
</blockquote>
<img alt="res_company_form_default_cc_bcc" src="https://raw.githubusercontent.com/OCA/social/17.0/mail_composer_cc_bcc/static/img/res_company_form_default_cc_bcc.png" /></blockquote>
<p>In template form there are two fields to set cc and bcc emails.</p>
<blockquote>
<img alt="https://raw.githubusercontent.com/OCA/social/16.0/mail_composer_cc_bcc/static/img/email_template_form_cc_bcc.png" src="https://raw.githubusercontent.com/OCA/social/16.0/mail_composer_cc_bcc/static/img/email_template_form_cc_bcc.png" />
</blockquote>
<img alt="email_template_form_cc_bcc" src="https://raw.githubusercontent.com/OCA/social/17.0/mail_composer_cc_bcc/static/img/email_template_form_cc_bcc.png" /></blockquote>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
<p>The partners cc and bcc from company form will be used to fill in mail composer
form.</p>
<p>The partners cc and bcc from company form will be used to fill in mail
composer form.</p>
<blockquote>
<img alt="https://raw.githubusercontent.com/OCA/social/16.0/mail_composer_cc_bcc/static/img/mail_compose_message_default_cc_bcc.png" src="https://raw.githubusercontent.com/OCA/social/16.0/mail_composer_cc_bcc/static/img/mail_compose_message_default_cc_bcc.png" />
</blockquote>
<p>When select a template that has cc and/or bcc emails, the emails will be used
to lookup partners then found partners will be added to corresponding mail
composer’s fields.</p>
<img alt="image" src="https://raw.githubusercontent.com/OCA/social/17.0/mail_composer_cc_bcc/static/img/mail_compose_message_default_cc_bcc.png" /></blockquote>
<p>When select a template that has cc and/or bcc emails, the emails will be
used to lookup partners then found partners will be added to
corresponding mail composer’s fields.</p>
<blockquote>
<img alt="https://raw.githubusercontent.com/OCA/social/16.0/mail_composer_cc_bcc/static/img/mail_compose_message_template_cc_bcc.png" src="https://raw.githubusercontent.com/OCA/social/16.0/mail_composer_cc_bcc/static/img/mail_compose_message_template_cc_bcc.png" />
</blockquote>
<img alt="image1" src="https://raw.githubusercontent.com/OCA/social/17.0/mail_composer_cc_bcc/static/img/mail_compose_message_template_cc_bcc.png" /></blockquote>
</div>
<div class="section" id="known-issues-roadmap">
<h2><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h2>
<ul class="simple">
<li>Extract <cite>account</cite> customization (<cite>account.invoice.send</cite> wizard) to a specific module <cite>mail_composer_cc_bcc_account</cite></li>
<li>Extract account customization (account.invoice.send wizard) to a
specific module mail_composer_cc_bcc_account</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/social/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mail_composer_cc_bcc%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mail_composer_cc_bcc%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -447,7 +445,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Credits</a></h2>
<div class="section" id="authors">
<h1>Authors</h1>
<ul class="simple">
<li>Camptocamp SA</li>
<li>Camptocamp</li>
</ul>
</div>
<div class="section" id="contributors">
Expand All @@ -458,25 +456,29 @@ <h1>Contributors</h1>
<ul class="simple">
<li>Hai N. Le &lt;<a class="reference external" href="mailto:hailn&#64;trobz.com">hailn&#64;trobz.com</a>&gt;</li>
<li>Son Ho &lt;<a class="reference external" href="mailto:sonhd&#64;trobz.com">sonhd&#64;trobz.com</a>&gt;</li>
<li>Tri Doan &lt;<a class="reference external" href="mailto:tridm&#64;trobz.com">tridm&#64;trobz.com</a>&gt;</li>
</ul>
</blockquote>
</li>
</ul>
</div>
<div class="section" id="other-credits">
<h1>Other credits</h1>
<p>The creation and migration from 15.0 to 16.0 of this module were financially supported by Camptocamp.</p>
<p>The creation and migration from 16.0 to 17.0 of this module were
financially supported by Camptocamp.</p>
</div>
<div class="section" id="maintainers">
<h1>Maintainers</h1>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/hailangvn2023"><img alt="hailangvn2023" src="https://github.com/hailangvn2023.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/16.0/mail_composer_cc_bcc">OCA/social</a> project on GitHub.</p>
<p><a class="reference external image-reference" href="https://github.com/trisdoan"><img alt="trisdoan" src="https://github.com/trisdoan.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/17.0/mail_composer_cc_bcc">OCA/social</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions mail_composer_cc_bcc/tests/test_mail_cc_bcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def test_template_cc_bcc(self):
# Company default values
env.company.default_partner_cc_ids = self.partner_cc3
env.company.default_partner_bcc_ids = self.partner_cc2
# Product template values
tmpl_model = env["ir.model"].search([("model", "=", "product.template")])
# Partner template values
tmpl_model = env["ir.model"].search([("model", "=", "res.partner")])
partner_cc = self.partner_cc
partner_bcc = self.partner_bcc
vals = {
Expand All @@ -120,7 +120,7 @@ def test_template_cc_bcc(self):
(partner_bcc.name or "False", partner_bcc.email or "False")
),
}
prod_tmpl = env["mail.template"].create(vals)
partner_tmpl = env["mail.template"].create(vals)

# Open mail composer form and check for default values from company
form = self.open_mail_composer_form()
Expand All @@ -130,12 +130,12 @@ def test_template_cc_bcc(self):
self.assertEqual(composer.partner_bcc_ids, self.partner_cc2)

# Change email template and check for values from it
form.template_id = prod_tmpl
form.template_id = partner_tmpl
composer = form.save()

# Beside existing Cc and Bcc, add template's ones
form = Form(composer)
form.template_id = prod_tmpl
form.template_id = partner_tmpl
composer = form.save()
expecting = self.partner_cc3 + self.partner_cc

Expand All @@ -153,7 +153,7 @@ def test_template_cc_bcc(self):
form.save()
self.assertFalse(form.template_id) # no template

form.template_id = prod_tmpl
form.template_id = partner_tmpl
composer = form.save()

expecting = self.partner_cc3 + self.partner_cc
Expand Down
40 changes: 21 additions & 19 deletions mail_composer_cc_bcc_account/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ Email CC and BCC when sending invoice
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
:target: https://github.com/OCA/social/tree/16.0/mail_composer_cc_bcc_account
:target: https://github.com/OCA/social/tree/17.0/mail_composer_cc_bcc_account
:alt: OCA/social
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_composer_cc_bcc_account
:target: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_composer_cc_bcc_account
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows to properly separate To:, Cc:, and Bcc: fields
in when sending invoices.
This module allows to properly separate To:, Cc:, and Bcc: fields in
when sending invoices.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Expand All @@ -50,46 +50,48 @@ mail_compose_cc_bcc are installed.
Usage
=====

Use the cc and bcc fields when sending invoices, to notify other partners then
the invoice contact of the customer.
Use the cc and bcc fields when sending invoices, to notify other
partners then the invoice contact of the customer.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_composer_cc_bcc_account%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_composer_cc_bcc_account%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~
-------

* Camptocamp SA

Contributors
~~~~~~~~~~~~
------------

* `Trobz <https://www.trobz.com>`_:
- `Trobz <https://www.trobz.com>`__:

* Hai N. Le <hailn@trobz.com>
* Son Ho <sonhd@trobz.com>
- Hai N. Le <hailn@trobz.com>
- Son Ho <sonhd@trobz.com>
- Tris Doan <tridm@trobz.com>

* `Therp BV <https://therp.nl>`_:
- `Therp BV <https://therp.nl>`__:

* Ronald Portier <ronald@therp.nl>
- Ronald Portier <ronald@therp.nl>

Other credits
~~~~~~~~~~~~~
-------------

The creation and migration from 15.0 to 16.0 of this module were financially supported by Camptocamp.
The creation and migration from 16.0 to 17.0 of this module were
financially supported by Camptocamp.

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -109,6 +111,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-hailangvn2023|

This module is part of the `OCA/social <https://github.com/OCA/social/tree/16.0/mail_composer_cc_bcc_account>`_ project on GitHub.
This module is part of the `OCA/social <https://github.com/OCA/social/tree/17.0/mail_composer_cc_bcc_account>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions mail_composer_cc_bcc_account/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Copyright 2024 Camptocamp
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
from . import wizards
6 changes: 3 additions & 3 deletions mail_composer_cc_bcc_account/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Email CC and BCC when sending invoice",
"summary": "This module enables sending mail to CC and BCC partners for invoices.",
"version": "16.0.2.0.0",
"version": "17.0.1.0.0",
"development_status": "Alpha",
"category": "Social",
"website": "https://github.com/OCA/social",
Expand All @@ -15,10 +15,10 @@
"auto_install": True,
"preloadable": True,
"depends": [
"mail_composer_cc_bcc",
"account",
"mail_composer_cc_bcc",
],
"data": [
"wizards/account_invoice_send_views.xml",
"wizards/account_move_send.xml",
],
}
1 change: 1 addition & 0 deletions mail_composer_cc_bcc_account/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import mail_thread
Loading

0 comments on commit 217a993

Please sign in to comment.