Skip to content

[19.0][MIG] edi_gs1_oca - #314

Open
acsonefho wants to merge 64 commits into
OCA:19.0from
acsone:mig-19-edi_gs1_oca
Open

[19.0][MIG] edi_gs1_oca#314
acsonefho wants to merge 64 commits into
OCA:19.0from
acsone:mig-19-edi_gs1_oca

Conversation

@acsonefho

@acsonefho acsonefho commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Based on work done here: OCA/edi#411

Depends on: #343

Probably a lot of improvements to do but the purpose of this PR is only the migration.

@acsonefho
acsonefho marked this pull request as draft June 29, 2026 11:41
@OCA-git-bot OCA-git-bot added the mod:edi_gs1_stock_oca Module edi_gs1_stock_oca label Jul 2, 2026
@acsonefho
acsonefho force-pushed the mig-19-edi_gs1_oca branch 3 times, most recently from 8125395 to 3abb728 Compare July 23, 2026 07:41
@OCA-git-bot OCA-git-bot removed the mod:edi_gs1_stock_oca Module edi_gs1_stock_oca label Jul 23, 2026
@acsonefho
acsonefho force-pushed the mig-19-edi_gs1_oca branch 2 times, most recently from 1649ab5 to 87e5e91 Compare July 23, 2026 08:27
@acsonefho
acsonefho marked this pull request as ready for review July 23, 2026 08:53
@acsonefho

Copy link
Copy Markdown
Contributor Author

@simahawk @etobella review is welcome 🙏
Thanks in advance 💪

Comment thread edi_gs1_oca/models/edi_gs1_xml.py Outdated
Comment thread edi_gs1_oca/models/uom_uom.py
Comment thread edi_gs1_oca/data/business_header_qweb_template.xml Outdated
Comment thread edi_gs1_oca/data/gs1_backend_data.xml Outdated
Comment thread edi_gs1_oca/models/edi_gs1_output.py
Comment thread edi_gs1_oca/models/res_partner.py Outdated
Comment thread edi_gs1_oca/security/gs1_backend_acl.xml Outdated
Comment thread edi_gs1_oca/tests/__init__.py Outdated
Comment thread edi_gs1_oca/TODO Outdated
Comment thread edi_gs1_oca/utils.py Outdated
simahawk and others added 24 commits September 11, 2026 07:23
GS1 standard requires UoM specific mapping.
Here we add a specific field for it
and provide mapping of values
as well as auto compute for existing UoM.
* Add qweb tmpl for contact details
* Fix fake res.partner record for shipper
Migrate from the legacy component-based EDI framework to the new
edi_core_oca model-based architecture:

- Replace components (AbstractComponent / _usage / _find_component)
  with model-based handlers inheriting edi.oca.handler.* abstract models.
- Add edi.gs1.xml helper (XSD validate/parse), edi.gs1.input.mixin,
  edi.gs1.output.mixin and edi.gs1.handler.* (validate + process ack).
- Wire handlers on exchange types via input/output_validate_model_id and
  process_model_id; move schema_path to advanced_settings (gs1: section).
- Drop the edi.exchange.template.output record; render QWeb templates
  through the output mixin and purge nswrapper helpers (utils.py).
- Update post_init_hook to the new env-based signature.
- Point view inherit_id to edi_core_oca and fix module xmlids.
- Adapt tests: create partners instead of removed demo xmlids and set
  contact details (Odoo 19 QWeb t-out uses the element body as fallback
  when the value is falsy).
The edi.gs1.xml model is dropped: edi.xml provides both the XSD
validation (lxml) and the parsing (xmltodict), and its _listify helper
gives repeatable elements a stable shape. Drops the xmlschema dependency.
The business header declares its namespace on its own root element, so
QWeb writes it out and no post-processing is needed anymore.
The `gln_code` field moves to the integration module: `res.partner._gs1_gln()`
is the contract and templates render it through the `gs1_gln` helper, which
also accepts the party dicts built by the shipment handlers.
A ready to use backend does not belong to an install: move it to demo,
wired to its LSC/LSP parties so a delivery can resolve it. The test suite
creates its own backend instead of relying on demo data.
@acsonefho
acsonefho requested a review from simahawk September 11, 2026 09:42
@acsonefho

Copy link
Copy Markdown
Contributor Author

@simahawk Thank you very much for the review! 🙏
All is done except the part about the partner_identification_gln (but I let a way to implements it later).

I hope it could be merged then improvements should be done into separated PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:edi_gs1_oca Module edi_gs1_oca mod:edi_xml_oca Module edi_xml_oca series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants