Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
453 commits
Select commit Hold shift + click to select a range
87fe088
edi_oca: add some TODOs
simahawk Aug 2, 2022
e4aeb64
edi_oca: improve auto btns
simahawk Aug 2, 2022
6991949
edi_oca: update ownership
simahawk Aug 2, 2022
3d13e8e
edi_oca: fix docstring on consumer mixin
simahawk Aug 10, 2022
4e84d53
[IMP] edi: archive edi_backend
JaumeBforgeFlow Jul 8, 2022
57e363f
edi: fix process break on error ctx key
simahawk Aug 14, 2022
e576298
edi: improve create record validation
simahawk Aug 14, 2022
77bc3ab
edi: ease creation of child records
simahawk Aug 17, 2022
373875d
edi: add edi_id_mixin
simahawk Aug 17, 2022
26c54ff
edi: add meth _is_valid_edi_action
simahawk Aug 11, 2022
d78a0b3
edi: improve consumer mixin helpers
simahawk Aug 11, 2022
727601b
edi: fix exc_rec.action_exchange_generate
simahawk Aug 11, 2022
7f10979
edi: improve exc_rec._trigger_edi_event
simahawk Aug 11, 2022
47e4bd0
edi: silent loggers in tests
simahawk Jul 15, 2022
c2c20c0
edi_oca: bump 15.0.1.4.0
simahawk Aug 19, 2022
7e33815
[UPD] Update edi_oca.pot
Feb 2, 2023
2cb9cef
[UPD] README.rst
OCA-git-bot Feb 2, 2023
58729d5
edi_oca 15.0.1.5.0
OCA-git-bot Feb 2, 2023
e24c2d9
Update translation files
weblate Feb 2, 2023
a42ec94
edi: fix consumer mixin test
simahawk Aug 19, 2022
35a38e5
edi: improve consumer mixin w/ origin
simahawk Aug 19, 2022
07731da
edi: add test for create child/ack
simahawk Aug 19, 2022
e25c86c
edi: add 'ack for' on type
simahawk Aug 19, 2022
ba4cfed
edi: improve exc type search
simahawk Aug 19, 2022
78d50aa
edi: fix ack record compute
simahawk Aug 22, 2022
9f51b48
edi: fix exchange ordering
simahawk Aug 22, 2022
5de2409
edi: fix record and type copy on fields
simahawk Aug 25, 2022
fb59a79
edi: fix error msg typo
simahawk Aug 27, 2022
942e5bb
edi: add exc.type.set_settings method
simahawk Aug 27, 2022
fea9770
edi: improve chatter msg w/ type detail
simahawk Aug 27, 2022
f531924
edi: fix _cron_check_output_exchange_sync
simahawk Aug 28, 2022
d3ee01b
edi: fix backward compat usage of _has_exchange_record_domain
simahawk Sep 5, 2022
0a04702
edi: allow search consumers by exc type
simahawk Sep 2, 2022
643e5ab
edi: fix action_view_edi_records
simahawk Sep 2, 2022
ed4e642
edi: improve consumer record count perf
simahawk Sep 2, 2022
43f8a73
edi: fix record missing indexes
simahawk Sep 2, 2022
de1468a
edi: imp backend check input/output
simahawk Sep 2, 2022
2678b01
edi: improve cron names
simahawk Sep 2, 2022
fdccefa
edi: exchange type add TODO
simahawk Sep 5, 2022
385b7f3
edi: add test for exc.record.action_retry
simahawk Sep 2, 2022
427804e
edi: fix exc.record._compute_retryable
simahawk Sep 2, 2022
471d814
edi: add quick exec option by type
simahawk Sep 2, 2022
b020077
edi: drop ack record auto create
simahawk Sep 16, 2022
5ad2b9c
edi: fix _get_component ctx propagation
simahawk Oct 5, 2022
050fd36
edi: add 'as_bytes' option to _get_file_content
simahawk Oct 3, 2022
5e33146
edi_oca: assertion was not executed
florentx May 17, 2023
a1aca25
edi_oca: avoid ghost exchange records
florentx May 16, 2023
7b23cd1
edi_oca: log warning for deleted records
florentx May 17, 2023
088f11b
edi_oca: avoid backend mismatch
florentx May 16, 2023
18e1735
edi: unify action complete notification
simahawk May 17, 2023
008f21a
edi: trigger generic event on action complete
simahawk May 17, 2023
7d62e05
edi: trigger generic event on related record
simahawk May 18, 2023
7bd7086
edi: mark every session w/ 'edi_framework' ctx key
simahawk May 18, 2023
f13c774
edi: exc.record._set_related_record use sudo
simahawk May 19, 2023
cc4cbfb
edi: speed up exchange record views
simahawk May 22, 2023
dc096d0
edi: add 'active' field to exchange type
simahawk May 24, 2023
14989b7
edi: improve backend view filter inactive
simahawk May 24, 2023
7c171e8
edi: fix related record missing broken views
simahawk May 29, 2023
b867284
edi: add disable flag to consumer
simahawk May 26, 2023
50dbfe9
edi: allow enable/disable exc type by partner
simahawk May 29, 2023
f4212bb
edi: refactor model rules w/ specific model
simahawk Jul 4, 2023
858c9a5
edi: unify menu item labels
simahawk Jul 4, 2023
73d6ac9
edi: allow form btn actions customization
simahawk Jul 4, 2023
b1945e9
edi: refactor model rules backward compat
simahawk Aug 9, 2023
a0737cc
edi_oca: make not installable
simahawk Aug 26, 2023
d63def1
edi_oca: fix consumer mixin exchange record count
petrus-v Jun 23, 2023
f6b1c39
edi_oca: drop migrations
simahawk Aug 25, 2023
7de3b1f
edi_oca: drop deprecated code
simahawk Aug 25, 2023
cd3c2e9
edi_oca: move to OCA/edi-framework
simahawk Aug 11, 2023
2017fab
edi_oca: fix test class names
simahawk Aug 11, 2023
200246d
edi_oca: fix edi.exchange.type.create
simahawk Aug 11, 2023
ed140bf
edi_oca: use queue_job__no_delay key in tests
simahawk Aug 11, 2023
42973f3
[MIG] edi_oca: Migration to 16.0
john-herholz-dt Apr 13, 2023
7112e6b
edi: fix tests
simahawk Sep 9, 2023
d1a5f92
edi: rename consumer mixin disable_edi_auto field
simahawk Sep 10, 2023
607ee56
edi_oca: fix _logger.debug usage
nilshamerlinck Oct 2, 2023
10de18d
edi: fix access errors tests
simahawk Oct 2, 2023
345807e
[UPD] Update edi_oca.pot
Oct 2, 2023
96385c4
[BOT] post-merge updates
OCA-git-bot Oct 2, 2023
84c0e9a
edi: fix consumer get_view w/ nested forms
simahawk Oct 3, 2023
ad13da8
[BOT] post-merge updates
OCA-git-bot Oct 3, 2023
a5b91f2
[FIX] edi_oca: Show buttons properly. Use OWL
etobella Oct 16, 2023
e8690bf
[BOT] post-merge updates
OCA-git-bot Oct 17, 2023
bb9cdd7
[UPD] Update edi_oca.pot
Oct 17, 2023
7f41a23
Update translation files
weblate Oct 17, 2023
b058bfd
[IMP] edi_oca: add company_id field with multi-company rule
OriolMForgeFlow Oct 25, 2023
0a094e7
[UPD] Update edi_oca.pot
Oct 26, 2023
0613250
[BOT] post-merge updates
OCA-git-bot Oct 26, 2023
bd90596
[UPD] Update edi_oca.pot
Oct 28, 2023
0d0b194
Update translation files
weblate Oct 28, 2023
9bae162
[FIX] edi_oca: avoid flooding error in the record chatter
MiquelRForgeFlow Oct 25, 2023
de584e0
[BOT] post-merge updates
OCA-git-bot Nov 7, 2023
300e4c2
[IMP] edi_oca: support exchange filename without extension on exchang…
Dec 14, 2023
191d77a
[BOT] post-merge updates
OCA-git-bot Dec 15, 2023
5b45ade
[IMP] edi_oca: add partner form page
Jan 10, 2024
e78be90
[UPD] Update edi_oca.pot
Jan 15, 2024
0ff9600
[BOT] post-merge updates
OCA-git-bot Jan 15, 2024
71e9535
Update translation files
weblate Jan 15, 2024
d7b5e30
[FIX] edi_oca: tests using FakeModelLoader should not be post_install
nilshamerlinck Jan 15, 2024
834e5ce
[BOT] post-merge updates
OCA-git-bot Jan 15, 2024
b3d13d3
[IMP] edi_oca: pre-commit auto fixes
john-herholz-dt Jan 18, 2024
0c95b81
[MIG] edi_oca: Migration to 17.0
john-herholz-dt Jan 18, 2024
95ca3ba
[UPD] Update edi_oca.pot
Jun 28, 2024
54a47d5
[BOT] post-merge updates
OCA-git-bot Jun 28, 2024
90299ce
Update translation files
weblate Jul 7, 2024
224723a
Added translation using Weblate (Italian)
mymage Jul 8, 2024
d20c84d
Translated using Weblate (Italian)
mymage Jul 9, 2024
9022900
Translated using Weblate (Italian)
mymage Jul 18, 2024
7ad6404
[UPD] Update edi_oca.pot
Jul 18, 2024
2c57f1e
Update translation files
weblate Jul 18, 2024
65a8ace
[IMP] edi_oca: add button to regenerate file after error on validation
JordiMForgeFlow Jun 4, 2024
9d96d0f
[UPD] Update edi_oca.pot
Jul 25, 2024
bcb2448
Update translation files
weblate Jul 25, 2024
54c21b2
[UPD] Update edi_oca.pot
Jul 28, 2024
01aa702
[BOT] post-merge updates
OCA-git-bot Jul 28, 2024
bb7b206
Update translation files
weblate Jul 28, 2024
e81ae33
Translated using Weblate (Italian)
mymage Jul 29, 2024
4dc7811
[FIX]edi_oca: error in component
manuelregidor Aug 29, 2024
8375095
[BOT] post-merge updates
OCA-git-bot Sep 3, 2024
256e60f
[FIX] edi_oca: Function for posting messages was renamed
etobella Oct 14, 2024
1fae7ea
[BOT] post-merge updates
OCA-git-bot Oct 14, 2024
807d6e6
Translated using Weblate (Italian)
mymage Nov 15, 2024
9277b6f
Translated using Weblate (Italian)
mymage Nov 15, 2024
d30f5e3
[IMP] edi_oca: remove logs' warnings causes
SilvioC2C Dec 2, 2024
5ba9330
[BOT] post-merge updates
OCA-git-bot Dec 3, 2024
cb4d2b6
[IMP] edi_oca: allow use of sequence for exchange filename pattern
tuantrantg Jan 16, 2024
3037592
edi_oca: avoid duplicate field name
petrus-v Aug 31, 2023
bff7c86
edi: drop useless view form/tree strings
simahawk Oct 2, 2023
c8caefb
edi: exc type fix view archived rules
simahawk Sep 7, 2023
6830855
edi: exc type view allow archive rules
simahawk Sep 7, 2023
0476969
edi: fix archive rules when type archived
Jan 31, 2024
d2c6010
edi_oca: fix edi_id label
simahawk May 15, 2023
d7bbb15
edi_oca: tests.common ease ctx setup
simahawk Aug 7, 2023
9b7db0b
[IMP] edi_oca: Show traceback on exception errors
HviorForgeFlow Nov 6, 2023
2d50f88
edi: fix job return msg
simahawk Oct 19, 2023
3d4f931
edi: make send failed job retryable
simahawk Oct 19, 2023
b251ee1
edi: test_same_code_same_backend mute sql logger
simahawk Nov 21, 2023
7bf302d
edi: add generate_ok message
simahawk Jul 5, 2023
3803c35
edi: fix backend jobs test old api
simahawk Jul 6, 2023
0e3682b
edi: chain generate/send jobs
simahawk Jul 5, 2023
2ac1278
edi: improve send job retry
simahawk Nov 24, 2023
e97beed
edi: add file checksum
simahawk Nov 24, 2023
1ac7b17
edi: use job identity_key
simahawk Nov 24, 2023
277291d
edi: raise send job prio to max
simahawk Nov 29, 2023
e9294aa
edi: fix consumer mixin copy origin exc record
simahawk Nov 29, 2023
c96121f
[FIX] edi_oca: fixs after porting from 14.0
Jan 22, 2024
02f1660
[IMP] edi_oca: edi_backend multi-company
JordiMForgeFlow Feb 2, 2024
09f8c9e
[IMP] edi_oca: add encoding management for exchange type
JordiMForgeFlow Jan 16, 2024
eeb3d89
edi_oca: remove warnings in tests
sebalix Feb 1, 2024
dc75c9e
[IMP] edi_oca: add a backend_type_code field on the backend
gurneyalex Mar 6, 2024
c8663a9
[IMP] edi_oca: Add Retry action on edi.exchange.record list view
May 8, 2024
91ae8a3
[IMP] edi_oca: allow to receive empty files
May 27, 2024
b01c23d
[FIX] edi_oca: do not try to automatically re-process input_processed…
nilshamerlinck Jun 12, 2024
39e4ee1
[FIX] edi_oca: Don't run quick_exec if backend is not active
HviorForgeFlow Jun 18, 2024
7181b15
edi_oca: Fix Access error for Administrator
florentx May 8, 2024
5270a74
[IMP] edi_oca: support modifying failed check send message
Jul 1, 2024
67c84de
[FIX] edi_oca: improve error in order to be helpful
MiquelRForgeFlow Aug 22, 2024
2d2c9af
[IMP] edi_oca: Add hook on new output exchange record search
HviorForgeFlow Sep 25, 2024
f67f7e2
[IMP] edi_oca: pre-commit stuff
JordiMForgeFlow Oct 24, 2024
b445a2e
[IMP] edi_oca: adapt FWs to V17
JordiMForgeFlow Oct 24, 2024
f0f5b80
[IMP] edi_oca: update docs for EDI Jobs
Jul 10, 2024
1ba796d
[IMP] edi_oca: add btn to show all related queue jobs
QuocDuong1306 Jul 23, 2024
8c7ad3f
[FIX] edi_oca: adapt forward-ported commits to v17.0
SilvioC2C Dec 3, 2024
6b75603
[UPD] Update edi_oca.pot
Dec 4, 2024
3e2ba41
[BOT] post-merge updates
OCA-git-bot Dec 4, 2024
ff9760e
Update translation files
weblate Dec 4, 2024
3d36654
Translated using Weblate (Italian)
mymage Dec 4, 2024
b494ff2
[UPD] Update edi_oca.pot
Dec 11, 2024
13358c9
Update translation files
weblate Dec 11, 2024
00759bf
Translated using Weblate (Italian)
mymage Dec 12, 2024
feaede6
[IMP] edi_oca: pre-commit stuff
JordiMForgeFlow Dec 27, 2024
a65d0f1
[MIG] edi_oca: Migration to V18
JordiMForgeFlow Oct 24, 2024
cd3be37
[IMP] edi_oca: remove required fields from view
JordiMForgeFlow Dec 31, 2024
6f933ea
[UPD] Update edi_oca.pot
Jan 14, 2025
2c95fba
[BOT] post-merge updates
OCA-git-bot Jan 14, 2025
dd46b82
Update translation files
weblate Jan 14, 2025
2009feb
[UPD] Update edi_oca.pot
Jan 16, 2025
bec191e
Update translation files
weblate Jan 16, 2025
8206c91
[FIX] edi_oca: error in component key
victorvermot May 26, 2025
663ea3f
[BOT] post-merge updates
OCA-git-bot May 30, 2025
7e2a93e
[FIX] edi_oca: Adapt tests to changes on error messages
etobella Sep 15, 2023
3827114
[FIX] edi_oca: consider parent record when checking access rule
JordiMForgeFlow Sep 25, 2024
7ac8929
[IMP] edi_oca set job priority from exchange type
santostelmo Mar 19, 2025
0d7f3c1
[IMP] edi_oca: Split exchange error and traceback
HviorForgeFlow Jul 30, 2024
2bea658
[FIX] edi_oca: Fix get_view
etobella May 15, 2025
a29dd73
edi_oca: apply pre-commit
simahawk Jun 5, 2025
062db9a
[UPD] Update edi_oca.pot
Jun 6, 2025
942a37f
[BOT] post-merge updates
OCA-git-bot Jun 6, 2025
31c7a67
Update translation files
weblate Jun 6, 2025
5bbc76e
edi_oca: add exchange_generate_send
simahawk Dec 2, 2024
5044a74
edi_oca: consumer mixin add helper methods to send via edi
simahawk Nov 15, 2024
71dd081
edi_oca: consumer mixin trigger state event
simahawk Nov 28, 2024
c92a937
edi: fix _edi_send_via_edi w/ quick exec
simahawk Dec 15, 2024
4391e93
edi_oca: consumer mixin adapt to v18
simahawk Jun 7, 2025
96c9080
Translated using Weblate (Italian)
mymage Jun 9, 2025
4e0b997
[BOT] post-merge updates
OCA-git-bot Jun 9, 2025
5cfaf43
edi_oca: Add new model edi.configuration
thienvh332 Jul 18, 2024
51aca56
edi_oca: edi.conf cleanup tests
simahawk Nov 15, 2024
3a19cdb
edi_oca: add edi.configuration.trigger
simahawk Nov 15, 2024
bb9e342
edi_oca: edi_conf avoid clash of label for model fields
simahawk Dec 2, 2024
e06a99c
edi: edi.conf add btn to view partners
simahawk Jan 10, 2025
7544441
edi_oca: adapt to v16
simahawk Jun 4, 2025
fcfd78b
edi: edi.configuration add self to render ctx
simahawk Jun 5, 2025
3999e04
edi: edi.configuration exec test at_install
simahawk Jun 5, 2025
03b2b95
edi_oca: adapt to v18
simahawk Jun 6, 2025
ae8342b
[UPD] Update edi_oca.pot
Jun 12, 2025
bfa3152
[BOT] post-merge updates
OCA-git-bot Jun 12, 2025
3dfb846
Update translation files
weblate Jun 12, 2025
5d511ff
edi_oca: fix test, because tmpl is set explicitly
simahawk Feb 13, 2025
0b46b9d
edi_exchange_template: drop deprecated type_id
yankinmax Jun 5, 2025
2f646f9
Translated using Weblate (Italian)
mymage Jun 16, 2025
2475363
[UPD] Update edi_oca.pot
Jun 19, 2025
73e54ed
Update translation files
weblate Jun 19, 2025
58017c6
Translated using Weblate (Italian)
mymage Jun 20, 2025
2377af9
edi: fix edi.configuration.action_view_partners
simahawk Jul 17, 2025
b853e35
edi: use env._
simahawk Jul 17, 2025
7b6516e
[BOT] post-merge updates
OCA-git-bot Jul 17, 2025
346464d
[BOT] post-merge updates
OCA-git-bot Jul 17, 2025
38f245d
Added translation using Weblate (Spanish)
isretamales Aug 7, 2025
2b9bdbb
[FIX] edi_oca: avoid copy model field on exchange records
ThiagoMForgeFlow Aug 21, 2025
cf83ca6
[BOT] post-merge updates
OCA-git-bot Aug 29, 2025
117c649
[IMP] edi_oca: relate multiple records with a single exchange record
JordiMForgeFlow Nov 22, 2023
1ba3f5f
[FIX] edi_oca: prevent error when empty recordset
JordiMForgeFlow Aug 4, 2025
8e4d949
[UPD] Update edi_oca.pot
Sep 11, 2025
ad83dda
[BOT] post-merge updates
OCA-git-bot Sep 11, 2025
0a6a985
Update translation files
weblate Sep 11, 2025
905f8fb
[FIX] edi_oca: Enable code widget for enable_snippet rule field
HviorForgeFlow Sep 11, 2025
f92e14f
[FIX] edi_oca: add right padding on EDI Actions record div
HviorForgeFlow Sep 11, 2025
c69c3f3
[UPD] Update edi_oca.pot
Sep 12, 2025
4b80d55
[BOT] post-merge updates
OCA-git-bot Sep 12, 2025
7dfb8a8
Update translation files
weblate Sep 12, 2025
1989244
Translated using Weblate (Italian)
mymage Sep 15, 2025
6ad0567
[MIG] edi_oca to edi_core_oca
etobella Aug 29, 2025
34b3ae2
[IMP] edi_core_oca: Remove dependancies on component and queue
etobella Aug 29, 2025
7662f2f
[IMP] edi_core_oca: Improve views
etobella Sep 24, 2025
e41036e
[UPD] Update edi_core_oca.pot
Sep 29, 2025
4e3f485
[BOT] post-merge updates
OCA-git-bot Sep 29, 2025
fa5a52b
edi_oca: fix record form related_exchanges visibility
simahawk Sep 23, 2025
a305d34
[BOT] post-merge updates
OCA-git-bot Oct 1, 2025
2d6478d
Translated using Weblate (Italian)
mymage Oct 6, 2025
b4c1aec
Translated using Weblate (Italian)
mymage Oct 6, 2025
125a72b
Translated using Weblate (Italian)
mymage Oct 7, 2025
8af21d6
edi_core_oca: fix duplicate exchange type
simahawk Oct 13, 2025
da52de3
edi_core_oca: fix duplicate backend type
simahawk Oct 13, 2025
e744e82
[BOT] post-merge updates
OCA-git-bot Oct 14, 2025
41b7200
edi_core_oca: protect and track file content
simahawk Oct 14, 2025
cdd0fb6
edi_core_oca: fix access error on handler model
simahawk Nov 1, 2025
494bb33
edi_core_oca: add unit test for _get_exec_handler
simahawk Nov 26, 2025
71f2ef9
[IMP] edi_core_oca: Improve formatting of strings
etobella Dec 1, 2025
8dced0b
[MIG] edi_core_oca: Migration to 19.0
etobella Dec 1, 2025
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
240 changes: 240 additions & 0 deletions edi_core_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===
EDI
===

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

.. |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_core_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_core_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|

Base EDI backend.

Provides following models:

1. EDI Backend, to centralize configuration
2. EDI Backend Type, to classify EDI backends (eg: UBL, GS1, e-invoice,
pick-yours)
3. EDI Exchange Type, to define file types of exchange
4. EDI Exchange Record, to define a record exchanged between systems

Also define a mixin to be inherited by records that will generate EDIs

**Table of contents**

.. contents::
:local:

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

This module aims to provide an infrastructure to simplify
interchangability of documents between systems providing a configuration
platform. It will be inherited by other modules in order to define the
proper implementations of components.

In order to define a new Exchange Record, we need to configure:

- Backend Type
- Exchange Type
- Backend
- Components

Jobs
----

- **Internal User**: might be an EDI user without even knowing about it,
triggering EDI flows by some of his actions on business records; does
not need access to related queue jobs.

- **EDI User**: more conscious EDI user that might sometimes need to
debug things a bit further and thus needs access to related queue
jobs.

- **EDI Manager**: full configuration access.

Code to execute
---------------

By default, EDI Framework uses fields on ``edi.backend`` to get the
right function to execute. Each function is related to a model where the
specific function is defined. This models needs to inherit the specific
handler of each case.

- receive: model ``edi.oca.handler.receive`` with function receive.
- process: model ``edi.oca.handler.process`` with function process.
- generate: model ``edi.oca.handler.generate`` with function generate.
- send: model ``edi.oca.handler.send`` with function send.
- check: model ``edi.oca.handler.check`` with function check.
- validate on inputs: model ``edi.oca.handler.input.validate`` with
function input_validate.
- validate on outputs: model ``edi.oca.handler.output.validate`` with
function input_validate.

You can see an example on the tests fake_models.

For a more complex behaviour, you can use ``edi_component_oca`` module
to use components.

User EDI generation
-------------------

On the exchange type, it might be possible to define a set of models, a
domain and a snippet of code. After defining this fields, we will
automatically see buttons on the view to generate the exchange records.
This configuration is useful to define a way of generation managed by
user.

Exchange type rules configuration
---------------------------------

Exchange types can be further configured with rules. You can use rules
to:

1. make buttons automatically appear in forms
2. define your own custom logic

Go to an exchange type and go to the tab "Model rules". There you can
add one or more rule, one per model. On each rule you can define a
domain or a snippet to activate it. In case of a "Form button" kind, if
the domain and/ the snippet is/are satisfied, a form btn will appear on
the top of the form. This button can be used by the end user to manually
generate an exchange. If there's more than a backend and the exchange
type has not a backend set, a wizard will appear asking to select a
backend to be used for the exchange.

In case of "Custom" kind, you'll have to define your own logic to do
something.

Usage
=====

After certain operations or manual execution, Exchange records will be
generated. This Exchange records might be input records or outputs
records.

The change of state can be manually executed by the system or be managed
through by ir.cron.

Output Exchange records
-----------------------

An output record is intended to be used for exchange information from
Odoo to another system.

The flow of an output record should be:

- Creation
- Generation of data
- Validation of data
- Sending data
- Validation of data processed properly by the other party

Input Exchange records
----------------------

An input record is intended to be used for exchange information another
system to odoo.

The flow of an input record should be:

- Creation
- Reception of data
- Checking data
- Processing data

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

14.0.1.0.0
----------

The module name has been changed from edi to edi_oca.

18.0.1.4.0
----------

Components dependancy has been removed and set on a new dependant module
``edi_component_oca``. Module ``edi_oca`` has been_renamed to
``edi_core_oca``.

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_core_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
* Dixmit
* Camptocamp

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

- Simone Orsi <simahawk@gmail.com>
- Enric Tobella <enric.tobella@dixmit.com>
- Manuel Regidor <manuel.regidor@sygel.es>
- Thien Vo <thienvh@trobz.com>
- Jordi Masvidal <jordi.masvidal@forgeflow.com>

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.

.. |maintainer-simahawk| image:: https://github.com/simahawk.png?size=40px
:target: https://github.com/simahawk
:alt: simahawk
.. |maintainer-etobella| image:: https://github.com/etobella.png?size=40px
:target: https://github.com/etobella
:alt: etobella

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-simahawk| |maintainer-etobella|

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

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

{
"name": "EDI",
"summary": """
Define backends, exchange types, exchange records,
basic automation and views for handling EDI exchanges.
""",
"version": "19.0.1.0.0",
"website": "https://github.com/OCA/edi-framework",
"development_status": "Beta",
"license": "LGPL-3",
"author": "ACSONE,Dixmit,Camptocamp,Odoo Community Association (OCA)",
"maintainers": ["simahawk", "etobella"],
"depends": [
"base_edi",
"mail",
"base_sparse_field",
],
"external_dependencies": {"python": ["PyYAML", "openupgradelib"]},
"data": [
"wizards/edi_exchange_record_create_wiz.xml",
"data/cron.xml",
"data/ir_actions_server.xml",
"data/sequence.xml",
"data/edi_configuration.xml",
"security/res_groups.xml",
"security/ir_model_access.xml",
"views/edi_backend_views.xml",
"views/edi_backend_type_views.xml",
"views/edi_exchange_record_views.xml",
"views/edi_exchange_type_views.xml",
"views/edi_exchange_type_rule_views.xml",
"views/edi_configuration_views.xml",
"views/edi_configuration_trigger_views.xml",
"views/res_partner.xml",
"views/menuitems.xml",
"templates/exchange_chatter_msg.xml",
"templates/exchange_mixin_buttons.xml",
],
"assets": {
"web.assets_backend": [
"edi_core_oca/static/src/js/widget_edi.esm.js",
"edi_core_oca/static/src/xml/widget_edi.xml",
],
"web.assets_unit_tests": [
"edi_core_oca/static/tests/**/*",
],
},
"demo": ["demo/edi_backend_demo.xml"],
"installable": True,
}
32 changes: 32 additions & 0 deletions edi_core_oca/data/cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record
id="cron_edi_backend_check_output_exchange"
model="ir.cron"
forcecreate="True"
>
<field name="name">EDI exchange check output sync</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([])._cron_check_output_exchange_sync()</field>
</record>
<!-- TODO -->
<record
id="cron_edi_backend_check_input_exchange"
model="ir.cron"
forcecreate="True"
>
<field name="name">EDI exchange check input sync</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([])._cron_check_input_exchange_sync()</field>
</record>
</odoo>
42 changes: 42 additions & 0 deletions edi_core_oca/data/edi_configuration.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- The `ir_action` parameter must be passed in order to use `send_via_email`
Examlple:
<field name="snippet_do">record._edi_send_via_email(ir_action)</field>
-->

