Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
936752a
Add edi_storage
simahawk Nov 27, 2020
596e088
edi_storage: add base tests for component
simahawk Nov 27, 2020
6263607
edi_storage: fix messages test isolation
simahawk Nov 29, 2020
1a0540d
[UPD] Update edi_storage.pot
oca-travis Nov 30, 2020
f5915c0
edi_storage: adapt to edi api changes
simahawk Dec 2, 2020
05f4e59
edi_storage: put ack handling on hold
simahawk Dec 2, 2020
d4a0e65
edi_storage: adapt to new components lookup
simahawk Feb 8, 2021
7e69998
[CHG] edi: Use more permissive licence: AGPL-> LGPL
etobella Mar 10, 2021
fb37565
[UPD] README.rst
OCA-git-bot Mar 15, 2021
5f5c6b2
[FIX] edi_storage: sort key was not working properly
etobella Apr 7, 2021
f3c3c01
[IMP] edi_storage_oca: isort, black, prettier.
fshah-initos May 5, 2021
bd13e73
[MIG] Migrate module edi_storage_oca to v14.
fshah-initos May 5, 2021
66d6695
[UPD] Update edi_storage_oca.pot
oca-travis May 27, 2021
f4cdc1e
[UPD] README.rst
OCA-git-bot May 27, 2021
6ac1511
[IMP] edi_storage_oca: implement basis of the input process.
LoisRForgeFlow Jun 22, 2021
5b4ab72
[FIX] edi_oca: show the exchange file name while there is no file yet.
LoisRForgeFlow Jun 22, 2021
c82a2b8
edi_storage: improve input process
simahawk Jun 23, 2021
0f4214b
[FIX] edi_storage_oca: support the use or not of filename patern + sm…
LoisRForgeFlow Jun 23, 2021
4962087
[IMP] edi_storage_oca: add specific channel and job function definitions
LoisRForgeFlow Jul 1, 2021
db10dee
[FIX] edi_storage_oca: support regex pattern searching when fetching …
LoisRForgeFlow Jul 1, 2021
6524eb1
[FIX] edi_storage: consider if the exchange type has a specific backe…
LoisRForgeFlow Jul 2, 2021
45609f9
[IMP] : black, isort, prettier
LoisRForgeFlow Jul 5, 2021
29548bf
[UPD] Update edi_storage_oca.pot
oca-travis Jul 6, 2021
00c94f5
[UPD] README.rst
OCA-git-bot Jul 6, 2021
402fb4b
[IMP] edi_storage: add listener to move files to done/error dirs
LoisRForgeFlow Jul 5, 2021
358c0dc
[FIX] edi_storage: `list_files` expects a string.
LoisRForgeFlow Jul 9, 2021
da7d383
[14.0][FIX] edi_storage_oca: remove duplicate backend_type_id field i…
JordiMForgeFlow Aug 4, 2021
2903d4d
[FIX] edi_storage: incorrect call to output checker in receive compon…
LoisRForgeFlow Sep 6, 2021
650b8f9
edi: improve backend view extension
simahawk Sep 17, 2021
bbf6165
[UPD] Update edi_storage_oca.pot
oca-travis Oct 13, 2021
0c61ce1
edi: load main vars at init
simahawk Sep 22, 2021
9bb5cb6
edi_storage: fix find files test
simahawk Oct 30, 2021
d6a850e
[MIG][15.0] edi_storage_oca
i-vyshnevska Dec 5, 2021
0f6d16c
[UPD] Update edi_storage_oca.pot
Mar 15, 2022
579b482
[UPD] README.rst
OCA-git-bot Mar 15, 2022
037829c
edi: get rid of name, use identifier
simahawk Mar 10, 2022
800ce39
edi_storage: fail gracefully w/o error report
simahawk Mar 10, 2022
af95972
[IMP] edi_storage_oca: Update development status
JasminSForgeFlow Apr 12, 2022
68371b7
[UPD] README.rst
OCA-git-bot Apr 12, 2022
072aa08
edi_storage_oca: improve error handling
jcoux May 17, 2022
9b89ff6
edi_storage: path configurable by type and param
simahawk May 6, 2022
f660bb0
[UPD] README.rst
OCA-git-bot Sep 3, 2023
59be4a7
[MIG] edi_storage_oca: Migration to 16.0
Sep 29, 2023
41eec53
[UPD] Update edi_storage_oca.pot
Jan 31, 2024
65df9ed
edi_storage_oca: replace use of 'fs_storage' deprecated functions
Feb 1, 2024
2603b70
[IMP] edi_storage_oca: Add and use the storage_id field on edi.exchan…
thienvh332 Feb 27, 2024
560d8d8
[IMP] edi_storage_oca: Fix permission
tuantrantg Mar 26, 2024
5f83d30
edi_storage: handle missing trailing slash
simahawk Apr 10, 2024
726549d
Added translation using Weblate (Italian)
mymage May 13, 2024
bbf8555
[IMP] edi_storage_oca: Add script to migrate to v16
Jul 5, 2024
5815c6d
[OU] edi_storage_oca: Finish migration scripts
etobella Dec 19, 2024
71e3951
[BOT] post-merge updates
OCA-git-bot Jan 9, 2025
99e0932
[IMP] edi_storage_oca: pre-commit auto fixes
Ricardoalso Jan 16, 2025
9d88fca
[MIG] edi_storage_oca: Migration to 17.0
luisDIXMIT Oct 14, 2024
60c0d71
[IMP] edi_storage_oca: This code is no longer necessary
etobella Dec 11, 2024
617159f
[FIX] edi_storage_oca: Return full path
etobella Jan 3, 2025
5232bb7
[MIG] edi_storage_oca: Migration to 18.0
Ricardoalso Jan 16, 2025
6a74524
[MIG] edi_storage_oca: Adapt to changed of edi_core_oca
etobella Oct 1, 2025
e2d2f44
[ADD] edi_storage_queue_oca
etobella Oct 1, 2025
46acf6a
[IMP] edi_storage_oca: Allow EDI user to access storage model
etobella Nov 14, 2025
bd0c42e
[UPD] Update edi_storage_oca.pot
Dec 1, 2025
ae3166c
[BOT] post-merge updates
OCA-git-bot Dec 1, 2025
1fd997d
[FIX] edi_storage_oca: Remove legacy storage component code
HviorForgeFlow Dec 6, 2025
025d2c3
[FIX] edi_storage_oca: fix migration script
JordiMForgeFlow Dec 9, 2025
094a52c
[BOT] post-merge updates
OCA-git-bot Dec 9, 2025
037cd9e
[BOT] post-merge updates
OCA-git-bot Dec 9, 2025
87576f3
[FIX] edi_storage_oca: ls whitespace filename with ftp protocol
ArnauCForgeFlow Jan 13, 2026
ed17e41
[FIX] edi_storage_oca: raise error if file is missing when performing…
ArnauCForgeFlow May 12, 2026
7133c4e
[BOT] post-merge updates
OCA-git-bot May 27, 2026
8ba88da
[UPD] Update edi_storage_oca.pot
May 27, 2026
613481f
[BOT] post-merge updates
OCA-git-bot May 27, 2026
d77f1f2
Update translation files
weblate May 27, 2026
b6d0caf
[IMP] edi_storage_oca: post-process input file via conf
ArnauCForgeFlow May 19, 2026
bde2a76
Translated using Weblate (Italian)
mymage May 29, 2026
550cada
[BOT] post-merge updates
OCA-git-bot Jun 3, 2026
69f0e25
[IMP] edi_storage_oca: pre-commit auto fixes
sergijPf Jun 8, 2026
efd2285
[MIG] edi_storage_oca: Migration to 19.0
sergijPf Jun 8, 2026
63d8a4e
[UPD] Update edi_storage_oca.pot
Sep 1, 2026
47ab02c
[BOT] post-merge updates
OCA-git-bot Sep 1, 2026
b4d5975
[MIG] edi_storage_oca: Migration to 20.0
dreispt Nov 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions edi_storage_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===========================
EDI Storage backend support
===========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:efca3241d581023ae1e96a7ae2db56201e17c53a8221d37b55a07058bff6f3d5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github
:target: https://github.com/OCA/edi-framework/tree/20.0/edi_storage_oca
:alt: OCA/edi-framework
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/edi-framework-20-0/edi-framework-20-0-edi_storage_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=20.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Allow exchange files using storage backends from OCA/storage.

