mirror of https://github.com/OCA/social.git
[IMP] mail_compose_cc_bcc: split off account specific part
parent
154eccdb08
commit
921b4688e0
|
@ -7,7 +7,7 @@ Email CC and BCC when sending invoice
|
|||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:15899c467350be27c0af05844a1f2b429372cc738d36b456aa4162f766902c82
|
||||
!! source digest: sha256:8a4c8888e8b36687e3c4a17b49b957ccfbbe56e7b3227558ee5aef6ec447b164
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
|
||||
|
@ -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/17.0/mail_composer_cc_bcc_account
|
||||
:target: https://github.com/OCA/social/tree/16.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-17-0/social-17-0-mail_composer_cc_bcc_account
|
||||
:target: https://translation.odoo-community.org/projects/social-16-0/social-16-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=17.0
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=16.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.
|
||||
|
@ -50,8 +50,8 @@ 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
|
||||
===========
|
||||
|
@ -59,7 +59,7 @@ 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:%2017.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:%2016.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.
|
||||
|
||||
|
@ -67,31 +67,29 @@ 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>
|
||||
- Tris Doan <tridm@trobz.com>
|
||||
* Hai N. Le <hailn@trobz.com>
|
||||
* Son Ho <sonhd@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 15.0 to 16.0 of this module were financially supported by Camptocamp.
|
||||
|
||||
Maintainers
|
||||
-----------
|
||||
~~~~~~~~~~~
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
|
@ -111,6 +109,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/17.0/mail_composer_cc_bcc_account>`_ project on GitHub.
|
||||
This module is part of the `OCA/social <https://github.com/OCA/social/tree/16.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.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
@ -0,0 +1,24 @@
|
|||
# Copyright 2023 Camptocamp SA
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
"name": "Email CC and BCC when sending invoice",
|
||||
"summary": "This module enables sending mail to CC and BCC partners for invoices.",
|
||||
"version": "16.0.1.0.1",
|
||||
"development_status": "Alpha",
|
||||
"category": "Social",
|
||||
"website": "https://github.com/OCA/social",
|
||||
"author": "Camptocamp SA, Odoo Community Association (OCA)",
|
||||
"maintainers": ["hailangvn2023"],
|
||||
"license": "AGPL-3",
|
||||
"application": False,
|
||||
"installable": True,
|
||||
"auto_install": True,
|
||||
"preloadable": True,
|
||||
"depends": [
|
||||
"mail_composer_cc_bcc",
|
||||
"account",
|
||||
],
|
||||
"data": [
|
||||
"wizards/account_invoice_send_views.xml",
|
||||
],
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
This module will be automatically installed if both account and
|
||||
mail_compose_cc_bcc are installed.
|
|
@ -0,0 +1,8 @@
|
|||
* `Trobz <https://www.trobz.com>`_:
|
||||
|
||||
* Hai N. Le <hailn@trobz.com>
|
||||
* Son Ho <sonhd@trobz.com>
|
||||
|
||||
* `Therp BV <https://therp.nl>`_:
|
||||
|
||||
* Ronald Portier <ronald@therp.nl>
|
|
@ -0,0 +1 @@
|
|||
The creation and migration from 15.0 to 16.0 of this module were financially supported by Camptocamp.
|
|
@ -0,0 +1,2 @@
|
|||
This module allows to properly separate To:, Cc:, and Bcc: fields
|
||||
in when sending invoices.
|
|
@ -0,0 +1,2 @@
|
|||
Use the cc and bcc fields when sending invoices, to notify other partners then
|
||||
the invoice contact of the customer.
|
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
|
@ -0,0 +1 @@
|
|||
from . import test_mail_cc_bcc
|
|
@ -0,0 +1,39 @@
|
|||
# Copyright 2023 Camptocamp
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo.tests import Form
|
||||
|
||||
from odoo.addons.mail_composer_cc_bcc.tests.test_mail_cc_bcc import TestMailCcBcc
|
||||
|
||||
|
||||
class TestMailCcBccInvoice(TestMailCcBcc):
|
||||
def open_invoice_mail_composer_form(self):
|
||||
# Use form to populate data
|
||||
for_name = [("name", "like", "%INV/20__/00003")]
|
||||
self.test_invoice = test_record = self.env["account.move"].search(for_name)
|
||||
self.assertTrue(
|
||||
self.test_invoice,
|
||||
"Test setup did not succeeed. Invoice not found.",
|
||||
)
|
||||
ctx = {
|
||||
"active_ids": test_record.ids,
|
||||
"default_model": "account.move",
|
||||
"default_res_id": test_record.id,
|
||||
"mail_notify_force_send": True,
|
||||
}
|
||||
form = Form(self.env["account.invoice.send"].with_context(**ctx))
|
||||
form.body = "<p>Hello</p>"
|
||||
return form
|
||||
|
||||
def test_invoice_mail_cc_bcc(self):
|
||||
self.set_company()
|
||||
form = self.open_invoice_mail_composer_form()
|
||||
form.subject = "Hello"
|
||||
composer = form.save()
|
||||
with self.mock_mail_gateway():
|
||||
composer._send_email()
|
||||
message = self.test_invoice.message_ids[0]
|
||||
self.assertEqual(len(message.mail_ids), 1)
|
||||
# Only 4 partners notified
|
||||
self.assertEqual(len(message.notified_partner_ids), 4)
|
||||
self.assertEqual(len(message.notification_ids), 4)
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="account_invoice_send_wizard_form_inherit" model="ir.ui.view">
|
||||
<field name="name">account.invoice.send.form.inherit</field>
|
||||
<field name="model">account.invoice.send</field>
|
||||
<field name="inherit_id" ref="account.account_invoice_send_wizard_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='partner_ids']/.." position="after">
|
||||
<field
|
||||
name="partner_cc_ids"
|
||||
widget="many2many_tags_email"
|
||||
context="{'force_email':True, 'show_email':True}"
|
||||
attrs="{'invisible': [('composition_mode', '!=', 'comment')]}"
|
||||
/>
|
||||
<field
|
||||
name="partner_bcc_ids"
|
||||
widget="many2many_tags_email"
|
||||
context="{'force_email':True, 'show_email':True}"
|
||||
attrs="{'invisible': [('composition_mode', '!=', 'comment')]}"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
Loading…
Reference in New Issue