Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][ADD] mail_hide_footer #1600

Open
wants to merge 1 commit into
base: 15.0
Choose a base branch
from

Conversation

AungKoKoLin1997
Copy link
Contributor

@AungKoKoLin1997 AungKoKoLin1997 commented Feb 19, 2025

This module allows hiding the email footer for a specific model by enabling the hide_email_footer option.

@qrtl QT4979

Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about mail_hide_footer_signature as the module name?

Comment on lines 16 to 17
r'<p\s*style\s*=\s*["\']color:\s*#555555;\s*margin-top:\s*32px;["\']>'
r"\s*Sent.*?</p>",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a bit too specific and fragile. I think it may be safer to go with template inheritance.

Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, please change the module name to mail_hide_footer, removing the _signature part.

Please also update the PR title accordingly.

inherit_id="mail.message_notification_email"
>
<xpath
expr="//div[@t-out='signature']/following-sibling::p[1]"
Copy link
Member

@yostashiro yostashiro Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we try this, so that we don't depend on the position of the signature <div>?

Suggested change
expr="//div[@t-out='signature']/following-sibling::p[1]"
expr="//span[@t-if='company.name']/parent::p"

@yostashiro
Copy link
Member

@AungKoKoLin1997 Can you please add tests.

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-email_hide_footer branch from 38de628 to 3642a5b Compare February 20, 2025 04:20
@AungKoKoLin1997 AungKoKoLin1997 changed the title [15.0][ADD] email_hide_footer [15.0][ADD] mail_hide_footer Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants