Skip to content

Commit

Permalink
[UPD] edi_purchase_edifact_oca: update version to 12.0.1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thienvh332 committed Jan 17, 2025
1 parent 51ca31e commit dd7e093
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion edi_purchase_edifact_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "EDI PURCHASE EDIFACT OCA",
"summary": "Create and send EDIFACT order files",
"version": "12.0.1.0.0",
"version": "12.0.1.1.0",
"development_status": "Alpha",
"website": "https://github.com/OCA/edi",
"author": "Trobz, Odoo Community Association (OCA)",
Expand Down
5 changes: 3 additions & 2 deletions edi_purchase_edifact_oca/data/edi_exchange_type.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
<field name="backend_type_id" ref="edi_backend_type_edifact" />
<field name="name">EDIFACT-IN-DESPATCH-ADVICE</field>
<field name="code">edifact_in_despatch_advice</field>
<field name="exchange_filename_pattern">D{dt}</field>
<field name="exchange_file_ext">txt</field>
<field name="exchange_filename_pattern">output.{dt}</field>
<field name="exchange_file_ext">edi</field>
<field name="direction">input</field>
<field name="quick_exec" eval="True" />
<field name="exchange_file_auto_generate">True</field>
<field name="encoding">iso-8859-1</field>
<field name="encoding_out_error_handler">strict</field>
Expand Down
32 changes: 32 additions & 0 deletions edi_purchase_edifact_oca/migrations/12.0.1.1.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2024 Trobz
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

import logging

from odoo import tools

_logger = logging.getLogger(__name__)


def force_update_data(cr, module, paths):
"""Force the update of XML records as they are flagged as 'noupdate'."""
for file_path in paths:
tools.convert.convert_file(
cr,
module,
file_path,
None,
mode="init",
kind="data",
)


def migrate(cr, version):
if not version:
return
force_update_data(
cr,
"edi_purchase_edifact_oca",
("data/edi_exchange_type.xml",),
)
_logger.info("Updated despatch advice edi exchange type")

0 comments on commit dd7e093

Please sign in to comment.