Skip to content

[19.0][MIG] edi_exchange_template_oca: Migration to 19.0#250

Open
sergijPf wants to merge 98 commits into
OCA:19.0from
DeineTuer-GmbH:19.0-mig-edi_exchange_template_oca
Open

[19.0][MIG] edi_exchange_template_oca: Migration to 19.0#250
sergijPf wants to merge 98 commits into
OCA:19.0from
DeineTuer-GmbH:19.0-mig-edi_exchange_template_oca

Conversation

@sergijPf

Copy link
Copy Markdown

few changes done as per 19.0:

  • replace odoo.fields.first(), removed in core;
  • remove 'nocopy' param in safe_eval(), no more exists;
  • odoo_test_helper.FakeModelLoader replaced with _setup_env(), done similar way to edi_core_oca;
  • remove string/expand attributes for search view (edi_exchange_template_output_view_search), causing failure

@etobella

Copy link
Copy Markdown
Member

/ocabot migration edi_exchange_template

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Mar 25, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Mar 25, 2026
26 tasks
@etobella

Copy link
Copy Markdown
Member

/ocabot rebase

@OCA-git-bot

Copy link
Copy Markdown
Contributor

@etobella The rebase process failed, because command git push --force DeineTuer-GmbH tmp-pr-250:19.0-mig-edi_exchange_template_oca failed with output:

remote: Repository not found.
fatal: repository 'https://github.com/DeineTuer-GmbH/edi-framework/' not found

@etobella

Copy link
Copy Markdown
Member

/ocabot migration edi_exchange_template_oca

@sergijPf sergijPf force-pushed the 19.0-mig-edi_exchange_template_oca branch from 44d0990 to 23ff6e9 Compare May 21, 2026 10:47
@OCA-git-bot OCA-git-bot added series:19.0 mod:edi_exchange_template_oca Module edi_exchange_template_oca labels May 21, 2026
weblate and others added 23 commits June 9, 2026 09:00
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/
Currently translated at 100.0% (35 of 35 strings)

Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/it/
If no explicit code is passed, it must use the code of the type
otherwise it will lookup for the 1st matching template by backend type.
Relying on the code by convention was fragile for many reasons.
Most important:

1. users have to remember about this convention
2. is not clear which template is going to be used by a specific type

With this change we make it more clear and deprecate the old behavior.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/
Currently translated at 100.0% (41 of 41 strings)

Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/it/
Fix the behavior according to the feature ported from v14
and drop the deprecated lookup by code.
It slows down test suites by creating too many things when not needed.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/
Currently translated at 100.0% (42 of 42 strings)

Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/it/
@sergijPf sergijPf force-pushed the 19.0-mig-edi_exchange_template_oca branch from 23ff6e9 to f33e03a Compare June 9, 2026 06:22
@sergijPf sergijPf force-pushed the 19.0-mig-edi_exchange_template_oca branch from f33e03a to 6f08f49 Compare June 9, 2026 06:40
def _prettify_xml(self, xml_string):
return etree.tostring(etree.fromstring(xml_string), pretty_print=True)

def _get_info_provider(self, exchange_record, work_ctx=None, usage=None, **kw):

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.

@etobella this slipped out of our reviews when moving away from components: it's dead code w/o edi_component_oca.
In fact, this is a part that I wanted to remove anyway because the snippet already allow you to prepare data from where you want w/o needing to define a specific component.
The original idea was to be able to define default "info" components that could be reused.

@sergijPf pls get rid of it in a separate commit. Something like

[REM] edi_exchange_template_oca: get rid of dead code

Meant to work with components only. 

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@simahawk removed as requested

from lxml import etree


def xml_purge_nswrapper(xml_content):

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.

@sergijPf may I ask you you to test one thing?
The nswrapper trick should be superflous today because to define namespaces you can use this approach

<t xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
            <cac:DeliveryParty>
              [...]
            </cac:DeliveryParty>
</t>

If this works, we can leave behind this trick.

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

Labels

mod:edi_exchange_template_oca Module edi_exchange_template_oca series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.