Skip to main content

Helpdesk Ticket Track Fetchmail Fix

helpdesk_mgmt overrides _message_track_post_template to force a “stage changed” notification on tickets created from the mail gateway:

def _message_track_post_template(self, changes):
    if (
        self._context.get("default_fetchmail_server_id")
        and self._name == "helpdesk.ticket"
    ):
        changes.append("stage_id")
    return super()._message_track_post_template(changes)

This assumes changes is always a list. Odoo core calls this method with a set (or None) when it runs from mail.thread._track_finalize, the precommit hook triggered inside fetchmail.py’s cr.commit(). Neither has an .append method, so this raises AttributeError: 'set' object has no attribute 'append'.

Because this happens inside cr.commit(), after the incoming email has already been flagged \\Seen on the mail server but before the new ticket is committed to the database, the ticket creation is rolled back while the email is never fetched again (the IMAP search only looks for UNSEEN messages). The email is effectively lost, without any error visible to the end user.

This module fixes it by normalizing changes to a list before it reaches helpdesk_mgmt’s override, without altering the intended behaviour (forcing the stage-change notification for tickets created by email).

Table of contents

Configuration

No configuration needed for this module.

Usage

No user-facing changes. Just install this module alongside helpdesk_mgmt to prevent tickets created from incoming email from being silently lost.

Known issues / Roadmap

If a future version of helpdesk_mgmt fixes this upstream, this module becomes a no-op and can be removed. Version 17 of helpdesk_mgmt does not have this issue because there is no overriding of _message_track_post_template in that version.

Bug Tracker

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

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

Credits

Authors

  • Som Connexio SCCL

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.

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

Metadata

Release files for odoo-addon-helpdesk-ticket-track-fetchmail-fix 16.0.1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for odoo-addon-helpdesk-ticket-track-fetchmail-fix 16.0.1.0.0
File Size Uploaded Provenance
odoo_addon_helpdesk_ticket_track_fetchmail_fix-16.0.1.0.0.tar.gz 2.7 kB Without provenance Details

Release files / odoo_addon_helpdesk_ticket_track_fetchmail_fix-16.0.1.0.0.tar.gz

Download URL odoo_addon_helpdesk_ticket_track_fetchmail_fix-16.0.1.0.0.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fbf23b57ce10d8dceb7e41badbbd2682f71675e800856eb161c7ab67860eaeab
BLAKE2b-256 checksum
How to use checksums
4d45fbbf47672fc8b42e14852f7848685f09c982736aa1cdc1b24c5a4a0ca97b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Security for odoo-addon-helpdesk-ticket-track-fetchmail-fix 16.0.1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

16.0.1.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page