Skip to content

Commit c1ce76d

Browse files
[MIG] edi_component_oca
1 parent e763203 commit c1ce76d

6 files changed

Lines changed: 40 additions & 45 deletions

File tree

edi_component_oca/README.rst

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Edi Connector Oca
2121
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
2222
:alt: License: LGPL-3
2323
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github
24-
:target: https://github.com/OCA/edi-framework/tree/18.0/edi_component_oca
24+
:target: https://github.com/OCA/edi-framework/tree/19.0/edi_component_oca
2525
:alt: OCA/edi-framework
2626
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_component_oca
27+
:target: https://translation.odoo-community.org/projects/edi-framework-19-0/edi-framework-19-0-edi_component_oca
2828
:alt: Translate me on Weblate
2929
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30-
:target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=19.0
3131
:alt: Try me on Runboat
3232

3333
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -48,33 +48,33 @@ Component definition
4848

4949
The component used on edi must inherit from:
5050

51-
- ``edi.component.input.mixin`` for processing and implement the process
52-
function
53-
- ``edi.component.receive.mixin`` for reception and implement the
54-
receive function
55-
- ``edi.component.output.mixin`` for generation and implement the
56-
generate function
57-
- ``edi.component.send.mixin`` for sending and implement the send
58-
function
59-
- ``edi.component.check.mixin`` for checking and implement the check
60-
function
61-
- ``edi.component.validate.mixin`` for validation and implement the
62-
validate function
51+
- ``edi.component.input.mixin`` for processing and implement the
52+
process function
53+
- ``edi.component.receive.mixin`` for reception and implement the
54+
receive function
55+
- ``edi.component.output.mixin`` for generation and implement the
56+
generate function
57+
- ``edi.component.send.mixin`` for sending and implement the send
58+
function
59+
- ``edi.component.check.mixin`` for checking and implement the check
60+
function
61+
- ``edi.component.validate.mixin`` for validation and implement the
62+
validate function
6363

6464
Also, the components may have the following elements that will be used
6565
to use the right component:
6666

67-
- ``_backend_type``: code of the backend type
68-
- ``_exchange_type``: code of the exchange type
69-
- ``_usage``: Automatically set by the inherited component
67+
- ``_backend_type``: code of the backend type
68+
- ``_exchange_type``: code of the exchange type
69+
- ``_usage``: Automatically set by the inherited component
7070

7171
Bug Tracker
7272
===========
7373

7474
Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi-framework/issues>`_.
7575
In case of trouble, please check there if your issue has already been reported.
7676
If you spotted it first, help us to smash it by providing a detailed and welcomed
77-
`feedback <https://github.com/OCA/edi-framework/issues/new?body=module:%20edi_component_oca%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
77+
`feedback <https://github.com/OCA/edi-framework/issues/new?body=module:%20edi_component_oca%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
7878

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

@@ -91,11 +91,11 @@ Authors
9191
Contributors
9292
------------
9393

94-
- Simone Orsi <[email protected]>
95-
- Enric Tobella <[email protected]>
96-
- Manuel Regidor <[email protected]>
97-
- Thien Vo <[email protected]>
98-
- Jordi Masvidal <[email protected]>
94+
- Simone Orsi <[email protected]>
95+
- Enric Tobella <[email protected]>
96+
- Manuel Regidor <[email protected]>
97+
- Thien Vo <[email protected]>
98+
- Jordi Masvidal <[email protected]>
9999

100100
Maintainers
101101
-----------
@@ -121,6 +121,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
121121

122122
|maintainer-simahawk| |maintainer-etobella|
123123

124-
This module is part of the `OCA/edi-framework <https://github.com/OCA/edi-framework/tree/18.0/edi_component_oca>`_ project on GitHub.
124+
This module is part of the `OCA/edi-framework <https://github.com/OCA/edi-framework/tree/19.0/edi_component_oca>`_ project on GitHub.
125125

126126
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

edi_component_oca/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "Edi Connector Oca",
66
"summary": """Allow to use Connector as a source in EDI""",
7-
"version": "18.0.1.0.2",
7+
"version": "19.0.1.0.0",
88
"license": "LGPL-3",
99
"author": "ACSONE,Dixmit,Camptocamp,Odoo Community Association (OCA)",
1010
"maintainers": ["simahawk", "etobella"],

