diff --git a/roulier/carriers/geodis_fr/edi/api.py b/roulier/carriers/geodis_fr/edi/api.py index af2c369..4373092 100644 --- a/roulier/carriers/geodis_fr/edi/api.py +++ b/roulier/carriers/geodis_fr/edi/api.py @@ -70,6 +70,12 @@ def _parcel(self): "required": True, "coerce": "accents", }, + "volume": { + "type": "float", + "required": False, + "empty": True, + "default": 0, + }, } def _to_address(self): diff --git a/roulier/carriers/geodis_fr/edi/encoder.py b/roulier/carriers/geodis_fr/edi/encoder.py index 37d9e92..1eda4fc 100644 --- a/roulier/carriers/geodis_fr/edi/encoder.py +++ b/roulier/carriers/geodis_fr/edi/encoder.py @@ -63,6 +63,10 @@ def encode_shipment(self, shipment, service, idx): lines += [ ["GID", "%s" % j, ["1", "PC", "21", "6"]], ["MEA", "AAE", "AAD", ["KGM", "%s" % pack["weight"]]], + ] + if pack.get("volume"): + lines.append(["MEA", "AAE", "AAW", ["MTQ", "%s" % pack["volume"]]]) + lines += [ ["PCI", "18"], ["GIN", "BN", pack["barcode"]], ]