Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
4d348b5
Add edi_storage
simahawk Nov 27, 2020
cb14b90
edi_storage: add base tests for component
simahawk Nov 27, 2020
05a4b25
edi_storage: fix messages test isolation
simahawk Nov 29, 2020
fcfdad9
[UPD] Update edi_storage.pot
oca-travis Nov 30, 2020
6889af8
edi_storage: adapt to edi api changes
simahawk Dec 2, 2020
a33e85f
edi_storage: put ack handling on hold
simahawk Dec 2, 2020
d6497ae
edi_storage: adapt to new components lookup
simahawk Feb 8, 2021
543db9b
[CHG] edi: Use more permissive licence: AGPL-> LGPL
etobella Mar 10, 2021
698aee3
[UPD] README.rst
OCA-git-bot Mar 15, 2021
20f3289
[FIX] edi_storage: sort key was not working properly
etobella Apr 7, 2021
3316a5c
[IMP] edi_storage_oca: isort, black, prettier.
fshah-initos May 5, 2021
f4a6c78
[MIG] Migrate module edi_storage_oca to v14.
fshah-initos May 5, 2021
99eed92
[UPD] Update edi_storage_oca.pot
oca-travis May 27, 2021
481d592
[UPD] README.rst
OCA-git-bot May 27, 2021
ebc3bce
[IMP] edi_storage_oca: implement basis of the input process.
LoisRForgeFlow Jun 22, 2021
2f004bf
[FIX] edi_oca: show the exchange file name while there is no file yet.
LoisRForgeFlow Jun 22, 2021
b386bf5
edi_storage: improve input process
simahawk Jun 23, 2021
e410999
[FIX] edi_storage_oca: support the use or not of filename patern + sm…
LoisRForgeFlow Jun 23, 2021
1f53792
[IMP] edi_storage_oca: add specific channel and job function definitions
LoisRForgeFlow Jul 1, 2021
f35489f
[FIX] edi_storage_oca: support regex pattern searching when fetching …
LoisRForgeFlow Jul 1, 2021
9ff1cae
[FIX] edi_storage: consider if the exchange type has a specific backe…
LoisRForgeFlow Jul 2, 2021
9246cc3
[IMP] : black, isort, prettier
LoisRForgeFlow Jul 5, 2021
144c434
[UPD] Update edi_storage_oca.pot
oca-travis Jul 6, 2021
d8fee63
[UPD] README.rst
OCA-git-bot Jul 6, 2021
52f0b88
[IMP] edi_storage: add listener to move files to done/error dirs
LoisRForgeFlow Jul 5, 2021
8cc85e8
[FIX] edi_storage: `list_files` expects a string.
LoisRForgeFlow Jul 9, 2021
eb55385
[14.0][FIX] edi_storage_oca: remove duplicate backend_type_id field i…
JordiMForgeFlow Aug 4, 2021
b9a4640
[FIX] edi_storage: incorrect call to output checker in receive compon…
LoisRForgeFlow Sep 6, 2021
241c45b
edi: improve backend view extension
simahawk Sep 17, 2021
3f2a48c
[UPD] Update edi_storage_oca.pot
oca-travis Oct 13, 2021
da890c2
edi: load main vars at init
simahawk Sep 22, 2021
422d8d1
edi_storage: fix find files test
simahawk Oct 30, 2021
0c5d63d
[MIG][15.0] edi_storage_oca
i-vyshnevska Dec 5, 2021
f623aae
[UPD] Update edi_storage_oca.pot
Mar 15, 2022
c63f794
[UPD] README.rst
OCA-git-bot Mar 15, 2022
f794243
edi: get rid of name, use identifier
simahawk Mar 10, 2022
199b446
edi_storage: fail gracefully w/o error report
simahawk Mar 10, 2022
e9449d0
[IMP] edi_storage_oca: Update development status
JasminSForgeFlow Apr 12, 2022
df13900
[UPD] README.rst
OCA-git-bot Apr 12, 2022
67f110e
edi_storage_oca: improve error handling
jcoux May 17, 2022
c33fa86
edi_storage: path configurable by type and param
simahawk May 6, 2022
13fef0d
[UPD] README.rst
OCA-git-bot Sep 3, 2023
019d14d
[MIG] edi_storage_oca: Migration to 16.0
Sep 29, 2023
ba32ab0
[UPD] Update edi_storage_oca.pot
Jan 31, 2024
0da887f
edi_storage_oca: replace use of 'fs_storage' deprecated functions
Feb 1, 2024
01e97a6
[IMP] edi_storage_oca: Add and use the storage_id field on edi.exchan…
thienvh332 Feb 27, 2024
9224b13
[IMP] edi_storage_oca: Fix permission
tuantrantg Mar 26, 2024
a923341
edi_storage: handle missing trailing slash
simahawk Apr 10, 2024
5a5b0d3
Added translation using Weblate (Italian)
mymage May 13, 2024
9b88637
[IMP] edi_storage_oca: Add script to migrate to v16
Jul 5, 2024
b0be6d5
[OU] edi_storage_oca: Finish migration scripts
etobella Dec 19, 2024
0484767
[BOT] post-merge updates
OCA-git-bot Jan 9, 2025
049daf3
[IMP] edi_storage_oca: pre-commit auto fixes
Ricardoalso Jan 16, 2025
a2fccab
[MIG] edi_storage_oca: Migration to 17.0
luisDIXMIT Oct 14, 2024
6822849
[IMP] edi_storage_oca: This code is no longer necessary
etobella Dec 11, 2024
09b0eae
[FIX] edi_storage_oca: Return full path
etobella Jan 3, 2025
f5c56e9
[MIG] edi_storage_oca: Migration to 18.0
Ricardoalso Jan 16, 2025
911618a
[MIG] edi_storage_oca: Adapt to changed of edi_core_oca
etobella Oct 1, 2025
b7a31a1
[ADD] edi_storage_queue_oca
etobella Oct 1, 2025
f23bd77
[IMP] edi_storage_oca: Allow EDI user to access storage model
etobella Nov 14, 2025
b646cd2
[UPD] Update edi_storage_oca.pot
Dec 1, 2025
cbfb56d
[BOT] post-merge updates
OCA-git-bot Dec 1, 2025
386db9f
[FIX] edi_storage_oca: Remove legacy storage component code
HviorForgeFlow Dec 6, 2025
a9f086a
[FIX] edi_storage_oca: fix migration script
JordiMForgeFlow Dec 9, 2025
c5daa2c
[BOT] post-merge updates
OCA-git-bot Dec 9, 2025
a6bd651
[BOT] post-merge updates
OCA-git-bot Dec 9, 2025
a557fe7
[FIX] edi_storage_oca: ls whitespace filename with ftp protocol
ArnauCForgeFlow Jan 13, 2026
8021d65
[FIX] edi_storage_oca: raise error if file is missing when performing…
ArnauCForgeFlow May 12, 2026
92de086
[BOT] post-merge updates
OCA-git-bot May 27, 2026
121f538
[UPD] Update edi_storage_oca.pot
May 27, 2026
0dbd5df
[BOT] post-merge updates
OCA-git-bot May 27, 2026
a9dec24
Update translation files
weblate May 27, 2026
23643be
[IMP] edi_storage_oca: post-process input file via conf
ArnauCForgeFlow May 19, 2026
8bef029
Translated using Weblate (Italian)
mymage May 29, 2026
21394fc
[BOT] post-merge updates
OCA-git-bot Jun 3, 2026
680c18f
[IMP] edi_storage_oca: pre-commit auto fixes
sergijPf Jun 8, 2026
700bb1c
[MIG] edi_storage_oca: Migration to 19.0
sergijPf Jun 8, 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
140 changes: 140 additions & 0 deletions edi_storage_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
.. 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:f0ff3ee30416f5a8090d6c738df2c392381b61bc0d104c7679a147ce3b503018
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/19.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-19-0/edi-framework-19-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=19.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:%2019.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

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/19.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
22 changes: 22 additions & 0 deletions edi_storage_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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": "19.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_model_access.xml",
"views/edi_backend_views.xml",
],
}
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">1</field>
<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>
126 changes: 126 additions & 0 deletions edi_storage_oca/i18n/edi_storage_oca.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * edi_storage_oca
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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,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__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