Skip to content

Commit

Permalink
[MIG] mail_show_follower: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnauCForgeFlow committed Jan 31, 2025
1 parent 967beeb commit ce7e05e
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 69 deletions.
2 changes: 1 addition & 1 deletion mail_show_follower/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "Mail Show Follower",
"summary": "Show CC document followers in mails.",
"version": "16.0.1.2.0",
"version": "17.0.1.0.0",
"category": "Mail",
"website": "https://github.com/OCA/social",
"author": "Sygel, Moduon, Odoo Community Association (OCA)",
Expand Down
9 changes: 8 additions & 1 deletion mail_show_follower/models/mail_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ def remove_p(markup_txt):
)
return full_text

def _send(self, auto_commit=False, raise_exception=False, smtp_session=None):
def _send(
self,
auto_commit=False,
raise_exception=False,
smtp_session=None,
alias_domain_id=False,
):
group_user = self.env.ref("base.group_user")
models_to_exclude = (
self.env["ir.config_parameter"]
Expand Down Expand Up @@ -95,4 +101,5 @@ def _send(self, auto_commit=False, raise_exception=False, smtp_session=None):
auto_commit=auto_commit,
raise_exception=raise_exception,
smtp_session=smtp_session,
alias_domain_id=alias_domain_id,
)
109 changes: 42 additions & 67 deletions mail_show_follower/views/res_config_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,88 +7,63 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="mail.res_config_settings_view_form" />
<field name="arch" type="xml">
<div id="emails" position="inside">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
</div>
<div class="o_setting_right_pane">
<div class="content-group">
<block id="emails" position="inside">
<setting id="mailer_follower_options">
<div class="content-group">
<div>
<label
for="show_internal_users_cc"
string="Show Followers on mails"
/>
<div>
<div>
<label
for="show_internal_users_cc"
class="o_light_label"
string="Show Internal Users on CC"
/>
<field name="show_internal_users_cc" />
</div>
<div>
<label
for="show_followers_message_sent_to"
class="o_light_label"
style="vertical-align: top;"
/>
<field
name="show_followers_message_sent_to"
placeholder="This message has been sent to"
style="display:inline-block;"
/>
</div>
<div>
<label
for="show_followers_partner_format"
class="o_light_label"
style="vertical-align: top;"
/>
<field
name="show_followers_partner_format"
placeholder="%%(partner_name)s &lt;%%(partner_email)s&gt;"
style="display:inline-block;"
/>
</div>
<div>
<label
for="show_followers_message_response_warning"
class="o_light_label"
style="vertical-align: top;"
/>
<field
name="show_followers_message_response_warning"
placeholder="Notice: Replies to this email will be sent to all recipients."
style="display:inline-block;"
/>
</div>
<div>
<label
for="show_followers_models_to_exclude"
string="Models to exclude"
class="o_light_label"
style="vertical-align: top;"
/>
<field
name="show_followers_models_to_exclude"
placeholder="blog.blog,blog.post"
style="display:inline-block;"
/>
</div>
<div class="mt8">
<field name="show_internal_users_cc" class="w-auto" />
<label
for="show_internal_users_cc"
class="o_light_label"
string="Show Internal Users on CC"
/>
</div>
<div class="mt8">
<label for="show_followers_message_sent_to" />
<field
name="show_followers_message_sent_to"
placeholder="This message has been sent to"
class="w-100"
/>
</div>
<div class="row mt8">
<label
for="show_followers_partner_format"
class="col-lg-4"
/>
<field
name="show_followers_partner_format"
placeholder="%%(partner_name)s &lt;%%(partner_email)s&gt;"
/>
</div>
<div class="mt8">
<label for="show_followers_message_response_warning" />
<field
name="show_followers_message_response_warning"
placeholder="Notice: Replies to this email will be sent to all recipients."
class="w-100"
/>
</div>
</div>
<div class="mt8">
<label
for="show_followers_message_preview"
class="text-muted"
/>
<field
name="show_followers_message_preview"
style="width:100%;"
widget="html"
class="w-100"
/>
</div>
</div>
</div>
</div>
</setting>
</block>
</field>
</record>
</odoo>

0 comments on commit ce7e05e

Please sign in to comment.