Author: jleroux
Date: Wed Feb 11 14:14:31 2015
New Revision: 1658965

URL: http://svn.apache.org/r1658965
Log:
A patch from Pierre Smits for "User should be able to delete associated 
production runs" https://issues.apache.org/jira/browse/OFBIZ-6030

If associations to production runs are set manually in a production run, it 
should be possible to delete erroneous associations.

Modified:
    
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
    
ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml

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=1658965&r1=1658964&r2=1658965&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
 (original)
+++ 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
 Wed Feb 11 14:14:31 2015
@@ -472,6 +472,12 @@ under the License.
         <event type="service" invoke="createProductionRunAssoc"/>
         <response name="success" type="view" value="ProductionRunAssocs"/>
     </request-map>
+    <request-map uri="removeProductionRunAssoc">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="removeWorkEffortAssoc"/>
+        <response name="success" type="view" value="EditProductionRun"/>
+        <response name="error" type="view" value="EditProductionRun"/>
+    </request-map>
     <request-map uri="ManufacturingReports">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="ManufacturingReports"/>

Modified: 
ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml?rev=1658965&r1=1658964&r2=1658965&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml
 (original)
+++ 
ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml
 Wed Feb 11 14:14:31 2015
@@ -785,6 +785,15 @@ under the License.
         <field name="actualCompletionDate" 
title="${uiLabelMap.ManufacturingActualCompletionDate}" 
entry-name="workEffortIdFrom">
             <display-entity entity-name="WorkEffort" 
key-field-name="workEffortId" description="${actualCompletionDate} " 
cache="true"/>
         </field>
+        <field name="deleteLink" title=" " widget-style="buttontext">
+            <hyperlink target="removeProductionRunAssoc" 
description="${uiLabelMap.CommonRemove}" also-hidden="false">
+                <parameter param-name="workEffortIdFrom"/>
+                <parameter param-name="workEffortIdTo" 
from-field="productionRunId"/>
+                <parameter param-name="fromDate" 
from-field="estimatedStartDate"/>
+                <parameter param-name="workEffortAssocTypeId" 
value="WORK_EFF_PRECEDENCY"/>
+                <parameter param-name="productionRunId"/>
+            </hyperlink>
+        </field>
     </form>
     <form name="dependentWorkEfforts" type="list" target="" title="" 
list-name="dependentWorkEfforts"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
@@ -814,6 +823,15 @@ under the License.
         <field name="actualCompletionDate" 
title="${uiLabelMap.ManufacturingActualCompletionDate}" 
entry-name="workEffortIdTo">
             <display-entity entity-name="WorkEffort" 
key-field-name="workEffortId" description="${actualCompletionDate} " 
cache="true"/>
         </field>
+        <field name="deleteLink" title=" " widget-style="buttontext">
+            <hyperlink target="removeProductionRunAssoc" 
description="${uiLabelMap.CommonRemove}" also-hidden="false">
+                <parameter param-name="workEffortIdFrom" 
from-field="productionRunId"/>
+                <parameter param-name="workEffortIdTo"/>
+                <parameter param-name="fromDate" 
from-field="estimatedStartDate"/>
+                <parameter param-name="workEffortAssocTypeId" 
value="WORK_EFF_PRECEDENCY"/>
+                <parameter param-name="productionRunId"/>
+            </hyperlink>
+        </field>
     </form>
     <form name="ProductionRunTaskCosts" type="list" target="" title="" 
list-name="taskCosts"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">


Reply via email to