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

[IMP] {google_,microsoft_}calendar: utilize description method #147477

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

Conversation

mrsr-odoo
Copy link
Contributor

@mrsr-odoo mrsr-odoo commented Dec 26, 2023

This commit does the following-
-Makes _get_customer_description to return HTML data.
-Replace the description field with _get_customer_description for google_calendar and
microsoft_calendar syncs.

Task-3458669

@robodoo
Copy link
Contributor

robodoo commented Dec 26, 2023

@C3POdoo C3POdoo added the RD research & development, internal work label Dec 26, 2023
@mrsr-odoo mrsr-odoo force-pushed the master-appointment-imp-clarify-description-mrsr branch 3 times, most recently from e71bbee to e9c53ae Compare December 27, 2023 12:55
@mrsr-odoo mrsr-odoo changed the title [IMP] calendar: add new computed field [IMP] {google_,microsoft_}calendar: add new computed field Dec 27, 2023
@tde-banana-odoo tde-banana-odoo marked this pull request as ready for review January 15, 2024 10:20
@C3POdoo C3POdoo requested a review from a team January 15, 2024 10:21
@mrsr-odoo mrsr-odoo force-pushed the master-appointment-imp-clarify-description-mrsr branch 4 times, most recently from 85875fb to 9f07fd1 Compare January 17, 2024 05:19
Copy link
Contributor

@tde-banana-odoo tde-banana-odoo left a comment

Choose a reason for hiding this comment

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

Zboing !

@@ -1361,7 +1361,7 @@ def ics_datetime(idate, allday=False):

def _get_customer_description(self):
""":return (str): The description to include in calendar exports"""
return html2plaintext(self.description) if self.description else ''
return self.description if self.description else ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Could probably use is_html_emptyby the way

addons/calendar/models/calendar_event.py Show resolved Hide resolved
@@ -298,7 +298,7 @@ def _google_values(self):
'start': start,
'end': end,
'summary': self.name,
'description': tools.html_sanitize(self.description) if not tools.is_html_empty(self.description) else '',
'description': tools.html_sanitize(self._get_customer_description()) if not tools.is_html_empty(self._get_customer_description()) else '',
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be more interesting that _get_customer_description returns a sanitized / validated / Markupized html so that callers don't have to deal with the output and can consider it is safe

@mrsr-odoo mrsr-odoo force-pushed the master-appointment-imp-clarify-description-mrsr branch from 9f07fd1 to d6e5d79 Compare January 18, 2024 09:47
@mrsr-odoo
Copy link
Contributor Author

hello @tde-banana-odoo ,
Suggested changes are done
Please have a look
Thanks !!

@mrsr-odoo mrsr-odoo force-pushed the master-appointment-imp-clarify-description-mrsr branch from d6e5d79 to a7f5d7e Compare March 22, 2024 10:11
@mrsr-odoo mrsr-odoo force-pushed the master-appointment-imp-clarify-description-mrsr branch 3 times, most recently from f4eed2a to c440f82 Compare May 17, 2024 10:31
@mrsr-odoo mrsr-odoo changed the title [IMP] {google_,microsoft_}calendar: add new computed field [IMP] {google_,microsoft_}calendar: utilize description method May 22, 2024
@mrsr-odoo mrsr-odoo force-pushed the master-appointment-imp-clarify-description-mrsr branch 2 times, most recently from aa5a27e to 5c18efb Compare June 4, 2024 09:56
This commit does the following-
-Makes _get_customer_description to return HTML data.
-Replace the description field with _get_customer_description for google_calendar and
microsoft_calendar syncs.

Task-3458669
@mrsr-odoo mrsr-odoo force-pushed the master-appointment-imp-clarify-description-mrsr branch from 5c18efb to 3f34240 Compare June 6, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants