Skip to content

Commit 6a55562

Browse files
P-H-Phucsimahawk
authored andcommitted
[MIG] edi_purchase_oca: Migration to 18.0
Co-author: Simone Orsi <simahawk@gmail.com>
1 parent 7036315 commit 6a55562

13 files changed

Lines changed: 45 additions & 111 deletions

edi_purchase_oca/README.rst

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,7 @@ EDI Purchase
2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

3131
This module intends to create a base to be extended by local edi rules
32-
for purchase.
33-
34-
In order to add a new integration, you need to create a listener:
35-
36-
.. code:: python
37-
38-
class MyEventListener(Component):
39-
_name = "purchase.order.event.listener.demo"
40-
_inherit = "base.event.listener"
41-
_apply_on = ["purchase.order"]
42-
43-
def on_button_confirm_purchase_order(self, move):
44-
"""Add your code here"""
32+
for purchase. Assign the EDI Configuration on the partner form.
4533

4634
**Table of contents**
4735

@@ -65,11 +53,15 @@ Authors
6553
-------
6654

6755
* ForgeFlow
56+
* Camptocamp
6857

6958
Contributors
7059
------------
7160

72-
- Lois Rilo <lois.rilo@forgeflow.com>
61+
- Lois Rilo lois.rilo@forgeflow.com
62+
- Simone Orsi simone.orsi@camptocamp.com
63+
64+
- Phan Hong Phuc <phucph@trobz.com>
7365

7466
Maintainers
7567
-----------

edi_purchase_oca/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "EDI Purchase",
66
"summary": """
77
Define EDI Configuration for Purchase Orders""",
8-
"version": "17.0.1.0.0",
8+
"version": "18.0.1.0.0",
99
"license": "LGPL-3",
1010
"author": "ForgeFlow, Camptocamp, Odoo Community Association (OCA)",
1111
"website": "https://github.com/OCA/edi-framework",
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
3-
<!-- Generic state change -->
4-
<record
3+
<!-- Generic state change -->
4+
<record
55
id="edi_conf_trigger_purchase_order_state_change"
66
model="edi.configuration.trigger"
77
>
8-
<field name="name">On PO state change</field>
9-
<field name="code">on_edi_purchase_order_state_change</field>
10-
<field name="description">Trigger when a purchase order state changes</field>
11-
<field name="model_id" ref="purchase.model_purchase_order" />
12-
</record>
8+
<field name="name">On PO state change</field>
9+
<field name="code">on_edi_purchase_order_state_change</field>
10+
<field name="description">Trigger when a purchase order state changes</field>
11+
<field name="model_id" ref="purchase.model_purchase_order" />
12+
</record>
1313
</odoo>
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<odoo>
3-
43
<record id="demo_edi_exc_type_order_out" model="edi.exchange.type">
54
<field name="backend_type_id" ref="demo_edi_backend_type_purchase" />
65
<field name="backend_id" ref="demo_edi_backend" />
@@ -10,5 +9,4 @@
109
<field name="exchange_filename_pattern">{record_name}-{type.code}-{dt}</field>
1110
<field name="exchange_file_ext">xml</field>
1211
</record>
13-
1412
</odoo>

edi_purchase_oca/models/purchase_order.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,3 @@ class PurchaseOrder(models.Model):
1010
"purchase.order",
1111
"edi.exchange.consumer.mixin",
1212
]
13-
14-
def button_confirm(self):
15-
res = super().button_confirm()
16-
# DEPRECATED: rely on `on_edi_purchase_order_state_change`
17-
# provided automatically by edi.consumer.mixin
18-
if self: # TODO: is this check necessary?
19-
self._event("on_button_confirm_purchase_order").notify(self)
20-
return res
21-
22-
def button_cancel(self):
23-
result = super().button_cancel()
24-
# DEPRECATED: rely on `on_edi_purchase_order_state_change`
25-
# provided automatically by edi.consumer.mixin
26-
if self:
27-
self._event("on_button_cancel_purchase_order").notify(self)
28-
return result
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
- Lois Rilo \<<lois.rilo@forgeflow.com>\>
1+
* Lois Rilo <lois.rilo@forgeflow.com>
2+
* Simone Orsi <simone.orsi@camptocamp.com>
3+
- Phan Hong Phuc \<<phucph@trobz.com>\>

edi_purchase_oca/readme/CONTRIBUTORS.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,2 @@
11
This module intends to create a base to be extended by local edi rules
2-
for purchase.
3-
4-
In order to add a new integration, you need to create a listener:
5-
6-
``` python
7-
class MyEventListener(Component):
8-
_name = "purchase.order.event.listener.demo"
9-
_inherit = "base.event.listener"
10-
_apply_on = ["purchase.order"]
11-
12-
def on_button_confirm_purchase_order(self, move):
13-
"""Add your code here"""
14-
```
2+
for purchase. Assign the EDI Configuration on the partner form.

edi_purchase_oca/readme/DESCRIPTION.rst

Lines changed: 0 additions & 23 deletions
This file was deleted.

edi_purchase_oca/static/description/index.html

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -371,17 +371,7 @@ <h1 class="title">EDI Purchase</h1>
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372372
<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_purchase_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_purchase_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>
373373
<p>This module intends to create a base to be extended by local edi rules
374-
for purchase.</p>
375-
<p>In order to add a new integration, you need to create a listener:</p>
376-
<pre class="code python literal-block">
377-
<span class="k">class</span><span class="w"> </span><span class="nc">MyEventListener</span><span class="p">(</span><span class="n">Component</span><span class="p">):</span><span class="w">
378-
</span> <span class="n">_name</span> <span class="o">=</span> <span class="s2">&quot;purchase.order.event.listener.demo&quot;</span><span class="w">
379-
</span> <span class="n">_inherit</span> <span class="o">=</span> <span class="s2">&quot;base.event.listener&quot;</span><span class="w">
380-
</span> <span class="n">_apply_on</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;purchase.order&quot;</span><span class="p">]</span><span class="w">
381-
382-
</span> <span class="k">def</span><span class="w"> </span><span class="nf">on_button_confirm_purchase_order</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">move</span><span class="p">):</span><span class="w">
383-
</span><span class="sd">&quot;&quot;&quot;Add your code here&quot;&quot;&quot;</span>
384-
</pre>
374+
for purchase. Assign the EDI Configuration on the partner form.</p>
385375
<p><strong>Table of contents</strong></p>
386376
<div class="contents local topic" id="contents">
387377
<ul class="simple">
@@ -408,12 +398,15 @@ <h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
408398
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
409399
<ul class="simple">
410400
<li>ForgeFlow</li>
401+
<li>Camptocamp</li>
411402
</ul>
412403
</div>
413404
<div class="section" id="contributors">
414405
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
415406
<ul class="simple">
416-
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
407+
<li>Lois Rilo <a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a></li>
408+
<li>Simone Orsi <a class="reference external" href="mailto:simone.orsi&#64;camptocamp.com">simone.orsi&#64;camptocamp.com</a></li>
409+
<li>Phan Hong Phuc &lt;<a class="reference external" href="mailto:phucph&#64;trobz.com">phucph&#64;trobz.com</a>&gt;</li>
417410
</ul>
418411
</div>
419412
<div class="section" id="maintainers">

0 commit comments

Comments
 (0)