Skip to content

Commit c3ae082

Browse files
author
duongtq
committed
[MIG] sale_order_import_edifact: Migration to 16.0
1 parent 58b5c5f commit c3ae082

12 files changed

+151
-194
lines changed

sale_order_import_edifact/README.rst

+22-44
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
Import Business Document EDIFACT/D96A Order
33
===========================================
44

5-
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
67
!! This file is generated by oca-gen-addon-readme !!
78
!! changes will be overwritten. !!
89
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:c5e7c1494aa5d3925e26bf68a3a5f270b9d70b89258edf60e549f542268d8920
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
912
1013
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
1114
:target: https://odoo-community.org/page/development-status
@@ -14,16 +17,16 @@ Import Business Document EDIFACT/D96A Order
1417
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1518
:alt: License: AGPL-3
1619
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github
17-
:target: https://github.com/OCA/edi/tree/14.0/sale_order_import_edifact
20+
:target: https://github.com/OCA/edi/tree/16.0/sale_order_import_edifact
1821
:alt: OCA/edi
1922
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20-
:target: https://translation.odoo-community.org/projects/edi-14-0/edi-14-0-sale_order_import_edifact
23+
:target: https://translation.odoo-community.org/projects/edi-16-0/edi-16-0-sale_order_import_edifact
2124
:alt: Translate me on Weblate
22-
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/226/14.0
24-
:alt: Try me on Runbot
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/edi&target_branch=16.0
27+
:alt: Try me on Runboat
2528

26-
|badge1| |badge2| |badge3| |badge4| |badge5|
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
2730

2831
UN/EDIFACT
2932
United Nations rules for Elec­tronic Data Interchange for Administration, Commerce and Transport
@@ -46,45 +49,12 @@ Configuration
4649
=============
4750

4851

49-
EDI Exchange Type "Advanced Settings"
50-
51-
.. code-block:: yaml
52-
53-
components:
54-
process:
55-
usage: input.process.sale.order
56-
57-
sale_order_import:
58-
price_source: order
59-
confirm_order: false
60-
wiz_ctx:
61-
file_ext: 'edi'
62-
release: 'd96a'
63-
doc_type: 'rfq'
64-
65-
66-
- price_source. Can be 'order' or 'pricelist'
67-
- confirm_order. False by default
68-
- wiz_ctx. Wizard's context
69-
- file_ext. File extensions supported. By default: 'txt,d96a'
70-
- release. EDIFACT format release.
71-
- doc_type. ('rfq', "Request for Quotation") | ('order', "Order"). Default 'order'
72-
7352
This module struggles with EDIFACT format, if you need X12 format you will need something like sale_order_import_x12 module.
7453

7554
Regardless format, a concret document should need a concret specification nammed release. For example Amazon uses "D96A" specification.
7655

7756
See <https://www.stedi.com/edi/edifact>
7857

79-
Known issues / Roadmap
80-
======================
81-
82-
.. Enumerate known caveats and future potential improvements.
83-
It is mostly intended for end-users, and can also help
84-
potential new contributors discovering new features to implement.
85-
86-
* Refactor import by release
87-
8858
Changelog
8959
=========
9060

@@ -101,16 +71,16 @@ Changelog
10171
14.0.1.0.0 (2023-06-07)
10272
~~~~~~~~~~~~~~~~~~~~~~~
10373

104-
* [14.0][MIG] sale_order_import_edifact & base_edifact.
74+
* [14.0][ADD] sale_order_import_edifact & base_edifact.
10575
(`#779 <https://github.com/OCA/edi/pull/779>`_)
10676

10777
Bug Tracker
10878
===========
10979

