Skip to content

Commit 745de7c

Browse files
committed
Fix ubl_template picking, always return DeliveredQuantity
1 parent 05e2eb8 commit 745de7c

File tree

3 files changed

+34
-11
lines changed

3 files changed

+34
-11
lines changed

base_wamas_ubl/lib/wamas/ubl_template/picking.xml

+3-9
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,12 @@
139139
</cac:Shipment>
140140
<cbc:ID><t t-raw="line.IvAusp_HostPosNr" /></cbc:ID>
141141
<cbc:DeliveredQuantity
142-
t-if="line.Mngs_Mng"
143142
t-att-unitCode="line.IvArt_Bestand_Einheit"
144143
unitCodeListAgencyName="WAMAS"
145144
>
146-
<t t-raw="line.Mngs_Mng" />
147-
</cbc:DeliveredQuantity>
148-
<cbc:DeliveredQuantity
149-
t-if="line.IvAusp_LiefMngsWamas_Mng"
150-
t-att-unitCode="line.IvArt_Bestand_Einheit"
151-
unitCodeListAgencyName="WAMAS"
152-
>
153-
<t t-raw="line.IvAusp_LiefMngsWamas_Mng" />
145+
<t
146+
t-raw="hasattr(line,'Mngs_Mng') and line.Mngs_Mng or (hasattr(line, 'IvAusp_LiefMngsWamas_Mng') and line.IvAusp_LiefMngsWamas_Mng) or 0.0"
147+
/>
154148
</cbc:DeliveredQuantity>
155149
<cac:OrderLineReference>
156150
<cbc:LineID />

base_wamas_ubl/tests/samples/WAMAS2UBL-SAMPLE_AUSKQ_WATEKQ_WATEPQ-DESPATCH_ADVICE.xml

+30-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
<cbc:DeliveredQuantity unitCode="TETRA" unitCodeListAgencyName="WAMAS">
8585
7.0
8686
</cbc:DeliveredQuantity>
87-
8887
<cac:OrderLineReference>
8988
<cbc:LineID/>
9089
</cac:OrderLineReference>
@@ -115,7 +114,36 @@
115114
<cbc:DeliveredQuantity unitCode="TETRA" unitCodeListAgencyName="WAMAS">
116115
8.0
117116
</cbc:DeliveredQuantity>
118-
117+
<cac:OrderLineReference>
118+
<cbc:LineID/>
119+
</cac:OrderLineReference>
120+
<cac:Item>
121+
<cac:BuyersItemIdentification>
122+
<cbc:ID/>
123+
</cac:BuyersItemIdentification>
124+
<cac:SellersItemIdentification>
125+
<cbc:ID>
126+
15455
127+
</cbc:ID>
128+
129+
</cac:SellersItemIdentification>
130+
</cac:Item>
131+
</cac:DespatchLine><cac:DespatchLine>
132+
<cac:Shipment>
133+
<cac:TransportHandlingUnit>
134+
<cac:ActualPackage>
135+
<cbc:ID>376401426411929180</cbc:ID>
136+
</cac:ActualPackage>
137+
<cbc:TransportHandlingUnitTypeCode>PE</cbc:TransportHandlingUnitTypeCode>
138+
</cac:TransportHandlingUnit>
139+
<cac:GrossWeightMeasure>
140+
<cbc:Measure>314.7</cbc:Measure>
141+
</cac:GrossWeightMeasure>
142+
</cac:Shipment>
143+
<cbc:ID>103</cbc:ID>
144+
<cbc:DeliveredQuantity unitCode="TETRA" unitCodeListAgencyName="WAMAS">
145+
0.0
146+
</cbc:DeliveredQuantity>
119147
<cac:OrderLineReference>
120148
<cbc:LineID/>
121149
</cac:OrderLineReference>

base_wamas_ubl/tests/samples/WAMAS2UBL-SAMPLE_AUSKQ_WATEKQ_WATEPQ.wamas

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ WAMAS ODOO 00005620230413110200AUSKQ00520001673982/1701778 HOST 167
22
WAMAS ODOO 00000120230413110200WATEKQ054376401426411929180QUAI-22 000000000000000000000000 0000GE 2/120185 HOST PE 000740ST9016000000314700
33
WAMAS ODOO 00000220230413110200WATEPQ050 20240413 12 eCAM 008610 NN20240413000001TETRA 0001673982/1701778 HOST 00010100015455 00000000000007000000000000000DISPONIBLE 376401426411929180
44
WAMAS ODOO 00000320230413110200WATEPQ050 20240413 12 eCAM 008610 NN20240413000001TETRA 0001673982/1701778 HOST 00010200015455 00000000000008000000000000000DISPONIBLE 376401426411929180
5+
WAMAS ODOO 00000420230413110200WATEPQ050 20240413 12 eCAM 008610 NN20240413000001TETRA 0001673982/1701778 HOST 00010300015455 00000000000000000000000000000DISPONIBLE 376401426411929180

0 commit comments

Comments
 (0)