This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 31075bdc52 Fixed: Disable 'New Shipment For Ship Group' buttons for
purchase orders that are not approved (OFBIZ-13337) (#935)
31075bdc52 is described below
commit 31075bdc528b2fdae47cd3af76cd07e63c868db6
Author: Anahita Goljahani <[email protected]>
AuthorDate: Mon Jan 12 17:32:09 2026 +0100
Fixed: Disable 'New Shipment For Ship Group' buttons for purchase orders
that are not approved (OFBIZ-13337) (#935)
Explanation: When a PO is created but not yet approved, the Order
Details screen displays the “New Shipment For Ship Group” buttons, which
allows shipments to be created prior to order approval. This PR fixes
this behavior by hiding the buttons until the order has been approved.
This is one of the issues reported in [Step-by-step workflow: purchase
orders with multiple shipments and
invoices](https://cwiki.apache.org/confluence/display/OFBENDUSER/Step-by-step+workflow%3A+purchase+orders+with+multiple+shipments+and+invoices)
---
applications/order/template/order/OrderShippingInfo.ftl | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/applications/order/template/order/OrderShippingInfo.ftl
b/applications/order/template/order/OrderShippingInfo.ftl
index e2d957440a..45f53baec0 100644
--- a/applications/order/template/order/OrderShippingInfo.ftl
+++ b/applications/order/template/order/OrderShippingInfo.ftl
@@ -801,7 +801,8 @@ under the License.
</#if>
<#else>
<#assign facilities =
facilitiesForShipGroup.get(shipGroup.shipGroupSeqId)>
- <#if facilities?has_content>
+ <#if "ORDER_APPROVED" == orderHeader.statusId>
+ <#if facilities?has_content>
<div>
<form name="createShipment2_${shipGroup.shipGroupSeqId}"
method="post" action="/facility/control/createShipment">
<input type="hidden" name="primaryOrderId"
value="${orderId}"/>
@@ -819,7 +820,7 @@ under the License.
<input type="submit" class="smallSubmit"
value="${uiLabelMap.OrderNewShipmentForShipGroup}
[${shipGroup.shipGroupSeqId}]"/>
</form>
</div>
- <#else>
+ <#else>
<a
href="javascript:document.quickDropShipOrder_${shipGroup_index}.submit();"
class="buttontext">${uiLabelMap.ProductShipmentQuickComplete}</a>
<a
href="javascript:document.createShipment3_${shipGroup.shipGroupSeqId}.submit();"
class="buttontext">${uiLabelMap.OrderNewDropShipmentForShipGroup}
[${shipGroup.shipGroupSeqId}]</a>
<form name="quickDropShipOrder_${shipGroup_index}"
method="post" action="<@ofbizUrl>quickDropShipOrder</@ofbizUrl>">
@@ -834,6 +835,7 @@ under the License.
<input type="hidden" name="statusId"
value="PURCH_SHIP_CREATED" />
<input type="hidden" name="externalLoginKey"
value="${externalLoginKey}" />
</form>
+ </#if>
</#if>
</#if>
</td>