svn commit: r995337 - in /ofbiz/branches/release10.04/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: r995337 - in /ofbiz/branches/release10.04/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 07:06:10 2010
New Revision: 995337

URL: http://svn.apache.org/viewvc?rev=995337&view=rev
Log:
Backported rev. 995325 and 995330:
* "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."
* "Refactored and improved the way the information about inventory items created by a production run is retrieved in the form; also added the status of the inventory: this fixes a functional bug where defective inventory items were shown together with valid ones and it was not possible for the user to figure out if the planned quantity for the production run was fulfilled or not."


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

Modified: ofbiz/branches/release10.04/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml?rev=995337&r1=995336&r2=995337&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml (original)
+++ ofbiz/branches/release10.04/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml Thu Sep  9 07:06:10 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/branches/release10.04/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml?rev=995337&r1=995336&r2=995337&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml (original)
+++ ofbiz/branches/release10.04/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml Thu Sep  9 07:06:10 2010
@@ -454,10 +454,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/branches/release10.04/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml?rev=995337&r1=995336&r2=995337&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml (original)
+++ ofbiz/branches/release10.04/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml Thu Sep  9 07:06:10 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>
@@ -134,14 +140,24 @@ under the License.
     </form>
     <form name="ListProductionRunInventoryItems" type="list" title="" list-name="inventoryItems"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+        <row-actions>
+            <entity-one entity-name="InventoryItem" value-field="inventoryItem"/>
+            <entity-condition entity-name="InventoryItemDetail" list="inventoryItemDetails">
+                <condition-expr field-name="inventoryItemId" operator="equals" from-field="inventoryItemId"/>
+                <order-by field-name="inventoryItemDetailSeqId"/>
+            </entity-condition>
+            <set field="quantityOnHandDiff" from-field="inventoryItemDetails[0].quantityOnHandDiff"/>
+        </row-actions>
         <field name="inventoryItemId" widget-style="buttontext">
             <hyperlink target="/facility/control/EditInventoryItem"  description="${inventoryItemId}" also-hidden="false" target-type="inter-app">
                 <parameter param-name="inventoryItemId"/>
             </hyperlink>
         </field>
-        <field name="lotId" entry-name="inventoryItemId"><display-entity entity-name="InventoryItem" key-field-name="inventoryItemId" description="${lotId} "/></field>
-        <field name="unitCost" entry-name="inventoryItemId"><display-entity entity-name="InventoryItem" key-field-name="inventoryItemId" description="${unitCost} "/></field>
-        <field name="creationDate" entry-name="inventoryItemId"><display-entity entity-name="InventoryItem" key-field-name="inventoryItemId" description="${datetimeReceived}"/></field>
+        <field name="lotId" map-name="inventoryItem"><display/></field>
+        <field name="statusId" map-name="inventoryItem"><display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/></field>
+        <field name="unitCost" map-name="inventoryItem"><display/></field>
+        <field name="quantity" entry-name="quantityOnHandDiff"><display/></field>
+        <field name="datetimeReceived" map-name="inventoryItem"><display/></field>
     </form>
 
      <form name="ViewListProductionRunRoutingTasks" type="list" title="" list-name="productionRunRoutingTasks"