[MIG] mass_mailing_partner: Migration to 14.0

[FIX] super(Class, self) changed to super() in mass_mailing_partners
This commit is contained in:
Areeb Siddiqi 2021-05-27 14:37:58 -04:00 committed by emagdalenaC2i
parent 789343cc9c
commit ff33c3a924
8 changed files with 20 additions and 26 deletions

View File

@ -6,7 +6,7 @@
{
"name": "Link partners with mass-mailing",
"version": "14.0.1.1.0",
"version": "14.0.1.0.0",
"author": "Tecnativa, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social",
"license": "AGPL-3",
@ -14,6 +14,7 @@
"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",

View File

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

View File

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

View File

@ -71,7 +71,7 @@ class ResPartner(models.Model):
partner.mass_mailing_stats_count = mapped_data.get(partner.id, 0)
def write(self, vals):
res = super(ResPartner, self).write(vals)
res = super().write(vals)
mm_vals = {}
if vals.get("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

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

View File

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

View File

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