[FIX] mass_mailing: don't autopublish mailing lists

Purpose:
- Changed the default value of 'Show In Preference' (is_public) field from true
  to false for preventing the automatic publishing of mailing lists.

Task-3594678

closes odoo/odoo#144699

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
Earth Patel
2023-12-14 22:18:38 +00:00
parent 7403a2b7a7
commit 35d5b96d05
6 changed files with 9 additions and 4 deletions
@@ -3,6 +3,7 @@
<data noupdate="1">
<record id="mailing_list_data" model="mailing.list">
<field name="name">Newsletter</field>
<field name="is_public">True</field>
</record>
<record id="mass_mail_contact_0" model="mailing.contact">
<field name="name" model="res.users" eval="obj().env.ref('base.user_admin').name"/>
@@ -4,6 +4,7 @@
<!-- Create Extra Mailing List for Demo -->
<record id="mailing_list_1" model="mailing.list">
<field name="name">Imported Contacts</field>
<field name="is_public">False</field>
</record>
<!-- Create Contacts -->
+1 -1
View File
@@ -4520,7 +4520,7 @@ msgstr ""
#: model:ir.model.fields,help:mass_mailing.field_mailing_list__is_public
msgid ""
"The mailing list can be accessible by recipients in the subscription "
"management page to allows them to update their preferences."
"management page to allow them to update their preferences."
msgstr ""
#. module: mass_mailing
+2 -2
View File
@@ -38,9 +38,9 @@ class MassMailingList(models.Model):
string='Subscription Information',
copy=True, depends=['contact_ids'])
is_public = fields.Boolean(
string='Show In Preferences', default=True,
string='Show In Preferences', default=False,
help='The mailing list can be accessible by recipients in the subscription '
'management page to allows them to update their preferences.')
'management page to allow them to update their preferences.')
# ------------------------------------------------------
# COMPUTE / ONCHANGE
+3 -1
View File
@@ -312,6 +312,7 @@ class MassMailCase(MailCase, MockLinkTracker):
(0, 0, {'name': 'Ybrant', 'email': 'ybrant@example.com'}),
],
'name': 'List1',
'is_public': True,
}, {
'contact_ids': [
(0, 0, {'name': 'Gilberte', 'email': 'gilberte@example.com'}),
@@ -320,13 +321,14 @@ class MassMailCase(MailCase, MockLinkTracker):
(0, 0, {'name': 'Ybrant', 'email': 'ybrant@example.com'}),
],
'name': 'List2',
'is_public': True,
}, {
'contact_ids': [
(0, 0, {'name': 'Déboulonneur', 'email': 'fleurus@example.com'}),
],
'name': 'List3',
'is_public': True,
}, {
'is_public': False,
'name': 'List4',
}
])
@@ -2,6 +2,7 @@
<odoo><data noupdate="0">
<record id="mailing_list_sms_0" model="mailing.list">
<field name="name">Interested in Tree Promotions</field>
<field name="is_public">True</field>
</record>
<record id="mailing_contact_0_0" model="mailing.contact">