Issuing stocks in advanced manufacturing caused errors reporting negative stock always.
[fa-stable.git] / manufacturing / work_order_release.php
index 0e9273ed3a2c9790bdbdca7f87a91e3bf193e1d5..10044b7b01f6f6542399bc5501cfe99b6f341063 100644 (file)
@@ -52,7 +52,10 @@ function can_process($myrow)
        }
 
        // make sure item has components
-       if (!has_bom($myrow['stock_id']))
+    // We don't need to stop the user to release it if it's and advanced order.
+    // The user know what he is doing.
+
+    if (!has_bom($myrow['stock_id']) && $myrow['type'] != WO_ADVANCED)
        {
                display_error(_("This Work Order cannot be released. The selected item to manufacture does not have a bom."));
                set_focus('stock_id');