11080
Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi/issues>`_.
11181
In case of trouble, please check there if your issue has already been reported.
112-
If you spotted it first, help us smashing it by providing a detailed and welcomed
113-
`feedback <https://github.com/OCA/edi/issues/new?body=module:%20sale_order_import_edifact%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
82+
If you spotted it first, help us to smash it by providing a detailed and welcomed
83+
`feedback <https://github.com/OCA/edi/issues/new?body=module:%20sale_order_import_edifact%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
11484

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

@@ -121,12 +91,20 @@ Authors
12191
~~~~~~~
12292

12393
* ALBA Software
94+
* Camptocamp
12495

12596
Contributors
12697
~~~~~~~~~~~~
12798

12899
* Rafa Morant <rmorant@albasoft.com> (https://www.albasoft.com)
129100
* Marc Poch <mpoch@planetatic.com>
101+
* Duong (Tran Quoc) <duongtq@trobz.com>
102+
* Simone Orsi <simone.orsi@camptocamp.com>
103+
104+
Other credits
105+
~~~~~~~~~~~~~
106+
107+
The migration of this module from 14.0 to 16.0 was financially supported by Camptocamp
130108

131109
Maintainers
132110
~~~~~~~~~~~
@@ -149,6 +127,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
149127

150128
|maintainer-rmorant|
151129

152-
This module is part of the `OCA/edi <https://github.com/OCA/edi/tree/14.0/sale_order_import_edifact>`_ project on GitHub.
130+
This module is part of the `OCA/edi <https://github.com/OCA/edi/tree/16.0/sale_order_import_edifact>`_ project on GitHub.
153131

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

sale_order_import_edifact/__manifest__.py

