[17][MIG] mail_optional_autofollow: Migration to 17.0

pull/1362/head
Aurelija Vitkauskienė 2024-05-06 18:27:21 +03:00
parent 750cb03335
commit 55fc7d9eed
5 changed files with 12 additions and 12 deletions

View File

@ -8,7 +8,7 @@
"author": "ACSONE SA/NV," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social",
"category": "Social Network",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"depends": ["mail"],
"data": ["wizard/mail_compose_message_view.xml"],

View File

@ -4,8 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Project-Id-Version: Odoo Server 17.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-06 15:24+0000\n"
"PO-Revision-Date: 2024-05-06 15:24+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -19,13 +21,11 @@ msgid "Email composition wizard"
msgstr ""
#. module: mail_optional_autofollow
#: model:ir.model.fields,field_description:mail_optional_autofollow.field_account_invoice_send__autofollow_recipients
#: model:ir.model.fields,field_description:mail_optional_autofollow.field_mail_compose_message__autofollow_recipients
msgid "Make recipients followers"
msgstr ""
#. module: mail_optional_autofollow
#: model:ir.model.fields,help:mail_optional_autofollow.field_account_invoice_send__autofollow_recipients
#: model:ir.model.fields,help:mail_optional_autofollow.field_mail_compose_message__autofollow_recipients
msgid ""
"if checked, the additional recipients will be added as followers on "

View File

@ -6,7 +6,7 @@ from odoo.tests import common
class TestAttachExistingAttachment(common.TransactionCase):
def setUp(self):
super(TestAttachExistingAttachment, self).setUp()
super().setUp()
self.partner_obj = self.env["res.partner"]
self.partner_01 = self.env.ref("base.res_partner_10")
self.partner_02 = self.env.ref("base.res_partner_address_17")
@ -16,15 +16,15 @@ class TestAttachExistingAttachment(common.TransactionCase):
ctx.update(
{
"default_model": "res.partner",
"default_res_id": self.partner_01.id,
"default_res_ids": self.partner_01.ids,
"default_composition_mode": "comment",
}
)
mail_compose = self.env["mail.compose.message"]
values = mail_compose.with_context(**ctx)._onchange_template_id(
False, "comment", "res.partner", self.partner_01.id
)["value"]
values["partner_ids"] = [(4, self.partner_02.id)]
values = {
"partner_ids": [(4, self.partner_02.id)],
"composition_mode": "comment",
}
compose_id = mail_compose.with_context(**ctx).create(values)
compose_id.autofollow_recipients = False
compose_id.with_context(**ctx).action_send_mail()

View File

@ -9,7 +9,7 @@ class MailComposeMessage(models.TransientModel):
@api.model
def default_get(self, fields_list):
res = super(MailComposeMessage, self).default_get(fields_list)
res = super().default_get(fields_list)
res.setdefault(
"autofollow_recipients", self.env.context.get("mail_post_autofollow", False)
)

View File

@ -8,7 +8,7 @@
<xpath expr="//div[field[@name='partner_ids']]" position="after">
<field
name="autofollow_recipients"
attrs="{'invisible': [('composition_mode', '=', 'mass_mail')]}"
invisible="composition_mode == 'mass_mail'"
/>
</xpath>
</field>