--- a/modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/process/GoodsShipmentGenerator.java	2023-10-25 18:01:46.358985000 +0200
+++ b/modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/process/GoodsShipmentGenerator.java	2023-10-25 17:58:18.724292000 +0200
@@ -86,8 +86,9 @@
     this.shipment.setOrganization(organization);
     this.shipment.setTrxOrganization(salesOrder.getTrxOrganization());
     this.shipment.setSalesTransaction(true);
-    this.shipment
-        .setDocumentType(FIN_Utility.getDocumentType(organization, DOCBASETYPE_MATERIAL_SHIPMENT));
+    this.shipment.setDocumentType(salesOrder.getDocumentType().getDocumentTypeForShipment() != null
+        ? salesOrder.getDocumentType().getDocumentTypeForShipment()
+        : FIN_Utility.getDocumentType(organization, DOCBASETYPE_MATERIAL_SHIPMENT));
     this.shipment.setDocumentNo(FIN_Utility.getDocumentNo(this.shipment.getDocumentType(),
         this.shipment.getDocumentType().getTable() != null
             ? "DocumentNo_" + this.shipment.getDocumentType().getTable().getDBTableName()
