Skip to content

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

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

[19.0][MIG] attachment_synchronize: Migration to 19.0#3615
dnplkndll wants to merge 112 commits into
OCA:19.0from
ledoent:19.0-mig-attachment_synchronize

Conversation

@dnplkndll
Copy link
Copy Markdown
Contributor

@dnplkndll dnplkndll commented May 20, 2026

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).

@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 6 times, most recently from b22b098 to 3df3a8d Compare May 20, 2026 14:17
Kev-Roche and others added 19 commits May 20, 2026 10:31
- remove tracking_model (less model, less code, less issue)
- add automatic rule for default config (this avoid missing tracked field
after module installation)
For example on the product if you open the 'stock.putaway.rule'
you have activated the tracking on putaway_rule_ids
change on rule should be posted on the related product
- track m2m simplify using native mail_thread and process them like text
- simplify code for track one2many
- avoid useless code on model not impacted by the tracking
Instead of complexe tracking throught the context
just track change and process the message at the end
using the precommit feature (the message are posted
just before commiting)
Co-authored-by: Yoshi Tashiro (Quartile) <tashiro@quartile.co>
Ivorra78 and others added 19 commits May 20, 2026 10:31
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
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
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/
Signed-off-by: Don Kendall <dkendall@ledoweb.com>
@dnplkndll dnplkndll force-pushed the 19.0-mig-attachment_synchronize branch 4 times, most recently from 3a9ab32 to 46aa944 Compare May 20, 2026 15:46
dnplkndll added 2 commits May 20, 2026 11:54
* 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>
Pip-installs attachment_queue from the upstream PR branch via whool until
OCA#3614 merges and the 19.0 wheel publishes. Revert this commit before
merge.

Signed-off-by: Don Kendall <dkendall@ledoweb.com>
@dnplkndll dnplkndll force-pushed the 19.0-mig-attachment_synchronize branch 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
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.