Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
f798e57
Add edi_gs1
simahawk Jul 9, 2020
b96ea4a
edi_gs1: fix output tests
simahawk Nov 26, 2020
2e20847
edi_gs1: BH instance identifier = record identifier
simahawk Dec 2, 2020
bf71f88
edi_gs1: add basic types for ack
simahawk Dec 2, 2020
258cdbb
edi_gs1: add basic component for output
simahawk Dec 2, 2020
5cd932d
edi_gs1: add schemas for warehouse exchanges
simahawk Dec 2, 2020
fb925b4
edi_gs1: clean dead code
simahawk Dec 2, 2020
b00b16e
edi_gs1: depend on edi_xml
simahawk Dec 3, 2020
95a00d4
edi_gs1: component has only exc record in ctx
simahawk Dec 3, 2020
027bf32
edi_gs1: SBH tests validate xml
simahawk Dec 4, 2020
a15a587
edi: draft gs1 input mixin
simahawk Dec 4, 2020
dc37306
DROPME: add TODOs
simahawk Mar 11, 2021
9955d4a
edi_gs1: adapt tests to core changes
simahawk Mar 15, 2021
bacc686
[ADD] edi_gs1: add gs1_code on UoM (+ auto init based on default valu…
acsonefho Mar 17, 2021
7d3a4f0
edi_exchange_template: rework info provider mixins
simahawk Mar 15, 2021
1bf5752
edi_gs1: add gs1_code to UoM
simahawk Mar 18, 2021
e0849b5
edi_gs1_stock: improve outbound instruction
simahawk Mar 18, 2021
534a503
edi_gs1: split ack data type + imp conf
simahawk Mar 18, 2021
906d007
edi_gs1: draft ack input process component
simahawk Mar 18, 2021
226c1f2
[ADD] edi_gs1: lsp and lsc partners on backend
acsonefho Mar 31, 2021
a86ecde
[FIX] edi_gs1: empty doc_type invalidate the document generation
acsonefho Mar 31, 2021
beaeed0
[UPD] edi_gs1: update group on security
acsonefho Mar 31, 2021
dd7cf78
Pre-commit
acsonefho Apr 16, 2021
e5f8297
[FIX] Fix unit test about output generation + missing security rules
acsonefho Apr 16, 2021
af72676
[UPD] GS1 .xsd files update
acsonefho Jul 2, 2021
1518a6f
[FIX] edi_gs1: fix typo and find_component.
acsonefho Jul 2, 2021
a900c94
[FIX] edi: fix due to refactor
acsonefho Jul 9, 2021
a8a2090
[GS1] Generate the Warehouse Outbound Notification ACK
acsonefho Nov 24, 2022
6e2f956
[FIX] edi_gs1: remove useless _xsd_schema_path
acsonefho Dec 15, 2022
3373ad4
[IMP] edi_gs1_oca: pre-commit auto fixes
acsonefho Jun 19, 2026
44443af
[MIG] edi_gs1_oca: migration to 19.0
acsonefho Jun 29, 2026
87e5e91
[IMP] edi_gs1_oca: move to Beta development status
acsonefho Jul 2, 2026
17bf5ec
Add edi_gs1_stock
simahawk Jul 9, 2020
c2caa06
edi_gs1_stock: adapt to edi core changes
simahawk Nov 26, 2020
6764a9f
edi_gs1_stock: fix inbound_instruction
simahawk Nov 27, 2020
8df7a58
edi_gs1_stock: inbound info based on output mixin
simahawk Dec 2, 2020
ea46d72
edi_gs1_stock: inbound instruction fix identification
simahawk Dec 2, 2020
aa3cad7
edi_gs1_stock: inbound instruction use ack type
simahawk Dec 2, 2020
a5640f3
edi_gs1: draft outbound instruction
simahawk Dec 2, 2020
6ed8993
edi_gs1_stock: add xml validation config
simahawk Dec 3, 2020
81e7531
edi_gs1_stock: adapt to edi api changes
simahawk Dec 3, 2020
7a2baee
edi_gs1_stock: tests validate xml
simahawk Dec 4, 2020
6f0a044
edi_gs1_stock: DRAFT input
simahawk Jul 9, 2021
f1230de
edi_gs1_stock: change inbound instruction component name
simahawk Mar 10, 2021
2d7c5bc
edi_gs1_stock: fix inbound notif test class name
simahawk Mar 10, 2021
e8b0cd3
edi_gs1_stock: draft notification components
simahawk Mar 10, 2021
cdc80d9
edi_gs1_stock: TEMP disable tests for inbound notification
simahawk Mar 15, 2021
4f124f1
edi_gs1: adapt tests to core changes
simahawk Mar 15, 2021
4f8e480
edi_gs1_stock: fix inbound/outbound instruction tests
simahawk Mar 15, 2021
c053f03
[UPD] edi_gs1_stock: update outbound instruction qweb to add contact …
acsonefho Mar 17, 2021
5c083e3
[IMP] edi_gs1_stock: pre-commit
acsonefho Mar 31, 2021
4a0ef4f
[UPD] edi_gs1_stock: Outbound instruction
acsonefho Mar 31, 2021
2ed36d5
Pre-commit
acsonefho Apr 16, 2021
ef066a7
[ADD] edi_gs1_stock: enable Warehouse Outbound Notification
acsonefho Jul 2, 2021
c187a1b
[FIX] edi: fix due to refactor
acsonefho Jul 9, 2021
072739f
[ADD] Add configuration
acsonefho Oct 18, 2022
f784bd5
[INT] pre-commit
acsonefho Oct 19, 2022
457146a
[GS1] Generate the Warehouse Outbound Notification ACK
acsonefho Nov 24, 2022
0c58aba
[GS1] Add shipper on WOI + add inherit point on config view + fix tem…
acsonefho Dec 13, 2022
d58ea66
[UPD] Add possibility to stop the GS1 Workflow on the stock.picking
acsonefho Feb 15, 2023
6c594f4
[IMP] edi_gs1_stock_oca: pre-commit auto fixes
acsonefho Jun 29, 2026
d6406ab
[MIG] edi_gs1_stock_oca: migration to 19.0
acsonefho Jun 30, 2026
3c2d303
[IMP] edi_gs1_stock_oca: move to Beta development status
acsonefho Jun 30, 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
89 changes: 89 additions & 0 deletions edi_gs1_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

============
Base GS1 EDI
============

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

.. |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-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-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_gs1_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_gs1_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|

This is the base module for the implementation of the `GS1 -The Global
Language of Business <http://gs1.org/>`__ standard.

This module contains methods to generate and parse XML files compliant
with this standard.

Beside basic machinery it provides common components to generate common
GS1 schema elements. Namely:

- StandardBusinessDocumentHeader

**Table of contents**

.. contents::
:local:

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_gs1_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>

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_gs1_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
13 changes: 13 additions & 0 deletions edi_gs1_oca/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Inbound Instruction

- [x] allow skipping keys / elements by returning none
- [x] check UOM code handling
- [x] finish mapping of what we know
- [] draft RF-EFR module w/ tests
- [] allow export from PO
- [] handle state of export
- [] use storage backend to store it
- [] add lookup of acknowledge message
- [] add new field code to UOM
- [] draft send ack
- [] draft Outbound Notification parse
2 changes: 2 additions & 0 deletions edi_gs1_oca/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .hooks import post_init_hook
28 changes: 28 additions & 0 deletions edi_gs1_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2020 ACSONE
# @author: Simone Orsi <simahawk@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Base GS1 EDI",
"summary": """
Base module for GS1 standard EDI exchange""",
"version": "19.0.1.0.0",
"development_status": "Beta",
"license": "AGPL-3",
"website": "https://github.com/OCA/edi-framework",
"author": "ACSONE,Odoo Community Association (OCA)",
"depends": ["edi_core_oca", "uom"],
"external_dependencies": {"python": ["xmlschema", "xmlunittest"]},
"data": [
"security/gs1_backend_acl.xml",
"data/gs1_backend_data.xml",
"data/ack_in_exchange_type_data.xml",
"data/ack_out_exchange_type_data.xml",
"data/business_header_qweb_template.xml",
"data/contact_details_qweb_template.xml",
"views/res_partner.xml",
"views/edi_backend.xml",
"views/uom_uom.xml",
],
"post_init_hook": "post_init_hook",
}
25 changes: 25 additions & 0 deletions edi_gs1_oca/data/ack_in_exchange_type_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="edi_exchange_type_receipt_ack_in" model="edi.exchange.type">
<field name="backend_type_id" ref="backend_type_gs1" />
<field name="name">GS1 ApplicationReceiptAcknowledgement</field>
<field name="code">applicationReceiptAcknowledgement_in</field>
<field name="direction">input</field>
<!--
When this field is empty for "input ack"
we assume that we can rely on the original file name (of the parent record)
and a suffix ".ack".
-->
<field name="exchange_filename_pattern" />
<field name="exchange_file_ext">xml</field>
<field name="input_validate_model_id" ref="model_edi_gs1_handler_validate" />
<field
name="process_model_id"
ref="model_edi_gs1_handler_application_receipt_ack"
/>
<field name="advanced_settings_edit">
gs1:
schema_path: edi_gs1_oca:static/schemas/gs1/ecom/ApplicationReceiptAcknowledgement.xsd
</field>
</record>
</odoo>
17 changes: 17 additions & 0 deletions edi_gs1_oca/data/ack_out_exchange_type_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="edi_exchange_type_receipt_ack_out" model="edi.exchange.type">
<field name="backend_type_id" ref="backend_type_gs1" />
<field name="name">GS1 ApplicationReceiptAcknowledgement</field>
<field name="code">applicationReceiptAcknowledgement_out</field>
<field name="direction">output</field>
<field name="send_model_id" ref="edi_core_oca.model_edi_oca_handler_noop" />
<field name="exchange_filename_pattern">{record_name}-{type.code}-{dt}</field>
<field name="exchange_file_ext">xml</field>
<field name="output_validate_model_id" ref="model_edi_gs1_handler_validate" />
<field name="advanced_settings_edit">
gs1:
schema_path: edi_gs1_oca:static/schemas/gs1/ecom/ApplicationReceiptAcknowledgement.xsd
</field>
</record>
</odoo>
65 changes: 65 additions & 0 deletions edi_gs1_oca/data/business_header_qweb_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template
id="edi_exchange_business_header_contact"
name="Render GS1 Business header contact"
>
<!--
`nswrapper` is a trick to be able to import these templates
as XML because a namespace is mandatory for element prefixes.
`nswrapper` elements are purged afterwards in post-processing.
-->
<nswrapper
xmlns:sh="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
<sh:Identifier Authority="GS1" />
<sh:ContactInformation>
<sh:Contact t-esc="partner.name">John Doe</sh:Contact>
<sh:EmailAddress
t-esc="partner.email"
>John_Doe@purchasing.XYZretailer.com</sh:EmailAddress>
<sh:TelephoneNumber
t-esc="partner.phone"
>+1-212-555-2122</sh:TelephoneNumber>
<sh:ContactTypeIdentifier
t-esc="contact_indentifier"
>Buyer</sh:ContactTypeIdentifier>
</sh:ContactInformation>
</nswrapper>
</template>
<template id="edi_exchange_business_header" name="Render GS1 Business header">
<nswrapper
xmlns:sh="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
<sh:StandardBusinessDocumentHeader>
<sh:HeaderVersion>1.0</sh:HeaderVersion>
<sh:Sender>
<t t-call="edi_gs1_oca.edi_exchange_business_header_contact">
<t t-set="partner" t-value="sender" />
<t t-set="contact_indentifier" t-value="'Buyer'" />
</t>
</sh:Sender>
<sh:Receiver>
<t t-call="edi_gs1_oca.edi_exchange_business_header_contact">
<t t-set="partner" t-value="receiver" />
<t t-set="contact_indentifier" t-value="'Seller'" />
</t>
</sh:Receiver>
<sh:DocumentIdentification>
<sh:Standard>GS1</sh:Standard>
<sh:TypeVersion>3.4</sh:TypeVersion>
<sh:InstanceIdentifier
t-esc="instance_identifier"
>100002</sh:InstanceIdentifier>
<sh:Type t-esc="doc_type or ''" />
<sh:MultipleType>false</sh:MultipleType>
<sh:CreationDateAndTime
t-esc="utc_now()"
>2006-01-10T12:00:01.000-05:00</sh:CreationDateAndTime>
</sh:DocumentIdentification>
</sh:StandardBusinessDocumentHeader>
</nswrapper>
</template>
</odoo>
47 changes: 47 additions & 0 deletions edi_gs1_oca/data/contact_details_qweb_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="edi_exchange_contact_details" name="Render GS1 Contact Details">
<t t-set="company" t-value="contact.parent_id" />
<gln t-esc="contact.gln_code">0000000000044</gln>
<additionalPartyIdentification
t-if="additionalPartyIdentification"
t-att="additionalPartyIdentification.attrs"
t-esc="additionalPartyIdentification.value"
/>
<address>
<city t-if="contact.city" t-esc="contact.city" />
<countryCode t-if="contact.country_id" t-esc="contact.country_id.code" />
<name t-if="contact.name" t-esc="contact.name" />
<postalCode t-if="contact.zip" t-esc="contact.zip" />
<state t-if="contact.state_id" t-esc="contact.state_id.name" />
<streetAddressOne t-if="contact.street" t-esc="contact.street" />
<streetAddressTwo t-if="contact.street2" t-esc="contact.street2" />
</address>
<contact>
<personName t-if="contact.name" t-esc="contact.name" />
<communicationChannel t-if="contact.email">
<communicationChannelCode>EMAIL</communicationChannelCode>
<communicationValue t-esc="contact.email" />
</communicationChannel>
<communicationChannel t-if="contact.phone">
<communicationChannelCode>TELEPHONE</communicationChannelCode>
<communicationValue t-esc="contact.phone" />
</communicationChannel>
</contact>
<organisationDetails t-if="contact.parent_id">
<organisationName t-if="company.name" t-esc="company.name" />
<officialAddress>
<city t-if="company.city" t-esc="company.city" />
<countryCode
t-if="company.country_id"
t-esc="company.country_id.code"
/>
<name t-if="company.name" t-esc="company.name" />
<postalCode t-if="company.zip" t-esc="company.zip" />
<state t-if="company.state_id" t-esc="company.state_id.name" />
<streetAddressOne t-if="company.street" t-esc="company.street" />
<streetAddressTwo t-if="company.street2" t-esc="company.street2" />
</officialAddress>
</organisationDetails>
</template>
</odoo>
11 changes: 11 additions & 0 deletions edi_gs1_oca/data/gs1_backend_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="backend_type_gs1" model="edi.backend.type">
<field name="name">GS1</field>
<field name="code">gs1</field>
</record>
<record id="edi_backend_gs1_default" model="edi.backend">
<field name="name">GS1 default</field>
<field name="backend_type_id" ref="backend_type_gs1" />
</record>
</odoo>
11 changes: 11 additions & 0 deletions edi_gs1_oca/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2021 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).


def post_init_hook(env):
"""
Hook used to init automatically some GS1 code on existing UoM
:param env: Odoo Environment
:return:
"""
env["uom.uom"]._execute_gs1_map_code()
7 changes: 7 additions & 0 deletions edi_gs1_oca/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from . import edi_gs1_xml
from . import edi_gs1_output
from . import edi_gs1_input
from . import edi_gs1_handler
from . import edi_backend
from . import res_partner
from . import uom_uom
21 changes: 21 additions & 0 deletions edi_gs1_oca/models/edi_backend.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2020 ACSONE SA
# @author Simone Orsi <simahawk@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class EDIBackend(models.Model):
_inherit = "edi.backend"

# TODO: find another way to configure this w/out polluting edi backend
lsp_partner_id = fields.Many2one(
string="Logistic Services Provider (LSP)",
comodel_name="res.partner",
domain=[("is_lsp", "=", True)],
)
lsc_partner_id = fields.Many2one(
string="Logistic Services Client (LSC)",
comodel_name="res.partner",
default=lambda self: self.env.ref("base.main_partner").id,
)
Loading
Loading