This module adds a storage backend relation on the EDI backend. There
you can configure the backend to be used (most often and SFTP) and the
paths where to read or put files.

Often the convention when exchanging files via SFTP is to have one input
forder (to receive files) and an output folder (to send files).

Inside this folder you have this hierarchy:

::

input/output folder
|- pending
|- done
|- error

- pending folder contains files that have been just sent
- done folder contains files that have been processes successfully
- error folder contains files with errors and cannot be processed

The storage handlers take care of reading files and putting files
in/from the right place and update exchange records data accordingly.

**Table of contents**

.. contents::
:local:

Configuration
=============

This module has two **inactive** global ``edi.configuration`` records
that move the input file across the storage directories on
``on_edi_exchange_done`` / ``on_edi_exchange_error``:

- \*Storage: move input file, pending → done (fallback error → done)
- \*Storage: move input file, pending → error

Before enabling them you **must** set ``backend_id`` on the record:
otherwise the global match runs against every backend in the database,
including non-storage ones.

Usage
=====

Go to "EDI -> EDI backend" then configure your backend to use a storage
backend.

Known issues / Roadmap
======================

- clean deprecated methods in the storage

Bug Tracker
===========

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

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

Credits
=======

Authors
-------

* ACSONE

Contributors
------------

- Simone Orsi <simahawk@gmail.com>
- Foram Shah <foram.shah@initos.com>
- Lois Rilo <lois.rilo@forgeflow.com>
- Duong (Tran Quoc) <duongtq@trobz.com>
- `Dixmit <https://www.dixmit.com>`__:

- Enric Tobella

- Daniel Reis <dreis.pt@gmail.com>

Other credits
-------------

The migration of this module from 15.0 to 16.0 was financially supported
by Camptocamp.

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/edi-framework <https://github.com/OCA/edi-framework/tree/20.0/edi_storage_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions edi_storage_oca/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions edi_storage_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2020 ACSONE
# @author: Simone Orsi <simahawk@gmail.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

{
"name": "EDI Storage backend support",
"summary": "Base module to allow exchanging files via storage backend (eg: SFTP).",
"version": "20.0.1.0.0",
"development_status": "Beta",
"license": "LGPL-3",
"website": "https://github.com/OCA/edi-framework",
"author": "ACSONE,Odoo Community Association (OCA)",
"depends": ["edi_core_oca", "fs_storage"],
"data": [
"data/cron.xml",
"data/edi_configuration.xml",
"security/ir.access.csv",
"views/edi_backend_views.xml",
],
"installable": True,
}
15 changes: 15 additions & 0 deletions edi_storage_oca/data/cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo noupdate="1">
<record id="cron_check_storage_pending_input" model="ir.cron" forcecreate="True">
<field name="name">EDI backend storage check pending input</field>
<field name="active" eval="True" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number" eval="1" />
<field name="interval_type">hours</field>
<field name="model_id" ref="edi_core_oca.model_edi_backend" />
<field name="state">code</field>
<field
name="code"
>model.search([('storage_id', '!=', False)])._storage_cron_check_pending_input()</field>
</record>
</odoo>
29 changes: 29 additions & 0 deletions edi_storage_oca/data/edi_configuration.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo noupdate="1">
<!--
IMPORTANT: these configurations are *inactive* by default. Before
activating them, set 'backend_id' to the specific storage backend
whose directories should be used, otherwise the snippet will not
know which input_dir_pending / input_dir_done / input_dir_error to
operate on.
-->
<record id="edi_conf_storage_move_on_done" model="edi.configuration">
<field name="name">Storage: move input file to done</field>
<field name="active" eval="False" />
<field name="is_global" eval="True" />
<field name="trigger_id" ref="edi_core_oca.edi_config_trigger_record_done" />
<field
name="snippet_do"
>record.backend_id._storage_on_edi_exchange_done(record)</field>
</record>

