Skip to content

[18.0][IMP] edi_core_oca: add backend-controlled auto-cleanup for exchange records#233

Open
Ricardoalso wants to merge 2 commits intoOCA:18.0from
camptocamp:edi_exchange_record_cleaning
Open

[18.0][IMP] edi_core_oca: add backend-controlled auto-cleanup for exchange records#233
Ricardoalso wants to merge 2 commits intoOCA:18.0from
camptocamp:edi_exchange_record_cleaning

Conversation

@Ricardoalso
Copy link
Contributor

@Ricardoalso Ricardoalso commented Feb 13, 2026

This pull request introduces automated maintenance for EDI exchange records. The most significant changes are the addition of scheduled jobs to archive and delete old EDI records and the introduction of an active flag for EDI records.

Changes:

  • Add "Auto Cleanup" tab in backend form view for easy configuration
  • Add archive cron job that respect backend-specific retention policies
  • Add delete cron job that respect backend-specific retention policies
  • Add "Archived" filter to exchange record search view

Benefits:

  • Each backend can have different retention policies
  • Setting fields to 0 (default value) disables the respective cleanup behavior
  • More flexible data retention management
  • Better control over storage and performance optimization

The cron jobs iterate through backends with configured retention
settings, applying appropriate cutoff values.

@OCA-git-bot
Copy link
Contributor

Hi @simahawk, @etobella,
some modules you are maintaining are being modified, check this out!

@Ricardoalso Ricardoalso force-pushed the edi_exchange_record_cleaning branch from ca3e2f9 to 90cc5e6 Compare February 13, 2026 09:23
Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to do that, we need to at least add a way to decide which records can be archived. IMO, we should add a flag on exchange type or backends for that.

@Ricardoalso Ricardoalso marked this pull request as draft February 13, 2026 09:26
@Ricardoalso Ricardoalso changed the title [18.0][IMP] edi_core_oca: automated edi.exchange.record record maintenance [18.0][IMP] edi_core_oca: add backend-controlled auto-cleanup for exchange records Feb 13, 2026
…records

Add configurable auto-archiving and auto-deletion of EDI exchange records
per backend. This backend-specific settings that can be managed individually.

Changes:
- Add "Auto Cleanup" tab in backend form view for easy configuration
- Add archive cron job that respect backend-specific retention policies
- Add delete cron job that respect backend-specific retention policies
- Add "Archived" filter to exchange record search view

Benefits:
- Each backend can have different retention policies
- Setting fields to 0 (default value) disables the respective cleanup behavior
- More flexible data retention management
- Better control over storage and performance optimization

The cron jobs iterate through backends with configured retention
settings, applying appropriate cutoff values.
@Ricardoalso Ricardoalso force-pushed the edi_exchange_record_cleaning branch from e551b22 to 9d3fe03 Compare February 13, 2026 12:23
@Ricardoalso Ricardoalso marked this pull request as ready for review February 13, 2026 12:34
@Ricardoalso
Copy link
Contributor Author

If we want to do that, we need to at least add a way to decide which records can be archived. IMO, we should add a flag on exchange type or backends for that.

Hey @etobella, thanks for the early review, you were too fast for me! 😄

Following @simahawk’s suggestion, I added the configuration to the edi.backend model and kept them disabled by default.

@Ricardoalso Ricardoalso changed the title [18.0][IMP] edi_core_oca: add backend-controlled auto-cleanup for exchange records [18.0][PERF] edi_core_oca: add backend-controlled auto-cleanup for exchange records Feb 13, 2026
@Ricardoalso Ricardoalso changed the title [18.0][PERF] edi_core_oca: add backend-controlled auto-cleanup for exchange records [18.0][IMP] edi_core_oca: add backend-controlled auto-cleanup for exchange records Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments