forked from OCA/edi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UPD] edi_purchase_edifact_oca: update version to 12.0.1.1.0
- Loading branch information
1 parent
51ca31e
commit dd7e093
Showing
3 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
edi_purchase_edifact_oca/migrations/12.0.1.1.0/post-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |