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

[16.0][IMP] mail_debrand: Add remove_href_odoo_special_case #1227

Closed

Conversation

cuongnmtm
Copy link

@cuongnmtm cuongnmtm commented Oct 6, 2023

When rendering the template, the remove_href_odoo function will remove the parent of the element which has 'odoo.com' in href.

There is a problem with mail.template "New Portal Signup", the parent element is almost the whole content hence most of the content will be removed.

image

remove_href_odoo_special_case() is added to handle this special case.

@OCA-git-bot
Copy link
Contributor

Hi @joao-p-marques, @pedrobaeza,
some modules you are maintaining are being modified, check this out!

@cuongnmtm
Copy link
Author

I see the other PR #1215 was added to fix the same issue, but the msg is cut "Have a look at the ", I don't really like that behavior.

image

However, my solution is not generic, tell me if you think we should not need to handle a specific case like this then this PR should be closed.

@cuongnmtm
Copy link
Author

Fix #1090

@cuongnmtm cuongnmtm force-pushed the 16.0-imp-remove_href_odoo_special_case branch 2 times, most recently from f50749e to 7695c5b Compare October 6, 2023 12:30
When rendering the template, the remove_href_odoo function will remove the parent of the <a> element which has 'odoo.com' in href.
There is a problem with mail.template "New Portal Signup", the parent element is almost the whole content hence most of the content will be removed.

remove_href_odoo_special_case() is added to handle this special case.t push
@cuongnmtm cuongnmtm force-pushed the 16.0-imp-remove_href_odoo_special_case branch from 7695c5b to b3ad288 Compare October 6, 2023 12:42
@cuongnmtm
Copy link
Author

I will close this because it doesn't work with translation...

@cuongnmtm cuongnmtm closed this Oct 6, 2023
@cuongnmtm cuongnmtm deleted the 16.0-imp-remove_href_odoo_special_case branch October 6, 2023 13:32
@StefanRijnhart
Copy link
Member

Does #1272 work for you?

@StefanRijnhart
Copy link
Member

Oh, I see you are targeting this template: https://github.com/odoo/odoo/blob/597fc00/addons/auth_signup/data/mail_template_data.xml#L146-L151
It is special case indeed.

@StefanRijnhart
Copy link
Member

I've extended my fix to cover this case. See the second commit on #1272

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.

3 participants