Skip to content

Commit

Permalink
[16.0][MIG] outgoing_email_by_model: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliesoutiras committed Dec 11, 2024
1 parent 6914d70 commit 980547b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion outgoing_email_by_model/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Outgoing Email by Model",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Social",
"website": "https://github.com/OCA/social",
"author": "Camptocamp, Odoo Community Association (OCA)",
Expand Down
8 changes: 6 additions & 2 deletions outgoing_email_by_model/models/mail_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
class MailThread(models.AbstractModel):
_inherit = "mail.thread"

def _notify_by_email_add_values(self, base_values):
res = super()._notify_by_email_add_values(base_values)
def _notify_by_email_get_final_mail_values(
self, recipient_ids, base_mail_values, additional_values=None
):
res = super()._notify_by_email_get_final_mail_values(
recipient_ids, base_mail_values, additional_values=additional_values
)
model = self.env["ir.model"].sudo().search([("model", "=", self._name)])
custom_mailserver = model.outgoing_mailserver_id
if custom_mailserver:
Expand Down
1 change: 1 addition & 0 deletions outgoing_email_by_model/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* Matthieu Méquignon <matthieu.mequignon@camptocamp.com>
* Emilie SOUTIRAS <emilie.soutiras@groupevoltaire.com>
2 changes: 2 additions & 0 deletions outgoing_email_by_model/views/ir_model.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
<field name="is_mail_blacklist" position="after">
<field
name="outgoing_mailserver_id"
groups="base.group_no_one"
attrs="{'invisible': [('is_mail_thread', '=', False)], 'readonly': [('is_mail_thread', '=', False)]}"
/>
<field
name="outgoing_email"
groups="base.group_no_one"
attrs="{'invisible': [('is_mail_thread', '=', False)], 'readonly': [('is_mail_thread', '=', False)]}"
/>
</field>
Expand Down

0 comments on commit 980547b

Please sign in to comment.