[MIG] mass_mailing_partner: Migration to 14.0

[FIX] super(Class, self) changed to super() in mass_mailing_partners
pull/1326/head
Areeb Siddiqi 2021-05-27 14:37:58 -04:00 committed by Mohamed Osman
parent 2009ce45a5
commit 23ee44861d
11 changed files with 47 additions and 35 deletions

View File

@ -14,13 +14,13 @@ Link partners with mass-mailing
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
:target: https://github.com/OCA/social/tree/13.0/mass_mailing_partner :target: https://github.com/OCA/social/tree/14.0/mass_mailing_partner
:alt: OCA/social :alt: OCA/social
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/social-13-0/social-13-0-mass_mailing_partner :target: https://translation.odoo-community.org/projects/social-14-0/social-14-0-mass_mailing_partner
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/205/13.0 :target: https://runbot.odoo-community.org/runbot/205/14.0
:alt: Try me on Runbot :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@ -61,7 +61,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_. 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. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mass_mailing_partner%0Aversion:%2013.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:%20mass_mailing_partner%0Aversion:%2014.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. Do not contact contributors directly about support or help with technical issues.
@ -104,6 +104,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/social <https://github.com/OCA/social/tree/13.0/mass_mailing_partner>`_ project on GitHub. This module is part of the `OCA/social <https://github.com/OCA/social/tree/14.0/mass_mailing_partner>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -6,7 +6,7 @@
{ {
"name": "Link partners with mass-mailing", "name": "Link partners with mass-mailing",
"version": "14.0.1.1.0", "version": "14.0.1.0.0",
"author": "Tecnativa, " "Odoo Community Association (OCA)", "author": "Tecnativa, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social", "website": "https://github.com/OCA/social",
"license": "AGPL-3", "license": "AGPL-3",
@ -14,6 +14,7 @@
"depends": ["mass_mailing"], "depends": ["mass_mailing"],
"post_init_hook": "post_init_hook", "post_init_hook": "post_init_hook",
"data": [ "data": [
"security/ir.model.access.csv",
"views/mailing_trace_view.xml", "views/mailing_trace_view.xml",
"views/mailing_contact_view.xml", "views/mailing_contact_view.xml",
"views/mailing_view.xml", "views/mailing_view.xml",

View File

@ -4,7 +4,7 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 13.0\n" "Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -57,17 +57,35 @@ msgid "Created on"
msgstr "" msgstr ""
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_base_partner_merge_automatic_wizard__display_name
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_contact__display_name
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_contact_subscription__display_name
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_list__display_name
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_trace__display_name
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__display_name #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__display_name
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_partner__display_name
msgid "Display Name" msgid "Display Name"
msgstr "" msgstr ""
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_base_partner_merge_automatic_wizard__id
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_contact__id
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_contact_subscription__id
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_list__id
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_trace__id
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__id #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard__id
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_partner__id
msgid "ID" msgid "ID"
msgstr "" msgstr ""
#. module: mass_mailing_partner #. module: mass_mailing_partner
#: model:ir.model.fields,field_description:mass_mailing_partner.field_base_partner_merge_automatic_wizard____last_update
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_contact____last_update
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_contact_subscription____last_update
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_list____last_update
#: model:ir.model.fields,field_description:mass_mailing_partner.field_mailing_trace____last_update
#: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard____last_update #: model:ir.model.fields,field_description:mass_mailing_partner.field_partner_mail_list_wizard____last_update
#: model:ir.model.fields,field_description:mass_mailing_partner.field_res_partner____last_update
msgid "Last Modified on" msgid "Last Modified on"
msgstr "" msgstr ""

View File

@ -56,7 +56,7 @@ class MailingContact(models.Model):
subscription_list_ids=vals.get("subscription_list_ids", []), subscription_list_ids=vals.get("subscription_list_ids", []),
list_ids=vals.get("list_ids", []), list_ids=vals.get("list_ids", []),
) )
return super(MailingContact, self).create(new_vals) return super().create(new_vals)
def write(self, vals): def write(self, vals):
for contact in self: for contact in self:

View File

@ -32,6 +32,6 @@ class MailingTrace(models.Model):
@api.model @api.model
def create(self, vals): def create(self, vals):
stat = super(MailingTrace, self).create(vals) stat = super().create(vals)
stat.partner_link() stat.partner_link()
return stat return stat

View File

@ -71,7 +71,7 @@ class ResPartner(models.Model):
partner.mass_mailing_stats_count = mapped_data.get(partner.id, 0) partner.mass_mailing_stats_count = mapped_data.get(partner.id, 0)
def write(self, vals): def write(self, vals):
res = super(ResPartner, self).write(vals) res = super().write(vals)
mm_vals = {} mm_vals = {}
if vals.get("name"): if vals.get("name"):
mm_vals["name"] = vals["name"] mm_vals["name"] = vals["name"]

View File

@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_partner_mail_list_wizard,access_partner_mail_list_wizard,model_partner_mail_list_wizard,base.group_user,1,1,1,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_partner_mail_list_wizard access_partner_mail_list_wizard model_partner_mail_list_wizard base.group_user 1 1 1 0

View File

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" 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" href="https://github.com/OCA/social/tree/13.0/mass_mailing_partner"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/social-13-0/social-13-0-mass_mailing_partner"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/205/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" 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" href="https://github.com/OCA/social/tree/14.0/mass_mailing_partner"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/social-14-0/social-14-0-mass_mailing_partner"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/205/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module links mass-mailing contacts with partners.</p> <p>This module links mass-mailing contacts with partners.</p>
<div class="section" id="features"> <div class="section" id="features">
<h1>Features</h1> <h1>Features</h1>
@ -404,7 +404,7 @@ as mailing list contacts.</p>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/social/issues">GitHub Issues</a>. <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. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mass_mailing_partner%0Aversion:%2013.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:%20mass_mailing_partner%0Aversion:%2014.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> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -447,7 +447,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/13.0/mass_mailing_partner">OCA/social</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/14.0/mass_mailing_partner">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> <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>
</div> </div>

View File

@ -10,10 +10,7 @@
<record model="ir.ui.view" id="view_mail_mass_mailing_contact_tree"> <record model="ir.ui.view" id="view_mail_mass_mailing_contact_tree">
<field name="name">mailing.contact.tree.inherit</field> <field name="name">mailing.contact.tree.inherit</field>
<field name="model">mailing.contact</field> <field name="model">mailing.contact</field>
<field <field name="inherit_id" ref="mass_mailing.mailing_contact_view_tree" />
name="inherit_id"
ref="mass_mailing.view_mail_mass_mailing_contact_tree"
/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="email" position="after"> <field name="email" position="after">
<field name="partner_id" /> <field name="partner_id" />
@ -24,10 +21,7 @@
<record model="ir.ui.view" id="view_mail_mass_mailing_contact_form"> <record model="ir.ui.view" id="view_mail_mass_mailing_contact_form">
<field name="name">mailing.contact.form.partner</field> <field name="name">mailing.contact.form.partner</field>
<field name="model">mailing.contact</field> <field name="model">mailing.contact</field>
<field <field name="inherit_id" ref="mass_mailing.mailing_contact_view_form" />
name="inherit_id"
ref="mass_mailing.view_mail_mass_mailing_contact_form"
/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//field[@name='email']/.." position="after"> <xpath expr="//field[@name='email']/.." position="after">
<field name="partner_id" /> <field name="partner_id" />
@ -68,10 +62,7 @@
<record model="ir.ui.view" id="view_mail_mass_mailing_contact_search"> <record model="ir.ui.view" id="view_mail_mass_mailing_contact_search">
<field name="name">Add partner search field and group by</field> <field name="name">Add partner search field and group by</field>
<field name="model">mailing.contact</field> <field name="model">mailing.contact</field>
<field <field name="inherit_id" ref="mass_mailing.mailing_contact_view_search" />
name="inherit_id"
ref="mass_mailing.view_mail_mass_mailing_contact_search"
/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="name" position="after"> <field name="name" position="after">
<field name="partner_id" /> <field name="partner_id" />

View File

@ -22,7 +22,7 @@
context="{'search_default_partner_id': active_id, context="{'search_default_partner_id': active_id,
'default_partner_id': active_id}" 'default_partner_id': active_id}"
type="action" type="action"
class="oe_stat_button" class="oe_stat_button oe_inline"
icon="fa-envelope-o" icon="fa-envelope-o"
> >
<field <field
@ -36,7 +36,7 @@
context="{'search_default_partner_id': active_id, context="{'search_default_partner_id': active_id,
'default_partner_id': active_id}" 'default_partner_id': active_id}"
type="action" type="action"
class="oe_stat_button" class="oe_stat_button oe_inline"
icon="fa-envelope-o" icon="fa-envelope-o"
> >
<field <field

View File

@ -6,14 +6,14 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<odoo> <odoo>
<act_window <record id="action_partner_mail_list" model="ir.actions.act_window">
id="action_partner_mail_list" <field name="name">Add to mailing list</field>
name="Add to mailing list" <field name="res_model">partner.mail.list.wizard</field>
res_model="partner.mail.list.wizard" <field name="target">new</field>
binding_model="res.partner" <field name="view_mode">form</field>
target="new" <field name="binding_model_id" ref="base.model_res_partner" />
view_mode="form" <field name="binding_view_types">list</field>
/> </record>
<record model="ir.ui.view" id="partner_mail_list_wizard_form"> <record model="ir.ui.view" id="partner_mail_list_wizard_form">
<field name="name">partner.mail.list.form</field> <field name="name">partner.mail.list.form</field>