Skip to content

[18.0] [IMP] edi_party_helper: make endpoint category configurable + use scheme + ease attributes override - #339

Open
simahawk wants to merge 3 commits into
OCA:18.0from
camptocamp:18-party-data-imp
Open

[18.0] [IMP] edi_party_helper: make endpoint category configurable + use scheme + ease attributes override#339
simahawk wants to merge 3 commits into
OCA:18.0from
camptocamp:18-party-data-imp

Conversation

@simahawk

@simahawk simahawk commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

- `_get_identity()` now renders `schemeID` from the id_category's new
  `scheme` field (falls back to `code`), so EDI/UBL output can use an
  external coding-scheme value distinct from the category's internal
  code (e.g. Peppol ICD "0088" for a GLN category coded "GLN").
@OCA-git-bot OCA-git-bot added series:18.0 mod:edi_party_helper_oca Module edi_party_helper_oca labels Sep 8, 2026
- New `edi.exchange.type.endpoint_partner_category_id` (output-only in
  the form view): when set, `_get_endpoint()` derives `EndpointID` from
  the partner's id_number in that category, instead of always `{}`.

- `EDIParty` is now a `MutableMapping` instead of a read-only `Mapping`:
  `party["key"] = value` / `party.update(...)` work to override computed
  attributes (name/identifiers/endpoint/lang) after construction.
  Item assignment compiles to `STORE_SUBSCR`, allowed under `safe_eval`,
  unlike plain attribute assignment (`STORE_ATTR`, forbidden there) - so
  this also works from a `safe_eval`-restricted context such as an
  `edi.exchange.template.output` `code_snippet`. Item deletion is not
  supported.

Tests added for all of the above, including one that exercises the
item-assignment path through an actual `safe_eval.safe_eval()` call to
confirm it works where attribute assignment doesn't.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:edi_party_helper_oca Module edi_party_helper_oca series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants