Odoo Community Association

Mail Attachment XML Preview

Beta License: AGPL-3 OCA/mail Translate me on Weblate Try me on Runboat

Preview XML attachments as a collapsible tree instead of a wall of text.

Odoo stores XML attachments with the text/plain mimetype for any user without write access on views, so the standard file viewer renders them as raw text. Machine-generated XML (electronic invoices such as CFDI or UBL, bank statements, EDI messages) usually comes in a single line, which makes that preview unreadable.

This module renders XML attachments with their hierarchy: indented nodes, highlighted tags, attributes and values, and every branch can be collapsed or expanded. Everything happens in the browser, no conversion service and no extra software on the server.

Table of contents

Usage

  1. Attach an XML file to any record with a chatter, or send it in a message.
  2. Click on the attachment thumbnail.
  3. The file opens in the standard Odoo file viewer as a tree. Click a node to collapse or expand it.

Files that are not well-formed XML (or bigger than 5 MB) fall back to the raw text preview.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Jarsa

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/mail project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.