Skip to content

[18.0] Add edi_party_helper_oca, deprecate edi_party_data_oca - #330

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

[18.0] Add edi_party_helper_oca, deprecate edi_party_data_oca#330
simahawk wants to merge 3 commits into
OCA:18.0from
camptocamp:18-edi-party-ref

Conversation

@simahawk

Copy link
Copy Markdown
Contributor

Extract EDI party-data lookup out of the component framework so it can be used standalone.

  • New module edi_party_helper_oca: EDIParty, a plain dataclass (no component dependency) that computes party data (name, identifiers, endpoint, lang) and behaves like a read-only dict for backward compat. Exposed via a new edi.party.helper abstract model (get_party(exchange_record, partner, **kw)). Moved the id_category_ids field/view here too.
  • edi_party_data_oca: edi.party.data.mixin component now just delegates to edi.party.helper, kept only for backward compatibility.
  • Both edi_party_data_oca and edi_exchange_template_party_data marked deprecated: readme notes + a post_init_hook logging a deprecation message on install.
  • Tests split accordingly: exhaustive data tests moved to edi_party_helper_oca, component tests trimmed to wiring-only checks.

@OCA-git-bot OCA-git-bot added series:18.0 mod:edi_party_data_oca Module edi_party_data_oca mod:edi_exchange_template_party_data Module edi_exchange_template_party_data mod:edi_party_helper_oca Module edi_party_helper_oca labels Aug 24, 2026
@simahawk

Copy link
Copy Markdown
Contributor Author

test fails only on license check

@SilvioC2C SilvioC2C left a comment

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.

Overall LGTM, a couple of minor remarks

Comment thread edi_exchange_template_party_data/hooks.py
Comment on lines +14 to +15
"auto_install": True,
"post_init_hook": "post_init_hook",

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.

Two things:

  • since the module is getting deprecated, shouldn't it make sense to remove the auto_install flag?
  • post_init_hook is only executed upon module installation: would it make sense to add a post_load hook too to display the deprecation warning whenever the module is loaded?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good points. In fact I wanted to use post_load but I forgot about it 😓
And for the auto_install flag: correct! I'll fix them thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, thanks!

Comment thread edi_party_data_oca/__manifest__.py Outdated
Comment thread edi_party_data_oca/hooks.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:edi_exchange_template_party_data Module edi_exchange_template_party_data mod:edi_party_data_oca Module edi_party_data_oca 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