+3-10
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,18 @@
44
{
55
"name": "Import Business Document EDIFACT/D96A Order",
66
"summary": "EDIFACT/D96A Order",
7-
"version": "14.0.1.0.0",
7+
"version": "16.0.1.0.0",
88
"development_status": "Alpha",
99
"category": "Sales Management",
1010
"website": "https://github.com/OCA/edi",
11-
"author": "ALBA Software, Odoo Community Association (OCA)",
11+
"author": "ALBA Software, Camptocamp, Odoo Community Association (OCA)",
1212
"maintainers": ["rmorant"],
1313
"license": "AGPL-3",
14-
"application": False,
15-
"installable": True,
16-
"external_dependencies": {
17-
"python": [],
18-
"bin": [],
19-
},
2014
"depends": [
2115
"sale_management",
22-
"partner_identification",
2316
"partner_identification_gln",
2417
"base_edifact",
25-
"edi_sale_order_import",
18+
"sale_order_import",
2619
],
2720
"data": [
2821
"wizard/sale_order_import_view.xml",

sale_order_import_edifact/models/business_document_import.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
class BusinessDocumentImport(models.AbstractModel):
88
_inherit = "business.document.import"
99

10+
# TODO: refactor code in partner_identification_import and drop this one
1011
@api.model
1112
def _hook_match_partner(self, partner_dict, chatter_msg, domain, order):
1213
"""
@@ -40,10 +41,12 @@ def _hook_match_partner(self, partner_dict, chatter_msg, domain, order):
4041
)
4142
raise exceptions.UserError(
4243
_(
43-
"Partner GLN Code: %s not found in order file: '%s' "
44-
"from VAT registration number '%s'."
44+
"Partner GLN Code: %(party)s not found in order file: '%(file)s' "
45+
"from VAT registration number '%(vat)s'.",
46+
party=party_id,
47+
file=ctx.get("order_filename"),
48+
vat=ctx.get("rff_va"),
4549
)
46-
% (party_id, ctx.get("order_filename"), ctx.get("rff_va"))
4750
)
4851

4952
return id_number.partner_id

sale_order_import_edifact/readme/CONFIGURE.rst

-24
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
11

2-
EDI Exchange Type "Advanced Settings"
3-
4-
.. code-block:: yaml
5-
6-
components:
7-
process:
8-
usage: input.process.sale.order
9-
10-
sale_order_import:
11-
price_source: order
12-
confirm_order: false
13-
wiz_ctx:
14-
file_ext: 'edi'
15-
release: 'd96a'
16-
doc_type: 'rfq'
17-
18-
19-
- price_source. Can be 'order' or 'pricelist'
20-
- confirm_order. False by default
21-
- wiz_ctx. Wizard's context
22-
- file_ext. File extensions supported. By default: 'txt,d96a'
23-
- release. EDIFACT format release.
24-
- doc_type. ('rfq', "Request for Quotation") | ('order', "Order"). Default 'order'
25-
262
This module struggles with EDIFACT format, if you need X12 format you will need something like sale_order_import_x12 module.
273

284
Regardless format, a concret document should need a concret specification nammed release. For example Amazon uses "D96A" specification.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
* Rafa Morant <rmorant@albasoft.com> (https://www.albasoft.com)
22
* Marc Poch <mpoch@planetatic.com>
3+
* Duong (Tran Quoc) <duongtq@trobz.com>
4+
* Simone Orsi <simone.orsi@camptocamp.com>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The migration of this module from 14.0 to 16.0 was financially supported by Camptocamp

sale_order_import_edifact/readme/HISTORY.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
14.0.1.0.0 (2023-06-07)
1212
~~~~~~~~~~~~~~~~~~~~~~~
1313

14-
* [14.0][MIG] sale_order_import_edifact & base_edifact.
14+
* [14.0][ADD] sale_order_import_edifact & base_edifact.
1515
(`#779 <https://github.com/OCA/edi/pull/779>`_)

sale_order_import_edifact/readme/ROADMAP.rst

-5
This file was deleted.

sale_order_import_edifact/static/description/index.html

+27-49
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,10 @@ <h1 class="title">Import Business Document EDIFACT/D96A Order</h1>
366366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370+
!! source digest: sha256:c5e7c1494aa5d3925e26bf68a3a5f270b9d70b89258edf60e549f542268d8920
369371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370-
<p><a class="reference external" 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" 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" href="https://github.com/OCA/edi/tree/14.0/sale_order_import_edifact"><img alt="OCA/edi" src="https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/edi-14-0/edi-14-0-sale_order_import_edifact"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/226/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external" 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" 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" href="https://github.com/OCA/edi/tree/16.0/sale_order_import_edifact"><img alt="OCA/edi" src="https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/edi-16-0/edi-16-0-sale_order_import_edifact"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runboat.odoo-community.org/builds?repo=OCA/edi&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
371373
<dl class="docutils">
372374
<dt>UN/EDIFACT</dt>
373375
<dd>United Nations rules for Elec­tronic Data Interchange for Administration, Commerce and Transport</dd>
@@ -384,59 +386,28 @@ <h1 class="title">Import Business Document EDIFACT/D96A Order</h1>
384386
<div class="contents local topic" id="contents">
385387
<ul class="simple">
386388
<li><a class="reference internal" href="#configuration" id="id3">Configuration</a></li>
387-
<li><a class="reference internal" href="#known-issues-roadmap" id="id4">Known issues / Roadmap</a></li>
388-
<li><a class="reference internal" href="#changelog" id="id5">Changelog</a><ul>
389-
<li><a class="reference internal" href="#id1" id="id6">14.0.1.0.0 (2023-06-07)</a></li>
389+
<li><a class="reference internal" href="#changelog" id="id4">Changelog</a><ul>
390+
<li><a class="reference internal" href="#id1" id="id5">14.0.1.0.0 (2023-06-07)</a></li>
390391
</ul>
391392
</li>
392-
<li><a class="reference internal" href="#bug-tracker" id="id7">Bug Tracker</a></li>
393-
<li><a class="reference internal" href="#credits" id="id8">Credits</a><ul>
394-
<li><a class="reference internal" href="#authors" id="id9">Authors</a></li>
395-
<li><a class="reference internal" href="#contributors" id="id10">Contributors</a></li>
393+
<li><a class="reference internal" href="#bug-tracker" id="id6">Bug Tracker</a></li>
394+
<li><a class="reference internal" href="#credits" id="id7">Credits</a><ul>
395+
<li><a class="reference internal" href="#authors" id="id8">Authors</a></li>
396+
<li><a class="reference internal" href="#contributors" id="id9">Contributors</a></li>
397+
<li><a class="reference internal" href="#other-credits" id="id10">Other credits</a></li>
396398
<li><a class="reference internal" href="#maintainers" id="id11">Maintainers</a></li>
397399
</ul>
398400
</li>
399401
</ul>
400402
</div>
401403
<div class="section" id="configuration">
402404
<h1><a class="toc-backref" href="#id3">Configuration</a></h1>
403-
<p>EDI Exchange Type “Advanced Settings”</p>
404-
<pre class="code yaml literal-block">
405-
<span class="nt">components</span><span class="p">:</span><span class="w">
406-
</span><span class="nt">process</span><span class="p">:</span><span class="w">
407-
</span><span class="nt">usage</span><span class="p">:</span><span class="w"> </span><span class="l-Scalar-Plain">input.process.sale.order</span><span class="w">
408-
409-
</span><span class="nt">sale_order_import</span><span class="p">:</span><span class="w">
410-
</span><span class="nt">price_source</span><span class="p">:</span><span class="w"> </span><span class="l-Scalar-Plain">order</span><span class="w">
411-
</span><span class="nt">confirm_order</span><span class="p">:</span><span class="w"> </span><span class="l-Scalar-Plain">false</span><span class="w">
412-
</span><span class="nt">wiz_ctx</span><span class="p">:</span><span class="w">
413-
</span><span class="nt">file_ext</span><span class="p">:</span><span class="w"> </span><span class="s">'edi'</span><span class="w">
414-
</span><span class="nt">release</span><span class="p">:</span><span class="w"> </span><span class="s">'d96a'</span><span class="w">
415-
</span><span class="nt">doc_type</span><span class="p">:</span><span class="w"> </span><span class="s">'rfq'</span>
416-
</pre>
417-
<ul class="simple">
418-
<li>price_source. Can be ‘order’ or ‘pricelist’</li>
419-
<li>confirm_order. False by default</li>
420-
<li>wiz_ctx. Wizard’s context
421-
- file_ext. File extensions supported. By default: ‘txt,d96a’
422-
- release. EDIFACT format release.
423-
- doc_type. (‘rfq’, “Request for Quotation”) | (‘order’, “Order”). Default ‘order’</li>
424-
</ul>
425405
<p>This module struggles with EDIFACT format, if you need X12 format you will need something like sale_order_import_x12 module.</p>
426406
<p>Regardless format, a concret document should need a concret specification nammed release. For example Amazon uses “D96A” specification.</p>
427407
<p>See &lt;<a class="reference external" href="https://www.stedi.com/edi/edifact">https://www.stedi.com/edi/edifact</a>&gt;</p>
428408
</div>
429-
<div class="section" id="known-issues-roadmap">
430-
<h1><a class="toc-backref" href="#id4">Known issues / Roadmap</a></h1>
431-
<!-- Enumerate known caveats and future potential improvements.
432-
It is mostly intended for end-users, and can also help
433-
potential new contributors discovering new features to implement. -->
434-
<ul class="simple">
435-
<li>Refactor import by release</li>
436-
</ul>
437-
</div>
438409
<div class="section" id="changelog">
439-
<h1><a class="toc-backref" href="#id5">Changelog</a></h1>
410+
<h1><a class="toc-backref" href="#id4">Changelog</a></h1>
440411
<!-- The change log. The goal of this file is to help readers
441412
understand changes between versions. The primary audience is
442413
end users and integrators. Purely technical changes such as
@@ -447,36 +418,43 @@ <h1><a class="toc-backref" href="#id5">Changelog</a></h1>
447418
forbidden and will likely break the structure of the README.rst
448419
or other documents where this fragment is included. -->
449420
<div class="section" id="id1">
450-
<h2><a class="toc-backref" href="#id6">14.0.1.0.0 (2023-06-07)</a></h2>
421+
<h2><a class="toc-backref" href="#id5">14.0.1.0.0 (2023-06-07)</a></h2>
451422
<ul class="simple">
452-
<li>[14.0][MIG] sale_order_import_edifact &amp; base_edifact.
423+
<li>[14.0][ADD] sale_order_import_edifact &amp; base_edifact.
453424
(<a class="reference external" href="https://github.com/OCA/edi/pull/779">#779</a>)</li>
454425
</ul>
455426
</div>
456427
</div>
457428
<div class="section" id="bug-tracker">
458-
<h1><a class="toc-backref" href="#id7">Bug Tracker</a></h1>
429+
<h1><a class="toc-backref" href="#id6">Bug Tracker</a></h1>
459430
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/edi/issues">GitHub Issues</a>.
460431
In case of trouble, please check there if your issue has already been reported.
461-
If you spotted it first, help us smashing it by providing a detailed and welcomed
462-
<a class="reference external" href="https://github.com/OCA/edi/issues/new?body=module:%20sale_order_import_edifact%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
432+
If you spotted it first, help us to smash it by providing a detailed and welcomed
433+
<a class="reference external" href="https://github.com/OCA/edi/issues/new?body=module:%20sale_order_import_edifact%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
463434
<p>Do not contact contributors directly about support or help with technical issues.</p>
464435
</div>
465436
<div class="section" id="credits">
466-
<h1><a class="toc-backref" href="#id8">Credits</a></h1>
437+
<h1><a class="toc-backref" href="#id7">Credits</a></h1>
467438
<div class="section" id="authors">
468-
<h2><a class="toc-backref" href="#id9">Authors</a></h2>
439+
<h2><a class="toc-backref" href="#id8">Authors</a></h2>
469440
<ul class="simple">
470441
<li>ALBA Software</li>
442+
<li>Camptocamp</li>
471443
</ul>
472444
</div>
473445
<div class="section" id="contributors">
474-
<h2><a class="toc-backref" href="#id10">Contributors</a></h2>
446+
<h2><a class="toc-backref" href="#id9">Contributors</a></h2>
475447
<ul class="simple">
476448
<li>Rafa Morant &lt;<a class="reference external" href="mailto:rmorant&#64;albasoft.com">rmorant&#64;albasoft.com</a>&gt; (<a class="reference external" href="https://www.albasoft.com">https://www.albasoft.com</a>)</li>
477449
<li>Marc Poch &lt;<a class="reference external" href="mailto:mpoch&#64;planetatic.com">mpoch&#64;planetatic.com</a>&gt;</li>
450+
<li>Duong (Tran Quoc) &lt;<a class="reference external" href="mailto:duongtq&#64;trobz.com">duongtq&#64;trobz.com</a>&gt;</li>
451+
<li>Simone Orsi &lt;<a class="reference external" href="mailto:simone.orsi&#64;camptocamp.com">simone.orsi&#64;camptocamp.com</a>&gt;</li>
478452
</ul>
479453
</div>
454+
<div class="section" id="other-credits">
455+
<h2><a class="toc-backref" href="#id10">Other credits</a></h2>
456+
<p>The migration of this module from 14.0 to 16.0 was financially supported by Camptocamp</p>
457+
</div>
480458
<div class="section" id="maintainers">
481459
<h2><a class="toc-backref" href="#id11">Maintainers</a></h2>
482460
<p>This module is maintained by the OCA.</p>
@@ -486,7 +464,7 @@ <h2><a class="toc-backref" href="#id11">Maintainers</a></h2>
486464
promote its widespread use.</p>
487465
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
488466
<p><a class="reference external" href="https://github.com/rmorant"><img alt="rmorant" src="https://github.com/rmorant.png?size=40px" /></a></p>
489-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/edi/tree/14.0/sale_order_import_edifact">OCA/edi</a> project on GitHub.</p>
467+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/edi/tree/16.0/sale_order_import_edifact">OCA/edi</a> project on GitHub.</p>
490468
<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>
491469
</div>
492470
</div>

0 commit comments

Comments
 (0)