Add edi_product_endpoint glue module to fix origin_edi_endpoint_id registry crash#291
Add edi_product_endpoint glue module to fix origin_edi_endpoint_id registry crash#291Copilot wants to merge 4 commits into
edi_product_endpoint glue module to fix origin_edi_endpoint_id registry crash#291Conversation
edi_product_oca endpoint dependency
|
@copilot this is nonsense. edi_endpoint adds a field to the mixin, the mixin is inherited by edi_product but this one does not depend on edi_endpoint anymore. Probably the easiest solution is an auto-installe glue module. Evaluate this path and alternative ones. |
You're right, the regression test was nonsense — Evaluation of options for the actual underlying issue (
Recommendation: option 1 — add |
|
@copilot go for opt 1 |
|
@copilot go for opt 1 |
Done in 6802b78: added |
edi_product_oca endpoint dependencyedi_product_endpoint glue module to fix origin_edi_endpoint_id registry crash
The OCB CI job failed at registry setup with
KeyErroronproduct.template.origin_edi_endpoint_id. The crash happens becauseedi_endpoint_ocaextendsedi.exchange.consumer.mixinwithorigin_edi_endpoint_id, andedi_product_ocainherits that mixin onproduct.template/product.product/product.packaging— butedi_product_ocano longer depends onedi_endpoint_oca, so the related field target can be missing at registry time.This PR fixes the issue by introducing an auto-installed glue module, mirroring the existing
edi_sale_endpointpattern in this repo, keepingedi_product_ocadecoupled fromedi_endpoint_oca.Changes
New module
edi_product_endpoint(auto-install)depends = ["edi_product_oca", "edi_endpoint_oca"],auto_install=True.origin_edi_endpoint_idonproduct.templateandproduct.packagingforms.__manifest__.py,pyproject.toml,readme/DESCRIPTION.md,readme/CONTRIBUTORS.md.edi_product_ocaedi_endpoint_ocafromdepends; replaced withedi_core_oca(which providesedi.exchange.consumer.mixin).origin_edi_endpoint_idmoved out to the new glue module.Metapackage
odoo-addon-edi_product_endpointinsetup/_metapackage/pyproject.toml.Why this approach
Same pattern as
edi_sale_endpoint: the glue auto-installs whenever bothedi_product_ocaandedi_endpoint_ocaare present (exactly the situation that triggered the crash), preserves the decoupling intent of PR #275, and avoids forcing the endpoint feature on users who don't want it.