Skip to content

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

Closed
dnplkndll wants to merge 72 commits into
19.0from
19.0-mig-attachment_synchronize
Closed

dnplkndll wants to merge 72 commits into
19.0from
19.0-mig-attachment_synchronize

Conversation

@dnplkndll

Copy link
Copy Markdown

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

What changed

  • Manifest → 19.0.1.0.0.
  • Deleted migrations/18.0.1.0.0/ — pre-migrate script no longer applies in 19.0 (T08).
  • odoo.osv.expression → odoo.fields.Domain: import + expression.AND([d, ...]) → Domain.AND(d, ...) (variadic) in run_task_import_scheduler.
  • tracking_disable=True added to SyncCommon.setUpClass (covers test_export and test_import via inheritance).
  • README regenerated.

Known blocker — CI install fail

attachment_synchronize depends on attachment_queue, which is not yet on OCA/server-tools 19.0 — it's in ledoent/server-tools#2, our fork PR awaiting upstream. Until that lands, test with Odoo / test with OCB will fail at install ("No matching distribution found for odoo-addon-attachment_queue==19.0.*"). The migration code itself is complete and reviewable; CI will go green automatically once attachment_queue lands on OCA/19.0.

florian-dacosta and others added 30 commits May 19, 2026 16:21
- match pattern filename to download
- empty list as default domain
- prefer enabled in place of active
- log info on run completed
- correct `directory_output` value

- mute logger for desired raise exception

- change how the "already imported files" are checked when
"check_duplicated_files = True" :
It occurs that a task o2m field `attachment_ids` returns an empty record
when checked during the `_file_to_import()` method... but only when
the module `autovacuum_message_attachment` is installed !
clementmbr and others added 27 commits May 19, 2026 16:21
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% (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
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/
* Manifest version → 19.0.1.0.0 (T07).
* Delete migrations/18.0.1.0.0/ — pre-migrate script no longer applies in 19.0 (T08).
* odoo.osv.expression → odoo.fields.Domain: import + the one expression.AND([d, ...])
  call in run_task_import_scheduler rewritten as variadic Domain.AND(d, ...).
* tracking_disable=True added to SyncCommon.setUpClass test context (covers
  test_export, test_import via inheritance).
* README.rst + static/description/index.html regenerated from readme/ fragments.

CI dep-chain note: attachment_synchronize depends on attachment_queue, which
is not yet on OCA/server-tools 19.0 (it's in #2, our fork
PR awaiting upstream). Until that lands, `test with Odoo` / `test with OCB`
will fail at the install step ("No matching distribution found for
odoo-addon-attachment_queue==19.0.*"). The migration code itself is complete
and reviewable; CI will go green automatically once attachment_queue lands
on OCA/19.0.

Signed-off-by: Don Kendall <dkendall@ledoweb.com>
…en PR branch

Until #2 merges and the 19.0 wheel publishes, pip-install
attachment_queue from the open migration PR branch via whool. Must be reverted
before this PR is filed upstream to OCA.
@dnplkndll
dnplkndll force-pushed the 19.0-mig-attachment_synchronize branch from 6b1b665 to ecdcfd2 Compare May 20, 2026 02:08
@dnplkndll

Copy link
Copy Markdown
Author

Filed upstream as OCA#3615 — closing mirror, branch retained.

@dnplkndll dnplkndll closed this May 20, 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.