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

[18.0][MIG] mass_mailing_partner: Migration to 18.0 #1549

Open
wants to merge 37 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
348177b
mass_mailing_partner
Aug 28, 2015
e901cf2
Link mail statistics to partner (#104)
antespi Aug 8, 2016
e3e595d
[FIX] mass_mailing_partner: Several things:
yajo Sep 12, 2016
ed5fce2
[MIG] mass_mailing_partner: Migration to 10.0
chienandalu Jun 14, 2017
904b76c
[FIX] mass_mailing_partner: Allow unprivileged users to edit partners
yajo Jan 16, 2018
104af8c
[FIX+IMP] mass_mailing_list_dynamic: tests, icons, filters... (#211)
pedrobaeza Feb 2, 2018
c5b15e3
[FIX] mass_mailing_partner: compute fields performance (#271)
chienandalu May 14, 2018
4d623a2
[MIG] mass_mailing_partner: Migration to 11.0
ernestotejeda May 17, 2018
0842b51
[12.0][MIG] mass_mailing_partner: Migration to v12.0
sergio-teruel Nov 9, 2018
ad59671
mass_mailing_partner: Improve wizard behavior
ernestotejeda Nov 17, 2018
3305439
[FIX][12.0][mass_mailing_partner] _check_email_mass_mailing_contacts …
Tonow-c2c Nov 13, 2019
26c3a64
[FIX] mass_mailing_partner: prevent singleton error
chienandalu Nov 20, 2019
94eb4cb
[IMP] mass_mailing_partner: black, isort
Feb 10, 2020
e35d59f
[MIG] mass_mailing_partner: Migration to 13.0
Feb 10, 2020
cca1472
[FIX] mass_mailing_partner: Unsubscribe should not unlink the subscri…
jaredkipe Mar 18, 2020
e4dc07d
[FIX] mass_mailing_partner: Fix partner merge error (dupplicate mass_…
victoralmau Nov 9, 2020
e011d3b
[FIX] mass_mailing_partner: Don't match partner if no email
pedrobaeza Dec 4, 2020
b51278e
[IMP+FIX] mass_mailing_partner: Add partner_name in error constrain m…
victoralmau Dec 11, 2020
459dd38
[FIX] mass_mailing_partner: Use correct button class
Tardo May 21, 2021
3353e11
[IMP] mass_mailing_partner: black, isort, prettier
AreebSiddiqiIR May 27, 2021
8542e3b
[MIG] mass_mailing_partner: Migration to 14.0
AreebSiddiqiIR May 27, 2021
d6e7433
[FIX] mass_mailing_partner: wrong company implementation
chienandalu Sep 22, 2021
2c93eb2
[MIG] mass_mailing_partner: Migration to 15.0
emagdalenaC2i Jan 1, 2022
55af46d
[MIG] mass_mailing_partner: Migration to 16.0
nguyenminhchien Mar 2, 2023
4579ca3
Translated using Weblate (Italian)
mymage Mar 30, 2023
2e6cb0c
Translated using Weblate (Slovenian)
sysadminmatmoz Apr 11, 2023
c351451
Translated using Weblate (Italian)
mymage Jul 28, 2023
360c209
Translated using Weblate (Spanish)
Ivorra78 Aug 27, 2023
c5a501d
Translated using Weblate (Italian)
mymage Dec 7, 2023
eba1070
[IMP] mass_mailing_partner: black, isort, prettier
Mar 7, 2024
455a451
[MIG] mass_mailing_partner: Migration to 17.0
Mar 7, 2024
a2b1ad9
[UPD] Update mass_mailing_partner.pot
Mar 28, 2024
d79a00e
[BOT] post-merge updates
OCA-git-bot Mar 28, 2024
be517ff
Update translation files
weblate Jul 7, 2024
735a4c8
Translated using Weblate (Italian)
mymage Jul 8, 2024
5a94d48
[IMP] mass_mailing_partner: pre-commit auto fixes
kevinkhao Jan 21, 2025
2d8d153
[18.0][MIG] mass_mailing_partner: Migration to 18.0
kevinkhao Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions mass_mailing_partner/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
===============================
Link partners with mass-mailing
===============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8083c5d47fc4880c6cf6633ba03e280336b7e52ba8e332f37b5a1f876bbf20e7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/18.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-18-0/social-18-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=18.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:%2018.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]>

- `360ERP <https://www.360erp.com>`__:

- Kevin Khao

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/18.0/mass_mailing_partner>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions mass_mailing_partner/__init__.py
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
25 changes: 25 additions & 0 deletions mass_mailing_partner/__manifest__.py
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": "18.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,
}
27 changes: 27 additions & 0 deletions mass_mailing_partner/hooks.py
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()
183 changes: 183 additions & 0 deletions mass_mailing_partner/i18n/am.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# 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_list.py:0
#: code:addons/mass_mailing_partner/models/mailing_subscription.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__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_subscription
msgid "Mailing List Subscription"
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.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 ""
Loading
Loading