Skip to content

[20.0][MIG] edi_storage_oca: Migration to 20.0 - #392

Draft
dreispt wants to merge 80 commits into
OCA:20.0from
dreispt:20.0-mig-edi_storage_oca
Draft

dreispt wants to merge 80 commits into
OCA:20.0from
dreispt:20.0-mig-edi_storage_oca

Conversation

@dreispt

@dreispt dreispt commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Ports edi_storage_oca — the storage backend adapter that lets EDI exchanges read/write files on fs.storage (SFTP, S3, local FS, ...) — to Odoo 20.0.

This is the last missing piece of the edi_spscommerce dependency chain on 20.0: edi_core_oca (#377), edi_component_oca (#376), edi_queue_oca (#378), edi_record_metadata_oca (#390) and fs_storage (OCA/storage#670) already have migration PRs open.

What changed

  • Version/installable: 20.0.1.0.0, installable: True — same convention as the other 20.0 migration PRs in this repo.
  • Security: the two fs.storage access rules moved from ir.model.access XML to the new ir.access.csv format introduced in Odoo 20 (EDI manager keeps full access, EDI user stays read-only).
  • Binary file handling: edi_core_oca on 20.0 now returns BinaryBytes for exchange_file, so send() reads the content via _get_file_content(as_bytes=True) and passes raw bytes to utils.add_file(..., binary=True) instead of relying on base64 round-tripping. receive() is unchanged — returned bytes are wrapped by _set_file_content() as before.
  • Tests: guarded the edi.framework.test.execution fake-model registration, since EDIBackendCommonTestCase on 20.0 already registers it centrally. Rest is ruff/style modernization required by the repo's current pre-commit config.
  • Generated files: README/description regenerated for the 20.0 branch.

No functional or API changes — the module is a thin adapter and every framework hook it uses (create_record, _find_existing_exchange_records, input_pending state, advanced_settings, handler mixins) is unchanged on 20.0.

Test plan

  • Odoo 20 CI job installs the module and runs its tests (send/receive/check flows, cron input polling, storage event listeners)
  • Depends on the other open 20.0 migration PRs being merged first (edi_core_oca, fs_storage)

Note: test-requirements.txt pins the unreleased deps to their migration branches so CI can install them — same approach as #377. The "Detect unreleased dependencies" check will flag the URLs; that is expected until the deps are released.

Assisted-by: Devin:SWE-2 Flash Medium

simahawk and others added 28 commits November 10, 2026 13:30
Ack files should be treated as incoming records.
Receive files is not handled yet by the framework
and will be added soon.
* A cron job check related storage on edi backends to create the
  needed exchange files.
* Add basic receive component.
…filenames from storage.

Also extend help in `exchange_filename_pattern` field to clarify usage.
when a file is processed the listener will move it to the done
directory or the error directory based on the result of processing
the file.
…ent.

checker is only relevant for output direction.
etobella and others added 20 commits November 10, 2026 13:30
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: edi-framework-18.0/edi-framework-18.0-edi_storage_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_storage_oca/
Currently translated at 100.0% (21 of 21 strings)

Translation: edi-framework-18.0/edi-framework-18.0-edi_storage_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_storage_oca/it/
@dreispt
dreispt force-pushed the 20.0-mig-edi_storage_oca branch from 6ce5b9b to e62a492 Compare November 10, 2026 13:31
@oca-cla-bot

oca-cla-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@dreispt
dreispt force-pushed the 20.0-mig-edi_storage_oca branch 2 times, most recently from 3b80e7c to 05809a8 Compare November 10, 2026 13:37
@dreispt

dreispt commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

/ocabot migration edi_storage_oca

@OCA-git-bot OCA-git-bot added this to the 20.0 milestone Nov 10, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Nov 10, 2026
13 tasks
@dreispt
dreispt force-pushed the 20.0-mig-edi_storage_oca branch from 05809a8 to f2cfecd Compare November 10, 2026 15:38
Port edi_storage_oca from 19.0 to 20.0.

- exchange_file now returns BinaryBytes: read content via
  _get_file_content() and write raw bytes to the storage backend
- move fs.storage access rules to the new ir.access.csv format
- bump version to 20.0.1.0.0 and mark the module installable
- guard fake-model registration in tests (registered by the shared
  test case on 20.0) and apply current pre-commit style rules

Assisted-by: Devin:SWE-2 Flash Medium
@dreispt
dreispt force-pushed the 20.0-mig-edi_storage_oca branch from f2cfecd to b4d5975 Compare November 10, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.