Skip to content

[MIG][19.0] edi_xml_oca (from 18.0) - #343

Open
acsonefho wants to merge 29 commits into
OCA:19.0from
acsone:mig-19-edi_xml_oca
Open

acsonefho wants to merge 29 commits into
OCA:19.0from
acsone:mig-19-edi_xml_oca

Conversation

@acsonefho

@acsonefho acsonefho commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Migration of edi_xml_oca

Improvement (into dedicated commits)

  • Use file_open from Odoo instead of open(...);
  • Add _listify(...) to force having a list (when element have only a single value (but could have more; depending on xsd) xmltodict parse it like a dict instead of list of dict.

@acsonefho

Copy link
Copy Markdown
Contributor Author

@simahawk @etobella Can you review this one please? 🙏

@simahawk
simahawk self-requested a review September 15, 2026 12:15
Comment thread edi_xml_oca/models/edi_xml.py
Comment thread edi_xml_oca/models/edi_xml.py Outdated
The XML handler becomes the `edi.xml` abstract model: no dependency on
edi_component_oca (hence on OCA/connector) anymore, no work context, and
the schema path is passed to validate() instead.
The standard Odoo helper resolves the addon relative path and forces
utf-8. It also makes the "schema file not found" branch reachable:
file_path used to raise outside of the try.
A repeatable element comes back as a dict for a single occurrence and as
a list for several: callers iterating on it need a stable shape.
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.

6 participants