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
Contributors
-
Gerard Funosas <gerard.funosas@somconnexio.coop>
-
Álvaro García <alvaro.garcia@somit.coop>
Maintainers
This module is maintained by the OCA.
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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| odoo_addon_helpdesk_ticket_track_fetchmail_fix-16.0.1.0.1.tar.gz | 4.8 kB | Without provenance | Details |
Release files / odoo_addon_helpdesk_ticket_track_fetchmail_fix-16.0.1.0.1.tar.gz
| Download URL | odoo_addon_helpdesk_ticket_track_fetchmail_fix-16.0.1.0.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c106ec7b5b48de6a5c41adf68e1ba90ae8667612ee126f94841731ddac4bacac
|
|
BLAKE2b-256 checksum How to use checksums |
d637e155ab0d116fe3a21216ab02d720b6233817e70ad2c07761576a03bb6979
|
| 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.1
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.