Skip to content

Commit f5bfe15

Browse files
committed
[MIG] edi_purchase_oca: Migration to 18.0
1 parent 888c9c7 commit f5bfe15

25 files changed

Lines changed: 138 additions & 215 deletions

edi_purchase_oca/README.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,15 @@ Authors
6565
-------
6666

6767
* ForgeFlow
68+
* Camptocamp
6869

6970
Contributors
7071
------------
7172

72-
- Lois Rilo <lois.rilo@forgeflow.com>
73+
- Lois Rilo lois.rilo@forgeflow.com
74+
- Simone Orsi simone.orsi@camptocamp.com
75+
76+
- Phan Hong Phuc <phucph@trobz.com>
7377

7478
Maintainers
7579
-----------

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/i18n/edi_purchase_oca.pot

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
#
55
msgid ""
66
msgstr ""
7-
"Project-Id-Version: Odoo Server 14.0\n"
7+
"Project-Id-Version: Odoo Server 18.0\n"
88
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2025-12-31 04:47+0000\n"
10+
"PO-Revision-Date: 2025-12-31 04:47+0000\n"
911
"Last-Translator: \n"
1012
"Language-Team: \n"
1113
"MIME-Version: 1.0\n"
@@ -19,18 +21,23 @@ msgid "<span class=\"o_stat_text\">EDI</span>"
1921
msgstr ""
2022

2123
#. module: edi_purchase_oca
22-
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__disable_edi_auto
23-
msgid "Disable auto"
24+
#: model:ir.model,name:edi_purchase_oca.model_res_partner
25+
msgid "Contact"
2426
msgstr ""
2527

2628
#. module: edi_purchase_oca
27-
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__display_name
28-
msgid "Display Name"
29+
#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form
30+
msgid "Disable"
2931
msgstr ""
3032

3133
#. module: edi_purchase_oca
32-
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id
33-
msgid "EDI origin endpoint"
34+
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_disable_auto
35+
msgid "Disable auto"
36+
msgstr ""
37+
38+
#. module: edi_purchase_oca
39+
#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form
40+
msgid "EDI"
3441
msgstr ""
3542

3643
#. module: edi_purchase_oca
@@ -43,6 +50,12 @@ msgstr ""
4350
msgid "EDI origin record"
4451
msgstr ""
4552

53+
#. module: edi_purchase_oca
54+
#: model:ir.model.fields,field_description:edi_purchase_oca.field_res_partner__edi_purchase_conf_ids
55+
#: model:ir.model.fields,field_description:edi_purchase_oca.field_res_users__edi_purchase_conf_ids
56+
msgid "EDI purchase configuration"
57+
msgstr ""
58+
4659
#. module: edi_purchase_oca
4760
#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_exchange_record_id
4861
msgid "EDI record that originated this document."
@@ -58,6 +71,11 @@ msgstr ""
5871
msgid "Edi Has Form Config"
5972
msgstr ""
6073

74+
#. module: edi_purchase_oca
75+
#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form
76+
msgid "Electronic Data Interchange"
77+
msgstr ""
78+
6179
#. module: edi_purchase_oca
6280
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_ids
6381
msgid "Exchange Record"
@@ -69,18 +87,18 @@ msgid "Exchange Record Count"
6987
msgstr ""
7088

7189
#. module: edi_purchase_oca
72-
#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_root
73-
msgid "Exchange records"
90+
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_related_record_ids
91+
msgid "Exchange Related Record"
7492
msgstr ""
7593

7694
#. module: edi_purchase_oca
77-
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__id
78-
msgid "ID"
95+
#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_root
96+
msgid "Exchange records"
7997
msgstr ""
8098

8199
#. module: edi_purchase_oca
82-
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order____last_update
83-
msgid "Last Modified on"
100+
#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.view_partner_form
101+
msgid "Purchase"
84102
msgstr ""
85103

86104
#. module: edi_purchase_oca
@@ -99,11 +117,6 @@ msgid "Purchase Orders"
99117
msgstr ""
100118

101119
#. module: edi_purchase_oca
102-
#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id
103-
msgid "Record generated via this endpoint"
104-
msgstr ""
105-
106-
#. module: edi_purchase_oca
107-
#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__disable_edi_auto
120+
#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__edi_disable_auto
108121
msgid "When marked, EDI automatic processing will be avoided"
109122
msgstr ""

edi_purchase_oca/i18n/es.po

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,41 @@
44
#
55
msgid ""
66
msgstr ""
7-
"Project-Id-Version: Odoo Server 14.0\n"
7+
"Project-Id-Version: Odoo Server 18.0\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"PO-Revision-Date: 2023-11-25 11:34+0000\n"
10-
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
11-
"Language-Team: none\n"
12-
"Language: es\n"
9+
"POT-Creation-Date: 2025-12-31 04:48+0000\n"
10+
"PO-Revision-Date: 2025-12-31 04:48+0000\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
1313
"MIME-Version: 1.0\n"
1414
"Content-Type: text/plain; charset=UTF-8\n"
1515
"Content-Transfer-Encoding: \n"
16-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17-
"X-Generator: Weblate 4.17\n"
16+
"Plural-Forms: \n"
1817

1918
#. module: edi_purchase_oca
2019
#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form
2120
msgid "<span class=\"o_stat_text\">EDI</span>"
2221
msgstr "<span class=\"o_stat_text\">EDI</span>"
2322

2423
#. module: edi_purchase_oca
25-
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__disable_edi_auto
26-
msgid "Disable auto"
27-
msgstr "Deshabilitar auto"
24+
#: model:ir.model,name:edi_purchase_oca.model_res_partner
25+
msgid "Contact"
26+
msgstr "Contacto"
2827