<record id="edi_conf_trigger_record_create" model="edi.configuration.trigger">
<field name="name">On record create</field>
<field name="code">on_record_create</field>
<field name="description">Trigger when a record is created</field>
</record>
<record id="edi_conf_trigger_record_write" model="edi.configuration.trigger">
<field name="name">On record write</field>
<field name="code">on_record_write</field>
<field name="description">Trigger when a record is updated</field>
</record>
<!-- TODO: these 2 have to be triggered somehow -->
<record id="edi_conf_trigger_send_via_email" model="edi.configuration.trigger">
<field name="name">Send via email</field>
<field name="code">on_send_via_email</field>
<field name="description">Send record via email TBD</field>
</record>
<record id="edi_conf_trigger_send_via_edi" model="edi.configuration.trigger">
<field name="name">Send via EDI</field>
<field name="code">on_send_via_edi</field>
<field name="description">Send record via EDI TBD</field>
</record>

<record id="edi_conf_send_via_email" model="edi.configuration">
<field name="name">Send Via Email</field>
<field name="active">False</field>
<field name="trigger_id" ref="edi_conf_trigger_send_via_email" />
<field name="snippet_do">record._edi_send_via_email()</field>
</record>
<record id="edi_conf_send_via_edi" model="edi.configuration">
<field name="name">Send Via EDI</field>
<field name="active">False</field>
<field name="trigger_id" ref="edi_conf_trigger_send_via_edi" />
<field name="snippet_do">record._edi_send_via_edi(conf.type_id)</field>
</record>
</odoo>
14 changes: 14 additions & 0 deletions edi_core_oca/data/ir_actions_server.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record model="ir.actions.server" id="action_retry_edi_exchange_record">
<field name="name">Retry</field>
<field name="group_ids" eval="[(4, ref('base_edi.group_edi_manager'))]" />
<field name="model_id" ref="model_edi_exchange_record" />
<field name="binding_model_id" ref="model_edi_exchange_record" />
<field name="state">code</field>
<field name="code">
if records:
action = records.action_retry()
</field>
</record>
</odoo>
Loading