-
-
Notifications
You must be signed in to change notification settings - Fork 637
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by pedrobaeza
- Loading branch information
Showing
109 changed files
with
15,751 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
=============================== | ||
Link partners with mass-mailing | ||
=============================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:a712294673e6879264c33b711c2fa62256e598736aa9b6c95f3aef1e5ae0e352 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
: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/mass_mailing_partner | ||
: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-mass_mailing_partner | ||
: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 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module links mass-mailing contacts with partners. | ||
|
||
Features | ||
-------- | ||
|
||
- When creating or saving a mass-mailing contact, partners are matched | ||
through email, linking matched partner, or creating a new one if no | ||
match and the maling list partner mandatory field is checked. | ||
- Mailing contacts smart button in partner form. | ||
- Mass mailing stats smart button in partner form. | ||
- Filter and group by partner in mail statistics tree view | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
At first install, all existing mass mailing contacts are matched against | ||
partners. And also mass mailing statistics are matched using model and | ||
res_id. | ||
|
||
Usage | ||
===== | ||
|
||
In partner view, there is a new action called "Add to mailing list". | ||
This action open a pop-up to select a mailing list. Selected partners | ||
will be added as mailing list contacts. | ||
|
||
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:%20mass_mailing_partner%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 | ||
------- | ||
|
||
* Tecnativa | ||
|
||
Contributors | ||
------------ | ||
|
||
- `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
- Pedro M. Baeza | ||
- Rafael Blasco | ||
- Antonio Espinosa | ||
- Javier Iniesta | ||
- Jairo Llopis | ||
- David Vidal | ||
- Ernesto Tejeda | ||
- Victor M.M. Torres | ||
- Manuel Calero | ||
- Víctor Martínez | ||
|
||
- `Hibou Corp. <https://hibou.io>`__ | ||
|
||
- `Trobz <https://trobz.com>`__: | ||
|
||
- Nguyễn Minh Chiến <[email protected]> | ||
|
||
Other credits | ||
------------- | ||
|
||
The migration of this module from 15.0 to 16.0 was financially supported | ||
by Camptocamp | ||
|
||
Maintainers | ||
----------- | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
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. | ||
|
||
This module is part of the `OCA/social <https://github.com/OCA/social/tree/17.0/mass_mailing_partner>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import models | ||
from . import wizard | ||
from .hooks import post_init_hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2015 Pedro M. Baeza <[email protected]> | ||
# Copyright 2015-2016 Antonio Espinosa <[email protected]> | ||
# Copyright 2015 Javier Iniesta <[email protected]> | ||
# Copyright 2020 Tecnativa - Manuel Calero | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
"name": "Link partners with mass-mailing", | ||
"version": "17.0.1.0.0", | ||
"author": "Tecnativa, " "Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/social", | ||
"license": "AGPL-3", | ||
"category": "Marketing", | ||
"depends": ["mass_mailing"], | ||
"post_init_hook": "post_init_hook", | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"views/mailing_trace_view.xml", | ||
"views/mailing_contact_view.xml", | ||
"views/mailing_view.xml", | ||
"views/res_partner_view.xml", | ||
"wizard/partner_mail_list_wizard.xml", | ||
], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2015 Pedro M. Baeza <[email protected]> | ||
# Copyright 2015 Antonio Espinosa <[email protected]> | ||
# Copyright 2015 Javier Iniesta <[email protected]> | ||
# Copyright 2016 Antonio Espinosa - <[email protected]> | ||
# Copyright 2020 Tecnativa - Manuel Calero | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
import logging | ||
|
||
_logger = logging.getLogger(__name__) | ||
|
||
|
||
def post_init_hook(env): | ||
# ACTION 1: Match existing contacts | ||
contact_model = env["mailing.contact"] | ||
partner_model = env["res.partner"] | ||
contacts = contact_model.search([("email", "!=", False)]) | ||
_logger.info("Trying to match %d contacts to partner by email", len(contacts)) | ||
for contact in contacts: | ||
partners = partner_model.search([("email", "=ilike", contact.email)], limit=1) | ||
if partners: | ||
contact.write({"partner_id": partners.id}) | ||
# ACTION 2: Match existing statistics | ||
stat_model = env["mailing.trace"] | ||
stats = stat_model.search([("model", "!=", False), ("res_id", "!=", False)]) | ||
_logger.info("Trying to link %d mass mailing statistics to partner", len(stats)) | ||
stats.partner_link() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * mass_mailing_partner | ||
# | ||
# Translators: | ||
# OCA Transbot <[email protected]>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 10.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-12-01 02:19+0000\n" | ||
"PO-Revision-Date: 2017-12-01 02:19+0000\n" | ||
"Last-Translator: OCA Transbot <[email protected]>, 2017\n" | ||
"Language-Team: Amharic (https://www.transifex.com/oca/teams/23907/am/)\n" | ||
"Language: am\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=(n > 1);\n" | ||
|
||
#. module: mass_mailing_partner | ||
#. odoo-python | ||
#: code:addons/mass_mailing_partner/models/mailing_contact_subscription.py:0 | ||
#: code:addons/mass_mailing_partner/models/mailing_list.py:0 | ||
#, python-format | ||
msgid "A partner cannot be multiple times in the same list" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model_terms:ir.ui.view,arch_db:mass_mailing_partner.partner_mail_list_wizard_form | ||
msgid "Add contacts to mailing list" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.actions.act_window,name:mass_mailing_partner.action_partner_mail_list | ||
msgid "Add to mailing list" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model_terms:ir.ui.view,arch_db:mass_mailing_partner.partner_mail_list_wizard_form | ||
msgid "Cancel" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model,name:mass_mailing_partner.model_res_partner | ||
msgid "Contact" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model,name:mass_mailing_partner.model_partner_mail_list_wizard | ||
#: model_terms:ir.ui.view,arch_db:mass_mailing_partner.partner_mail_list_wizard_form | ||
msgid "Create contact mailing list" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__create_uid | ||
msgid "Created by" | ||
msgstr "Creado por" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__create_date | ||
msgid "Created on" | ||
msgstr "Creado en" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__id | ||
msgid "ID" | ||
msgstr "ID" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__write_uid | ||
msgid "Last Updated by" | ||
msgstr "Última actualización por" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__write_date | ||
msgid "Last Updated on" | ||
msgstr "Última actualización en" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model,name:mass_mailing_partner.model_mailing_contact | ||
msgid "Mailing Contact" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model,name:mass_mailing_partner.model_mailing_list | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__mail_list_id | ||
#: model_terms:ir.ui.view,arch_db:mass_mailing_partner.view_res_partner_filter | ||
msgid "Mailing List" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model,name:mass_mailing_partner.model_mailing_trace | ||
msgid "Mailing Statistics" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_partner__mass_mailing_contact_ids | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users__mass_mailing_contact_ids | ||
#: model_terms:ir.ui.view,arch_db:mass_mailing_partner.view_partner_form | ||
msgid "Mailing contacts" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_partner__mass_mailing_contacts_count | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users__mass_mailing_contacts_count | ||
msgid "Mailing contacts number" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_list__partner_mandatory | ||
msgid "Mandatory Partner" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model,name:mass_mailing_partner.model_mailing_contact_subscription | ||
msgid "Mass Mailing Subscription Information" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_partner__mass_mailing_stats_ids | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users__mass_mailing_stats_ids | ||
#: model_terms:ir.ui.view,arch_db:mass_mailing_partner.view_partner_form | ||
msgid "Mass mailing stats" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_partner__mass_mailing_stats_count | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_users__mass_mailing_stats_count | ||
msgid "Mass mailing stats number" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model,name:mass_mailing_partner.model_base_partner_merge_automatic_wizard | ||
msgid "Merge Partner Wizard" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_contact__partner_id | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_trace__partner_id | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__partner_ids | ||
#: model_terms:ir.ui.view,arch_db:mass_mailing_partner.mailing_trace_view_search | ||
#: model_terms:ir.ui.view,arch_db:mass_mailing_partner.view_mail_mass_mailing_contact_search | ||
msgid "Partner" | ||
msgstr "ተባባሪ" | ||
|
||
#. module: mass_mailing_partner | ||
#. odoo-python | ||
#: code:addons/mass_mailing_partner/wizard/partner_mail_list_wizard.py:0 | ||
#, python-format | ||
msgid "Partner '%s' has no email." | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_list__partner_category | ||
msgid "Partner Tag" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#. odoo-python | ||
#: code:addons/mass_mailing_partner/models/mailing_contact.py:0 | ||
#, python-format | ||
msgid "Partner already exists in one of these mailing lists" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_contact__tag_ids | ||
msgid "Tags" | ||
msgstr "" | ||
|
||
#. module: mass_mailing_partner | ||
#. odoo-python | ||
#: code:addons/mass_mailing_partner/models/res_partner.py:0 | ||
#, python-format | ||
msgid "" | ||
"This partner '%s' is linked to one or more mass mailing contact. Email must " | ||
"be assigned." | ||
msgstr "" |
Oops, something went wrong.