Tuesday, October 22, 2024
2 changes · saas-17.4
Resolved issues and error corrections
Tax descriptions now appear as readable plain text in field service reports instead of showing raw HTML tags. This prevents blank descriptions and formatted descriptions from creating confusing report output for customers and staff.
Original PR description
Issue: - Tax descriptions in the field service report contain HTML tags, leading to undesirable formatting. - Tax descriptions that are empty result in `<p><br></p>` being printed. - Tax descriptions…
Issue: - Tax descriptions in the field service report contain HTML tags, leading to undesirable formatting. - Tax descriptions that are empty result in `<p><br></p>` being printed. - Tax descriptions with content result in `<p>[description]</p>` being printed. Steps To Reproduce: - Create a field service task and add products on it. - Add a Sales Order Item that has taxes. - Print the field service report. - Notice when the taxes has no description it print `<p><br><p>`. - Notice when the taxes has has something in the [description] field it print `<p>[description]><p>`. Solution: - In the `account.tax` model, the description field was changed to an HTML field with this commit: https://github.com/odoo/odoo/commit/112c68a - Added `_get_description_plaintext` method to convert HTML content to plaintext using `html2plaintext`. This will also ensure compatibility for future changes to the description field. - related enterprise fix: https://github.com/odoo/enterprise/pull/68454 opw-4104951 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Field service reports now show tax descriptions as plain readable text instead of displaying raw HTML tags. This prevents confusing placeholders or formatting artifacts from appearing on printed customer reports.
Original PR description
## Issue: - Tax descriptions in the field service report contain HTML tags, leading to undesirable formatting. - Tax descriptions that are empty result in `<p><br></p>` being printed. - Tax…
## Issue: - Tax descriptions in the field service report contain HTML tags, leading to undesirable formatting. - Tax descriptions that are empty result in `<p><br></p>` being printed. - Tax descriptions with content result in `<p>[description]</p>` being printed. ## Steps To Reproduce: - Create a field service task and add products on it. - Add a Sales Order Item that has taxes. - Print the field service report. - Notice when the taxes has no description it print `<p><br><p>`. - Notice when the taxes has has something in the [description] field it print `<p>[description]><p>`. ## Solution: - In the `account.tax` model, the description field was changed to an HTML field with this commit: https://github.com/odoo/odoo/commit/112c68a07b817e5e9a6c01e34a0fe7238b2eaa07 - Added `_get_description_plaintext` method to convert HTML content to plaintext using `html2plaintext`. This will also ensure compatibility for future changes to the description field. related community fix: https://github.com/odoo/odoo/pull/184053 opw-4104951