Skip to content

Commit ec2e851

Browse files
Merge pull request #179 from akretion/geodis-manage-contract-condition
[IMP] Allow to specify contract condition for Geodis EDI (Particulier / Entreprise)
2 parents a3b0d3c + 57c9e7f commit ec2e851

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

roulier/carriers/geodis_fr/edi/api.py

+7
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ def _shipments(self):
131131
"required": False,
132132
# 'description': """7085 : Notify recipient by M(ail), S(ms), P(=M+S)"""
133133
},
134+
# Contract and condition : particular/pro
135+
# when empty it is kind of computed by geodis sytem depending on option
136+
"contractCondition": {
137+
"type": "string",
138+
"required": False,
139+
"allowed": ["P", "E"],
140+
},
134141
"shippingId": {
135142
"type": "string",
136143
"default": "",

roulier/carriers/geodis_fr/edi/encoder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def encode_shipment(self, shipment, service, idx):
2828
["CNI", "%s" % idx, shipment["shippingId"]],
2929
[
3030
"TSR",
31-
"2", # 4065
31+
shipment.get("contractCondition", ""),
3232
[shipment["product"], "", "", shipment["productOption"]], # 7273
3333
shipment["productPriority"], # 4219
3434
shipment["notifications"], # 7085 : M, S, P

0 commit comments

Comments
 (0)