<record id="edi_conf_storage_move_on_error" model="edi.configuration">
<field name="name">Storage: move input file to error</field>
<field name="active" eval="False" />
<field name="is_global" eval="True" />
<field name="trigger_id" ref="edi_core_oca.edi_config_trigger_record_error" />
<field
name="snippet_do"
>record.backend_id._storage_on_edi_exchange_error(record)</field>
</record>
</odoo>
142 changes: 142 additions & 0 deletions edi_storage_oca/i18n/edi_storage_oca.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * edi_storage_oca
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: edi_storage_oca
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_backend__display_name
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_exchange_record__display_name
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_exchange_type__display_name
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_oca_storage_handler__display_name
msgid "Display Name"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model,name:edi_storage_oca.model_edi_backend
msgid "EDI Backend"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model,name:edi_storage_oca.model_edi_exchange_type
msgid "EDI Exchange Type"
msgstr ""

#. module: edi_storage_oca
#: model:ir.actions.server,name:edi_storage_oca.cron_check_storage_pending_input_ir_actions_server
msgid "EDI backend storage check pending input"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model,name:edi_storage_oca.model_edi_exchange_record
msgid "EDI exchange Record"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_exchange_type__exchange_filename_pattern
msgid "Exchange Filename Pattern"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_backend__storage_id
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_exchange_record__storage_id
msgid "FS Storage"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,help:edi_storage_oca.field_edi_exchange_type__exchange_filename_pattern
msgid ""
"For output exchange types this should be a formatting string with the following variables available (to be used between brackets, `{}`): `exchange_record`, `record_name`, `type` and `dt`. For instance, a valid string would be {record_name}-{type.code}-{dt}\n"
"For input exchange types related to storage backends it should be a regex expression to filter the files to be fetched from the pending directory in the related storage. E.g: `.*my-type-[0-9]*.\\.csv`"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_backend__id
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_exchange_record__id
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_exchange_type__id
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_oca_storage_handler__id
msgid "ID"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_backend__input_dir_done
msgid "Input done directory"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_backend__input_dir_error
msgid "Input error directory"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_backend__input_dir_pending
msgid "Input pending directory"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_backend__output_dir_done
msgid "Output done directory"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_backend__output_dir_error
msgid "Output error directory"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,field_description:edi_storage_oca.field_edi_backend__output_dir_pending
msgid "Output pending directory"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,help:edi_storage_oca.field_edi_backend__input_dir_done
#: model:ir.model.fields,help:edi_storage_oca.field_edi_backend__output_dir_done
msgid "Path to folder for doneful operations"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,help:edi_storage_oca.field_edi_backend__input_dir_error
#: model:ir.model.fields,help:edi_storage_oca.field_edi_backend__output_dir_error
msgid "Path to folder for error operations"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,help:edi_storage_oca.field_edi_backend__input_dir_pending
#: model:ir.model.fields,help:edi_storage_oca.field_edi_backend__output_dir_pending
msgid "Path to folder for pending operations"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,help:edi_storage_oca.field_edi_exchange_record__storage_id
msgid "Record created from a file found in this FS storage"
msgstr ""

#. module: edi_storage_oca
#: model_terms:ir.ui.view,arch_db:edi_storage_oca.edi_backend_view_form
msgid "Storage"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model,name:edi_storage_oca.model_edi_oca_storage_handler
msgid "Storage Handler for EDI"
msgstr ""

#. module: edi_storage_oca
#. odoo-python
#: code:addons/edi_storage_oca/models/edi_oca_storage_handler.py:0
msgid "Storage error while reading %(path)s: %(error)s"
msgstr ""

#. module: edi_storage_oca
#: model:ir.model.fields,help:edi_storage_oca.field_edi_backend__storage_id
msgid "Storage for in-out files"
msgstr ""
Loading
Loading