Skip to content

[16.0] [BACKPORT] [MIG] auto_backup_fs_file - #3621

Open
rrebollo wants to merge 8 commits into
OCA:16.0from
BinhexTeam:16.0-mig-auto_backup_fs_file
Open

[16.0] [BACKPORT] [MIG] auto_backup_fs_file#3621
rrebollo wants to merge 8 commits into
OCA:16.0from
BinhexTeam:16.0-mig-auto_backup_fs_file

Conversation

@rrebollo

@rrebollo rrebollo commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Backport of auto_backup_fs_file from v17 to v16, with all improvements from the v18 migration (PR #3619) included.

Commits

Original migration commits

  • [ADD] auto_backup_fs_file: initial module
  • [MIG] auto_backup_fs_file: Migration to 16.0 (backport)

Improvement commits (backport from v18/PR #3619)

F1+F2 — folder visibility and constrains

  • Override folder as required=False for fs_file records
  • Add _check_folder_required_for_method constrains (re-enforces requirement for local/sftp only)
  • Hide folder in form view when method == 'fs_file' (v16 attrs= syntax)
  • Show responsible_id only when method == 'fs_file'

F3 — explicit GC chain in db.backup.fs.file

  • Add @api.depends('db_backup_id.days_to_keep', 'create_date') to _compute_is_expired
  • Add explicit unlink() override to trigger fs_attachment GC stack
  • Remove dead get_fs_storage_filename() method

F4 — cleanup() via GC, not rm_file

  • Remove direct fs.rm_file() call; delegate to ir.attachment.unlink()

F5 — cleanup() reachable from action_backup()

  • Track successful_fs and call cleanup() from action_backup()

F6 — regression test

  • test_action_backup_triggers_cleanup regression test
  • GC chain assertion in test_ordinary_flow
  • assertFalse(backup_config.folder) assertion

Docs + typos

  • Updated ROADMAP, CONTEXT, USAGE; fixed INSTALL.md :wa typo

Related: #3619 (v18), #3683 (v17)

Migrations issue #2412
@BinhexTeam T22571

@OCA-git-bot OCA-git-bot added mod:auto_backup_fs_file Module auto_backup_fs_file series:16.0 labels May 21, 2026
@rrebollo
rrebollo force-pushed the 16.0-mig-auto_backup_fs_file branch from c8ce947 to 1a861a1 Compare May 21, 2026 00:15
@rrebollo
rrebollo marked this pull request as ready for review May 21, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:auto_backup_fs_file Module auto_backup_fs_file series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants