Skip to content

Commit

Permalink
[BPRT] edi_sale_oca: Backport from v16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thienvh332 committed Jun 28, 2024
1 parent 4a7764e commit d91ed35
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 21 deletions.
16 changes: 8 additions & 8 deletions edi_sale_oca/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ EDI Sales
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github
:target: https://github.com/OCA/edi-framework/tree/16.0/edi_sale_oca
:alt: OCA/edi-framework
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github
:target: https://github.com/OCA/edi/tree/14.0/edi_sale_oca
:alt: OCA/edi
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/edi-framework-16-0/edi-framework-16-0-edi_sale_oca
:target: https://translation.odoo-community.org/projects/edi-14-0/edi-14-0-edi_sale_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=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/edi&target_branch=14.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -69,10 +69,10 @@ TODO: shall we add an exchange type example as demo?
Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi-framework/issues>`_.
Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi/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_sale_oca%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/edi/issues/new?body=module:%20edi_sale_oca%0Aversion:%2014.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 Down Expand Up @@ -116,6 +116,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/16.0/edi_sale_oca>`_ project on GitHub.
This module is part of the `OCA/edi <https://github.com/OCA/edi/tree/14.0/edi_sale_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 2 additions & 2 deletions edi_sale_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"summary": """
Configuration and special behaviors for EDI on sales.
""",
"version": "16.0.1.2.0",
"version": "14.0.1.1.0",
"development_status": "Alpha",
"license": "AGPL-3",
"author": "Camptocamp,Odoo Community Association (OCA)",
"maintainers": ["simahawk"],
"website": "https://github.com/OCA/edi-framework",
"website": "https://github.com/OCA/edi",
"depends": [
"edi_oca",
"edi_record_metadata_oca",
Expand Down
1 change: 0 additions & 1 deletion edi_sale_oca/components/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def process(self):
else:
order = self._handle_create_order(res["res_id"])
return self.msg_order_created % order.name
raise UserError(self.msg_generic_error)

@property
def msg_order_existing_error(self):
Expand Down
8 changes: 4 additions & 4 deletions edi_sale_oca/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ <h1 class="title">EDI Sales</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2b4f89b88e7d4e87c5a1249801ac1225c3c3e33b7c21ecd3f3eeb66e9e38f2da
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/edi-framework/tree/16.0/edi_sale_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-16-0/edi-framework-16-0-edi_sale_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=16.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="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/edi/tree/14.0/edi_sale_oca"><img alt="OCA/edi" src="https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/edi-14-0/edi-14-0-edi_sale_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&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<div class="section" id="inbound">
<h1>Inbound</h1>
<p>Receive sale orders from EDI channels.</p>
Expand Down Expand Up @@ -408,10 +408,10 @@ <h1>Control sale order confirmation</h1>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/edi-framework/issues">GitHub Issues</a>.
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/edi/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_sale_oca%0Aversion:%2016.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/issues/new?body=module:%20edi_sale_oca%0Aversion:%2014.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 @@ -444,7 +444,7 @@ <h1>Maintainers</h1>
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/16.0/edi_sale_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/tree/14.0/edi_sale_oca">OCA/edi</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
6 changes: 3 additions & 3 deletions edi_sale_oca/tests/test_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# @author: Simone Orsi <simahawk@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.tests.common import TransactionCase
from odoo.tests.common import SavepointCase

from odoo.addons.edi_oca.tests.common import EDIBackendTestMixin

from .common import OrderMixin


class TestOrder(TransactionCase, EDIBackendTestMixin, OrderMixin):
class TestOrder(SavepointCase, EDIBackendTestMixin, OrderMixin):
@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down Expand Up @@ -44,7 +44,7 @@ def test_line_origin(self):
},
]
)
order.env.invalidate_all()
order.invalidate_cache()
new_line1, new_line2 = order.order_line - lines
self.assertEqual(new_line1.origin_exchange_record_id, self.exc_record_in)
self.assertEqual(new_line2.origin_exchange_record_id, self.exc_record_in)
4 changes: 2 additions & 2 deletions edi_sale_oca/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import textwrap
from unittest import mock

from odoo.addons.component.tests.common import TransactionComponentCase
from odoo.addons.component.tests.common import SavepointComponentCase
from odoo.addons.edi_oca.tests.common import EDIBackendTestMixin


class TestProcessComponent(TransactionComponentCase, EDIBackendTestMixin):
class TestProcessComponent(SavepointComponentCase, EDIBackendTestMixin):
@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down
2 changes: 1 addition & 1 deletion edi_sale_oca/views/sale_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<field name="edi_id" optional="hide" />
</xpath>
<xpath
expr="//field[@name='order_line']/form//field[@name='analytic_distribution']"
expr="//field[@name='order_line']/form//field[@name='analytic_tag_ids']"
position="after"
>
<field name="edi_id" />
Expand Down
1 change: 1 addition & 0 deletions setup/edi_sale_oca/odoo/addons/edi_sale_oca
6 changes: 6 additions & 0 deletions setup/edi_sale_oca/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit d91ed35

Please sign in to comment.