Odoo Community Association

EDI Exchange Deduplicate Payload

Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

Glue between edi_exchange_deduplicate_oca and edi_payload_tracking_oca.

It adds the Deduplicate unchanged payloads option to output exchange types: an exchange whose payload holds nothing new compared with the payload already exported for its record is not sent, and is marked as obsolete instead. The payload of a record deleted meanwhile is not sent either.

Table of contents

Use Cases / Context

Integrations sending only what changed since the last export (see edi_payload_tracking_oca) still include some keys in every payload, e.g. the identifiers the partner needs. An export triggered by a change that does not affect the payload then carries nothing new. Left pending, such an exchange would be queued again by the output cron, forever: marking it as obsolete, as edi_exchange_deduplicate_oca does for superseded exchanges, ends it.

Usage

Tick Deduplicate unchanged payloads on the output exchange type. The model of the exported records must inherit edi.payload.consumer.mixin, and the send handler must store the exported payload after each successful send (record.edi_payload_set_output()).

Before sending, the payload of the exchange (a JSON object) is compared with the stored one through record._edi_payload_has_changes(payload): by default, it has changes when nothing was exported yet, or when a key holds a value different from the stored one. Override this method to refine the comparison for a model.

Records of models that do not track their payload are sent as usual.

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

  • Camptocamp

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.

Current maintainer:

simahawk

This module is part of the OCA/edi-framework project on GitHub.

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