edi_component_oca/static/description/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h1>Edi Connector Oca</h1>
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375
!! source digest: sha256:3bf081843ed5a121210f466d0a354fe495798e66f75d76f6958176548d647356
376376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<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/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/edi-framework/tree/18.0/edi_component_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_component_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>
377+
<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/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/edi-framework/tree/19.0/edi_component_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-19-0/edi-framework-19-0-edi_component_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=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378378
<p>This module allows to use components to handle code to execute on EDI
379379
Exchanges.</p>
380380
<p><strong>Table of contents</strong></p>
@@ -399,8 +399,8 @@ <h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
399399
<h3><a class="toc-backref" href="#toc-entry-2">Component definition</a></h3>
400400
<p>The component used on edi must inherit from:</p>
401401
<ul class="simple">
402-
<li><tt class="docutils literal">edi.component.input.mixin</tt> for processing and implement the process
403-
function</li>
402+
<li><tt class="docutils literal">edi.component.input.mixin</tt> for processing and implement the
403+
process function</li>
404404
<li><tt class="docutils literal">edi.component.receive.mixin</tt> for reception and implement the
405405
receive function</li>
406406
<li><tt class="docutils literal">edi.component.output.mixin</tt> for generation and implement the
@@ -426,7 +426,7 @@ <h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
426426
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/edi-framework/issues">GitHub Issues</a>.
427427
In case of trouble, please check there if your issue has already been reported.
428428
If you spotted it first, help us to smash it by providing a detailed and welcomed
429-
<a class="reference external" href="https://github.com/OCA/edi-framework/issues/new?body=module:%20edi_component_oca%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
429+
<a class="reference external" href="https://github.com/OCA/edi-framework/issues/new?body=module:%20edi_component_oca%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
430430
<p>Do not contact contributors directly about support or help with technical issues.</p>
431431
</div>
432432
<div class="section" id="credits">
@@ -460,7 +460,7 @@ <h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
460460
promote its widespread use.</p>
461461
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
462462
<p><a class="reference external image-reference" href="https://github.com/simahawk"><img alt="simahawk" src="https://github.com/simahawk.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/etobella"><img alt="etobella" src="https://github.com/etobella.png?size=40px" /></a></p>
463-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/edi-framework/tree/18.0/edi_component_oca">OCA/edi-framework</a> project on GitHub.</p>
463+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/edi-framework/tree/19.0/edi_component_oca">OCA/edi-framework</a> project on GitHub.</p>
464464
<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>
465465
</div>
466466
</div>

edi_component_oca/tests/test_edi_backend_cron.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def setUpClass(cls):
2121
cls._build_components(
2222
cls, FakeOutputGenerator, FakeOutputSender, FakeOutputChecker
2323
)
24-
cls.partner2 = cls.env.ref("base.res_partner_10")
25-
cls.partner3 = cls.env.ref("base.res_partner_12")
24+
cls.partner2 = cls.env["res.partner"].create({"name": "EDI Test Partner 2"})
25+
cls.partner3 = cls.env["res.partner"].create({"name": "EDI Test Partner 3"})
2626
cls.record1 = cls.backend.create_record(
2727
"test_csv_output", {"model": cls.partner._name, "res_id": cls.partner.id}
2828
)

edi_component_oca/tests/test_edi_configuration.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
import os
55
import unittest
66

7-
from odoo_test_helper import FakeModelLoader
8-
7+
from odoo.orm.model_classes import add_to_registry
98
from odoo.tests.common import tagged
109

1110
from .common import EDIBackendCommonComponentRegistryTestCase
@@ -57,16 +56,19 @@ def setUp(self):
5756
def _setup_records(cls): # pylint:disable=missing-return
5857
super()._setup_records()
5958
# Load fake models ->/
60-
cls.loader = FakeModelLoader(cls.env, cls.__module__)
61-
cls.loader.backup_registry()
6259
from odoo.addons.edi_core_oca.tests.fake_models import EdiExchangeConsumerTest
6360

6461
EdiExchangeConsumerTest._edi_config_field_relation = lambda self: self.env[
6562
"edi.configuration"
6663
]
6764
# We need to override it, as we want to test the usage with components
6865

69-
cls.loader.update_registry((EdiExchangeConsumerTest,))
66+
add_to_registry(cls.registry, EdiExchangeConsumerTest)
67+
cls.registry._setup_models__(cls.env.cr, ["edi.exchange.consumer.test"])
68+
cls.registry.init_models(
69+
cls.env.cr, ["edi.exchange.consumer.test"], {"models_to_check": True}
70+
)
71+
cls.addClassCleanup(cls.registry.__delitem__, "edi.exchange.consumer.test")
7072
cls.exchange_type_out.exchange_filename_pattern = "{record.id}"
7173
cls.edi_configuration = cls.env["edi.configuration"]
7274
cls.create_config = cls.edi_configuration.create(
@@ -96,11 +98,6 @@ def _setup_records(cls): # pylint:disable=missing-return
9698
}
9799
)
98100

99-
@classmethod
100-
def tearDownClass(cls):
101-
cls.loader.restore_registry()
102-
super().tearDownClass()
103-
104101
def test_edi_send_via_edi_config(self):
105102
# Check configuration on create
106103
self.consumer_record.invalidate_recordset()

edi_component_oca/tests/test_quick_exec.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ def setUpClass(cls):
3333
FakeOutputChecker,
3434
FakeInputProcess,
3535
)
36-
cls.partner2 = cls.env.ref("base.res_partner_10")
37-
cls.partner3 = cls.env.ref("base.res_partner_12")
3836

3937
def setUp(self):
4038
super().setUp()

0 commit comments

Comments
 (0)