From f7ff36187e01b216352499c00d48d7dd4cc10456 Mon Sep 17 00:00:00 2001 From: Carlos G?lvez Date: Fri, 22 Nov 2019 10:34:19 +0100 Subject: [PATCH] Allow to get RFF|DQ but doesn't process it --- shipment.py | 3 ++- templates/DESADV_ediversa.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/shipment.py b/shipment.py index 97fa063..a0ca5b9 100644 --- a/shipment.py +++ b/shipment.py @@ -100,7 +100,8 @@ class ShipmentIn(EdifactMixin, metaclass=PoolMeta): # means the file readed it's not a order response. if not message.get_segment('DESADV_D_96A_UN_EAN005'): return DO_NOTHING, NO_ERRORS - rff = message.get_segment('RFF') + rffs = message.get_segments('RFF') + rff, = [x for x in rffs if x.elements[0] == 'ON'] or [None] template_rff = template_header.get('RFF') purchase, errors = cls._process_RFF(rff, template_rff, control_chars) if errors: diff --git a/templates/DESADV_ediversa.yml b/templates/DESADV_ediversa.yml index 3965057..7241656 100644 --- a/templates/DESADV_ediversa.yml +++ b/templates/DESADV_ediversa.yml @@ -5,7 +5,7 @@ header: DESADV_D_96A_UN_EAN005: [] BGM: ['!value', '351', !!python/tuple ['9', '31']] DTM: ['!value'] - RFF: ['ON', '!value'] + RFF: [!!python/tuple ['ON', 'DQ'], '!value'] detail: CPS: ['!value', !!python/tuple ['', '!value']] LIN: ['!value', 'EN', '!value']