Skip to content

[19.0][MIG] attachment_synchronize: Migration to 19.0 - #3615

Open
dnplkndll wants to merge 58 commits into
OCA:19.0from
ledoent:19.0-mig-attachment_synchronize
Open

dnplkndll wants to merge 58 commits into
OCA:19.0from
ledoent:19.0-mig-attachment_synchronize

Conversation

@dnplkndll

@dnplkndll dnplkndll commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

Port of attachment_synchronize from 18.0 to 19.0. Follows the OCA migration guide.

Depends on #3614. The [DO NOT MERGE] commit installs attachment_queue via whool from the open-PR branch until #3614 merges and the 19.0 wheel publishes; the pin is reverted before merge.

Non-mechanical adaptations:

  • Test fixtures (fs.storage backend + 6 tasks) built inline in tests/common.py::setUpClass — OCA CI doesn't load demo data, and fs_storage 19.0 also dropped its fs_storage_demo record.
  • Registry.enter_test_mode(cr) → self.registry_enter_test_mode() in test_import.py (API moved from the Registry to the TestCase in 19).

AI-assisted (Claude Code); every change reviewed, tested, and owned by the author.

@OCA-git-bot OCA-git-bot added series:19.0 mod:attachment_synchronize Module attachment_synchronize labels May 20, 2026
@legalsylvain
legalsylvain marked this pull request as draft May 20, 2026 06:00
@dnplkndll
dnplkndll force-pushed the 19.0-mig-attachment_synchronize branch 11 times, most recently from 46aa944 to 50fac2f Compare May 20, 2026 15:54
@dnplkndll

Copy link
Copy Markdown
Contributor Author

@florian-dacosta @sebastienbeau

Depends on #3614

Two test fixtures rebuilt for the no-demo CI posture: setUpClass creates the fs.storage backend + import/export tasks inline (was env.ref to fs_storage.fs_storage_demo and own demo XML, neither loaded in CI); test_import.py uses self.registry_enter_test_mode() in place of the gone Registry.enter_test_mode(cr)

@dnplkndll
dnplkndll marked this pull request as ready for review May 20, 2026 16:46
@dnplkndll
dnplkndll force-pushed the 19.0-mig-attachment_synchronize branch 2 times, most recently from 4e063e4 to 50fac2f Compare May 29, 2026 20:22
@dnplkndll
dnplkndll force-pushed the 19.0-mig-attachment_synchronize branch from 50fac2f to ce73c7e Compare June 22, 2026 18:33
@CRogos

CRogos commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

@dnplkndll can you rebase/remove tracking_manager (also #3614)

oca-travis and others added 22 commits November 19, 2026 08:20
…ng files even if the path ends with the folder separator
Currently translated at 100.0% (67 of 67 strings)

Translation: server-tools-16.0/server-tools-16.0-attachment_synchronize
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_synchronize/it/
Currently translated at 4.4% (3 of 67 strings)

Translation: server-tools-16.0/server-tools-16.0-attachment_synchronize
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_synchronize/es/
Currently translated at 100.0% (67 of 67 strings)

Translation: server-tools-16.0/server-tools-16.0-attachment_synchronize
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_synchronize/es/
Currently translated at 100.0% (67 of 67 strings)

Translation: server-tools-16.0/server-tools-16.0-attachment_synchronize
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_synchronize/it/
…ver :

If one task is failing, keep processing the others
Commit fir attachment imported after each file to be sure not to loose any data, when deleting on remote after import for example
Currently translated at 100.0% (76 of 76 strings)

Translation: server-tools-16.0/server-tools-16.0-attachment_synchronize
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_synchronize/it/
Currently translated at 100.0% (76 of 76 strings)

Translation: server-tools-16.0/server-tools-16.0-attachment_synchronize
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_synchronize/it/
The goal is to be able easy overrides to pass custom parameters to the fsspec open method
It was like this before and it is now supported by sshfs. open + read is slower and less reliable
Currently translated at 100.0% (76 of 76 strings)

Translation: server-tools-16.0/server-tools-16.0-attachment_synchronize
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_synchronize/it/
@dnplkndll
dnplkndll force-pushed the 19.0-mig-attachment_synchronize branch from ce73c7e to cb51f98 Compare November 19, 2026 14:34

@CRogos CRogos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code LGTM, but not tested.

This module allows to **import/export files** from/to backend servers.

A backend server is defined by the basic
[fs_storage](https://github.com/OCA/storage/tree/16.0/fs_storage) OCA

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Update version ore are relative links possible?

florian-dacosta and others added 5 commits November 19, 2026 16:27
Signed-off-by: Don Kendall <dkendall@ledoweb.com>
Assisted-by: Claude Opus 5
* Delete migrations/18.0.1.0.0/ (T08)
* odoo.osv.expression → odoo.fields.Domain
* tracking_disable=True added to SyncCommon.setUpClass
* Test fixtures (fs.storage backend + tasks) built inline in setUpClass;
  demo XML ships its own fs.storage record (fs_storage 19.0 dropped
  fs_storage_demo)
* Registry.enter_test_mode(cr) → self.registry_enter_test_mode() in
  test_import.py

Signed-off-by: Don Kendall <dkendall@ledoweb.com>
Assisted-by: Claude Opus 5
Pip-installs attachment_queue from the upstream PR branch via whool until
merge.

Signed-off-by: Don Kendall <dkendall@ledoweb.com>
Assisted-by: Claude Opus 5
@dnplkndll
dnplkndll force-pushed the 19.0-mig-attachment_synchronize branch from cb51f98 to 8f9f543 Compare November 20, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.