2928
#. module: edi_purchase_oca
30-
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__display_name
31-
msgid "Display Name"
32-
msgstr "Mostrar Nombre"
29+
#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form
30+
msgid "Disable"
31+
msgstr "Desactivar"
3332

3433
#. module: edi_purchase_oca
35-
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id
36-
msgid "EDI origin endpoint"
37-
msgstr "Punto final de origen EDI"
34+
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_disable_auto
35+
msgid "Disable auto"
36+
msgstr "Desactivar automático"
37+
38+
#. module: edi_purchase_oca
39+
#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form
40+
msgid "EDI"
41+
msgstr "EDI"
3842

3943
#. module: edi_purchase_oca
4044
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_exchange_type_id
@@ -46,67 +50,73 @@ msgstr "Tipo de intercambio de origen EDI"
4650
msgid "EDI origin record"
4751
msgstr "Registro de origen EDI"
4852

53+
#. module: edi_purchase_oca
54+
#: model:ir.model.fields,field_description:edi_purchase_oca.field_res_partner__edi_purchase_conf_ids
55+
#: model:ir.model.fields,field_description:edi_purchase_oca.field_res_users__edi_purchase_conf_ids
56+
msgid "EDI purchase configuration"
57+
msgstr "Configuración de compra EDI"
58+
4959
#. module: edi_purchase_oca
5060
#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_exchange_record_id
5161
msgid "EDI record that originated this document."
52-
msgstr "Registro EDI que originó este documento."
62+
msgstr "Registro EDI que originó este documento"
5363

5464
#. module: edi_purchase_oca
5565
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_config
5666
msgid "Edi Config"
57-
msgstr "Configuración Edi"
67+
msgstr "Configuración EDI"
5868

5969
#. module: edi_purchase_oca
6070
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_has_form_config
6171
msgid "Edi Has Form Config"
62-
msgstr "Edi Tiene Formulario Config"
72+
msgstr "EDI tiene configuración de formulario"
73+
74+
#. module: edi_purchase_oca
75+
#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form
76+
msgid "Electronic Data Interchange"
77+
msgstr "Intercambio Electrónico de Datos"
6378

6479
#. module: edi_purchase_oca
6580
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_ids
6681
msgid "Exchange Record"
67-
msgstr "Registro de Intercambio"
82+
msgstr "Registro de intercambio"
6883

6984
#. module: edi_purchase_oca
7085
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_count
7186
msgid "Exchange Record Count"
72-
msgstr "Recuento de Registros de Intercambio"
87+
msgstr "Conteo de registros de intercambio"
88+
89+
#. module: edi_purchase_oca
90+
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_related_record_ids
91+
msgid "Exchange Related Record"
92+
msgstr "Registro relacionado con el intercambio"
7393

7494
#. module: edi_purchase_oca
7595
#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_root
7696
msgid "Exchange records"
7797
msgstr "Registros de intercambio"
7898

7999
#. module: edi_purchase_oca
80-
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__id
81-
msgid "ID"
82-
msgstr "ID"
83-
84-
#. module: edi_purchase_oca
85-
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order____last_update
86-
msgid "Last Modified on"
87-
msgstr "Última actualización el"
100+
#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.view_partner_form
101+
msgid "Purchase"
102+
msgstr "Compra"
88103

89104
#. module: edi_purchase_oca
90105
#: model:ir.model,name:edi_purchase_oca.model_purchase_order
91106
msgid "Purchase Order"
92-
msgstr "Orden de Compra"
107+
msgstr "Orden de compra"
93108

94109
#. module: edi_purchase_oca
95110
#: model:ir.actions.act_window,name:edi_purchase_oca.act_open_edi_exchange_record_purchase_order_view
96111
msgid "Purchase Order Exchange Record"
97-
msgstr "Registro de Intercambio de Órdenes de Compra"
112+
msgstr "Registro de intercambio de la orden de compra"
98113

99114
#. module: edi_purchase_oca
100115
#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_exchange_record
101116
msgid "Purchase Orders"
102-
msgstr "Órdenes de Compra"
103-
104-
#. module: edi_purchase_oca
105-
#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id
106-
msgid "Record generated via this endpoint"
107-
msgstr "Registro generado a través de este punto final"
117+
msgstr "Órdenes de compra"
108118

109119
#. module: edi_purchase_oca
110-
#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__disable_edi_auto
120+
#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__edi_disable_auto
111121
msgid "When marked, EDI automatic processing will be avoided"
112-
msgstr "Si se marca, se evitará el procesamiento automático EDI"
122+
msgstr "Cuando se marque, se evitará el procesamiento automático de EDI"
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com)
22
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
33

4+
from contextlib import contextmanager
5+
46
from odoo import models
57

68

@@ -12,17 +14,19 @@ class PurchaseOrder(models.Model):
1214
]
1315

1416
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
17+
with self._edi_purchase_order_state_change_trigger():
18+
result = super().button_confirm()
19+
return result
2120

2221
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)
22+
with self._edi_purchase_order_state_change_trigger():
23+
result = super().button_cancel()
2824
return result
25+
26+
@contextmanager
27+
def _edi_purchase_order_state_change_trigger(self):
28+
for order in self:
29+
order._event("on_edi_purchase_order_state_change").notify(
30+
order, state=order.state
31+
)
32+
yield
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.

edi_purchase_oca/readme/DESCRIPTION.rst

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

0 commit comments

Comments
 (0)