svn commit: r995325 - in /ofbiz/trunk/applications/manufacturing: script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml webapp/manufacturing/WEB-INF/controller.xml webapp/manufacturing/jobshopmgt/ProductionRunForms.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r995325 - in /ofbiz/trunk/applications/manufacturing: script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml webapp/manufacturing/WEB-INF/controller.xml webapp/manufacturing/jobshopmgt/ProductionRunForms.xml

jacopoc
Author: jacopoc
Date: Thu Sep  9 06:35:24 2010
New Revision: 995325

URL: http://svn.apache.org/viewvc?rev=995325&view=rev
Log:
Fix for a rather important functional bug: dependent production runs were always created when a production run is created manually (and not from requirements etc.); in my opinion this should never happen, but I understand that it can be useful in some rare occasions, so I have added the option to select if mandatory production runs have to be created or not.


Modified:
    ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml

Modified: ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml?rev=995325&r1=995324&r2=995325&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml (original)
+++ ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml Thu Sep  9 06:35:24 2010
@@ -159,5 +159,16 @@ under the License.
         <call-service service-name="addProductionRunRoutingTask" in-map-name="context">
         </call-service>
     </simple-method>
+    <simple-method method-name="createProductionRun" short-description="Based on selected options, calls one of the specialized services to create a production run.">
+        <if-compare field="parameters.createDependentProductionRuns" operator="equals" value="Y">
+                <return response-code="createProductionRunsForProductBom"/>
+            <else>
+                <set field="parameters.pRQuantity" from-field="parameters.quantity" type="BigDecimal"/>
+                <field-to-request field="parameters.quantity" request-name="pRQuantity"/>
+                <return response-code="createProductionRunSingle"/>
+            </else>
+        </if-compare>
+    </simple-method>
+
 </simple-methods>
 

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml?rev=995325&r1=995324&r2=995325&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml Thu Sep  9 06:35:24 2010
@@ -448,10 +448,22 @@ under the License.
     </request-map>
     <request-map uri="createProductionRun">
         <security https="true" auth="true"/>
+        <event type="simple" path="component://manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml" invoke="createProductionRun"/>        
+        <response name="createProductionRunsForProductBom" type="request" value="createProductionRunsForProductBom"/>
+        <response name="createProductionRunSingle" type="request" value="createProductionRunSingle"/>
+    </request-map>
+    <request-map uri="createProductionRunsForProductBom">
+        <security https="true" auth="true"/>
         <event type="service" invoke="createProductionRunsForProductBom"/>
         <response name="success" type="view" value="EditProductionRun"/>
         <response name="error" type="view" value="CreateProductionRun"/>
     </request-map>
+    <request-map uri="createProductionRunSingle">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createProductionRun"/>
+        <response name="success" type="view" value="EditProductionRun"/>
+        <response name="error" type="view" value="CreateProductionRun"/>
+    </request-map>
     <request-map uri="ShowProductionRun">
         <security https="true" auth="true"/>
         <event type="groovy" path="component://manufacturing/webapp/manufacturing/jobshopmgt/" invoke="ShowProductionRun.groovy"/>

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml?rev=995325&r1=995324&r2=995325&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml Thu Sep  9 06:35:24 2010
@@ -35,6 +35,12 @@ under the License.
         <field name="routingId" title="${uiLabelMap.ManufacturingRoutingId}"><lookup target-form-name="LookupRouting" size="16"/></field>
         <field name="workEffortName" title="${uiLabelMap.ManufacturingProductionRunName}"><text size="30"/></field>
         <field name="description" title="${uiLabelMap.CommonDescription}"><text size="50"/></field>
+        <field name="createDependentProductionRuns">
+            <drop-down allow-empty="false">
+                <option key="N" description="${uiLabelMap.CommonNo}"/>
+                <option key="Y" description="${uiLabelMap.CommonYes}"/>
+            </drop-down>
+        </field>
         <field name="submitButton" title="${uiLabelMap.CommonSubmit}">
             <submit button-type="button"/>
         </field>