Skip to content

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

Open
yankinmax wants to merge 38 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 38 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.

Depends on:

This PR is opened to speed up migration to 19.0.

simahawk and others added 30 commits April 6, 2026 14:45
Block archiving of backends if they have active endpoints exposed.
* more efficient w/ read_group
* consider only active records explicitly
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/
simahawk and others added 6 commits April 6, 2026 14:45
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.
@yankinmax yankinmax force-pushed the 19.0-mig-edi_endpoint_oca branch 4 times, most recently from eb5dc16 to 13d45a1 Compare April 6, 2026 12:48
@yankinmax yankinmax force-pushed the 19.0-mig-edi_endpoint_oca branch 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

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.