Skip to content

Commit

Permalink
[MIG] edi_exchange_template_oca: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
victorvermot committed Jan 15, 2025
1 parent 488ee06 commit e10c230
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 30 deletions.
14 changes: 7 additions & 7 deletions edi_exchange_template_oca/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ EDI Exchange Template
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github
:target: https://github.com/OCA/edi-framework/tree/17.0/edi_exchange_template_oca
:target: https://github.com/OCA/edi-framework/tree/18.0/edi_exchange_template_oca
:alt: OCA/edi-framework
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/edi-framework-17-0/edi-framework-17-0-edi_exchange_template_oca
:target: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -46,7 +46,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi-framework/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/edi-framework/issues/new?body=module:%20edi_exchange_template_oca%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/edi-framework/issues/new?body=module:%20edi_exchange_template_oca%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -62,8 +62,8 @@ Authors
Contributors
------------

- Simone Orsi <[email protected]>
- John Herholz <[email protected]>
- Simone Orsi <[email protected]>
- John Herholz <[email protected]>

Maintainers
-----------
Expand All @@ -86,6 +86,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-simahawk|

This module is part of the `OCA/edi-framework <https://github.com/OCA/edi-framework/tree/17.0/edi_exchange_template_oca>`_ project on GitHub.
This module is part of the `OCA/edi-framework <https://github.com/OCA/edi-framework/tree/18.0/edi_exchange_template_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion edi_exchange_template_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "EDI Exchange Template",
"summary": """Allows definition of exchanges via templates.""",
"version": "17.0.1.0.0",
"version": "18.0.1.0.0",
"development_status": "Beta",
"license": "LGPL-3",
"author": "ACSONE,Camptocamp,Odoo Community Association (OCA)",
Expand Down
6 changes: 3 additions & 3 deletions edi_exchange_template_oca/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h1 class="title">EDI Exchange Template</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f53c2d65c268e102166f3618c7e9ae820d1e703d7ab3a167657cb3b7f2613d03
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/edi-framework/tree/17.0/edi_exchange_template_oca"><img alt="OCA/edi-framework" src="https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/edi-framework-17-0/edi-framework-17-0-edi_exchange_template_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/edi-framework/tree/18.0/edi_exchange_template_oca"><img alt="OCA/edi-framework" src="https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Provide EDI exchange templates to control input/output records contents.</p>
<p>Provides following models:</p>
<ol class="arabic simple">
Expand All @@ -393,7 +393,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/edi-framework/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/edi-framework/issues/new?body=module:%20edi_exchange_template_oca%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/edi-framework/issues/new?body=module:%20edi_exchange_template_oca%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -423,7 +423,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/simahawk"><img alt="simahawk" src="https://github.com/simahawk.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/edi-framework/tree/17.0/edi_exchange_template_oca">OCA/edi-framework</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/edi-framework/tree/18.0/edi_exchange_template_oca">OCA/edi-framework</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
9 changes: 3 additions & 6 deletions edi_exchange_template_oca/tests/test_nswrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# @author Simone Orsi <[email protected]>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo.tests.common import TransactionCase
from odoo.tools import pycompat

from ..utils import xml_purge_nswrapper

Expand Down Expand Up @@ -43,16 +42,14 @@


class TestNSWrapper(TransactionCase):
maxDiff = None

def test_purge1(self):
res = xml_purge_nswrapper(XML1)
self.assertNotIn("nswrapper", pycompat.to_text(res))
self.assertNotIn("nswrapper", str(res))

def test_purge2(self):
res = xml_purge_nswrapper(XML2)
self.assertNotIn("nswrapper", pycompat.to_text(res))
self.assertNotIn("nswrapper", str(res))

def test_purge3(self):
res = xml_purge_nswrapper(ORDER_RESP_WRAPPER_TMPL.format(XML2))
self.assertNotIn("nswrapper", pycompat.to_text(res))
self.assertNotIn("nswrapper", str(res))
10 changes: 4 additions & 6 deletions edi_exchange_template_oca/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

from lxml import etree

from odoo.tools import pycompat


def xml_purge_nswrapper(xml_content):
"""Purge `nswrapper` elements.
Expand Down Expand Up @@ -36,10 +34,10 @@ def xml_purge_nswrapper(xml_content):
parent = nswrapper.getparent()
if parent is None:
# fmt:off
return "".join([
pycompat.to_text(etree.tostring(el))
for el in nswrapper.getchildren()
])
return "".join(
[etree.tostring(child, encoding="unicode")
for child in nswrapper.getchildren()]
)
# fmt:on
parent.extend(nswrapper.getchildren())
parent.remove(nswrapper)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="edi_exchange_template_output_view_tree" model="ir.ui.view">
<record id="edi_exchange_template_output_view_list" model="ir.ui.view">
<field name="model">edi.exchange.template.output</field>
<field name="arch" type="xml">
<tree>
<list>
<field name="backend_type_id" />
<field name="backend_id" />
<field name="name" />
<field name="code" />
<field name="output_type" />
</tree>
</list>
</field>
</record>
<record id="edi_exchange_template_output_view_form" model="ir.ui.view">
Expand Down Expand Up @@ -106,7 +106,7 @@
<field name="name">EDI Exchange Template Output</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">edi.exchange.template.output</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="edi_exchange_template_output_view_search" />
<field name="domain">[]</field>
<field name="context">{}</field>
Expand All @@ -122,12 +122,12 @@
</record>
<record
model="ir.actions.act_window.view"
id="act_open_edi_exchange_template_output_view_tree"
id="act_open_edi_exchange_template_output_view_list"
>
<field name="act_window_id" ref="act_open_edi_exchange_template_output_view" />
<field name="sequence" eval="10" />
<field name="view_mode">tree</field>
<field name="view_id" ref="edi_exchange_template_output_view_tree" />
<field name="view_mode">list</field>
<field name="view_id" ref="edi_exchange_template_output_view_list" />
</record>
<menuitem
id="menu_edi_exchange_template_root"
Expand Down

0 comments on commit e10c230

Please sign in to comment.