Skip to content

[19.0][MIG] edi_endpoint_oca: Migration to V19#262

Open
yankinmax wants to merge 39 commits intoOCA:19.0from
camptocamp:19.0-mig-edi_endpoint_oca
Open

[19.0][MIG] edi_endpoint_oca: Migration to V19#262
yankinmax wants to merge 39 commits intoOCA:19.0from
camptocamp:19.0-mig-edi_endpoint_oca

Conversation

@yankinmax
Copy link
Copy Markdown
Contributor

@yankinmax yankinmax commented Apr 6, 2026

Standard migration.

Replaces #256

Depends on:

This PR is opened to speed up migration to 19.0.

@yankinmax yankinmax force-pushed the 19.0-mig-edi_endpoint_oca branch 5 times, most recently from 6cc60cd to 591bd6e Compare April 6, 2026 14:52
Copy link
Copy Markdown
Contributor

@vvrossem vvrossem left a comment

Choose a reason for hiding this comment

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

Migration commit LG


@unittest.skipIf(os.getenv("SKIP_HTTP_CASE"), "EDIEndpointHttpCase skipped")
class EDIEndpointHttpCase(HttpCase):
class EDIEndpointHttpCase(HttpCase, CommonEDIEndpoint):
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.

This is mixing 2 different base test classes. We might have weird behaviors.
Options:

  1. import setup methods and use them directly in setUpClass
  2. do not make CommonEDIEndpoint inherit from TransactionCase and make it a bare mixin class w/ a _setup_endpoint_env general setup method that you can call here in setUpClass

@OCA-git-bot OCA-git-bot added series:19.0 mod:edi_endpoint_oca Module edi_endpoint_oca and removed approved labels Apr 14, 2026
@yankinmax yankinmax force-pushed the 19.0-mig-edi_endpoint_oca branch from 4cec69a to d5ca3f0 Compare April 20, 2026 11:18
@yankinmax
Copy link
Copy Markdown
Contributor Author

yankinmax commented Apr 20, 2026

Hello @simahawk
I suppose I've changed the code the way you suggest.
The tests are failing for some reason I can't get.
Locally no issue

@simahawk
Copy link
Copy Markdown
Contributor

probably because of OCA/oca-addons-repo-template#344
we need to update the repo/branch

@simahawk
Copy link
Copy Markdown
Contributor

/ocabot migration edi_endpoint_oca

simahawk and others added 26 commits April 20, 2026 18:04
I don't know why but  when test_edi_endpoint runs before these tests
the rollback of the exception catched within the test `test_archive_check`
make the controller lookup fail.
Since the whole routing registry machinery is going to be refactored
in OCA/edi#633
let's survive w/ this forced registration for now.
Former version of `endpoint_route_handler` had a major flaw:

routing rule registry was not properly shared across workers
forcing us to restart the instance to make sure all envs were inline w/
it.

This change adapts edi_endpoint_oca to the new version which contains
some refactoring.
It's very handy to know which endpoint generated a record.
Moved from OCA/edi repository
The new mixin view won't be affected by weird extensions.

Requires OCA/web-api#56
Solves conflict w/ OCA/web-api-contrib#1
Currently translated at 1.9% (1 of 51 strings)

Translation: edi-framework-16.0/edi-framework-16.0-edi_endpoint_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-16-0/edi-framework-16-0-edi_endpoint_oca/it/
edi.endpoint views must be independent
that's why primary mode is used.
endpoint.endpoint views might be polluted
by other modules: this change ensures they are isolated.

Depends on  OCA/web-api#87
If record field value is already True, impossible to sync the registry
A new route parameter has been introduced and for existing endpoints to work OOTB we must resync.
Currently translated at 100.0% (51 of 51 strings)

Translation: edi-framework-18.0/edi-framework-18.0-edi_endpoint_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_endpoint_oca/it/
Setting the file content after creating the record
might lead to errors when the exchange type is has quick_exec enabled.
That's because the backend will try to process the file immediately on create
but there's no file content yet.

Just populate the file content right away.
@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Apr 20, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Apr 20, 2026
22 tasks
@yankinmax yankinmax force-pushed the 19.0-mig-edi_endpoint_oca branch from d5ca3f0 to eb1f73f Compare April 20, 2026 15:04
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.