svn commit: r505649 - in /ofbiz/trunk/applications/product: webapp/facility/WEB-INF/actions/inventory/EditInventoryItem.bsh widget/facility/FacilityScreens.xml

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

svn commit: r505649 - in /ofbiz/trunk/applications/product: webapp/facility/WEB-INF/actions/inventory/EditInventoryItem.bsh widget/facility/FacilityScreens.xml

jacopoc
Author: jacopoc
Date: Fri Feb  9 23:52:34 2007
New Revision: 505649

URL: http://svn.apache.org/viewvc?view=rev&rev=505649
Log:
Moved the initialization of the two physical inventory variances forms in the Edit inventory item screen from bsh/ftl to the screen def.
Slighlty modified version of the patch from Anil K Patel attached to OFBIZ-710: thanks to Anil and to Chris Howe for the suggestion/feedback.

Modified:
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/EditInventoryItem.bsh
    ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/EditInventoryItem.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/EditInventoryItem.bsh?view=diff&rev=505649&r1=505648&r2=505649
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/EditInventoryItem.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/EditInventoryItem.bsh Fri Feb  9 23:52:34 2007
@@ -103,15 +103,7 @@
         physicalInventoryAndVarianceData.put("partyGroup", physicalInventoryAndVariance.getRelatedOne("PartyGroup"));
     }
 
-    HtmlFormWrapper viewPhysicalInventoryAndVarianceWrapper = new HtmlFormWrapper("/inventory/InventoryForms.xml", "ViewPhysicalInventoryAndVariance", request, response);
-    viewPhysicalInventoryAndVarianceWrapper.putInContext("physicalInventoryAndVarianceDatas", physicalInventoryAndVarianceDatas);
-
-    HtmlFormWrapper createPhysicalInventoryAndVarianceWrapper = new HtmlFormWrapper("/inventory/InventoryForms.xml", "CreatePhysicalInventoryAndVariance", request, response);
-    createPhysicalInventoryAndVarianceWrapper.putInContext("inventoryItem", inventoryItem);
-
     context.put("physicalInventoryAndVarianceDatas", physicalInventoryAndVarianceDatas);
-    context.put("viewPhysicalInventoryAndVarianceWrapper", viewPhysicalInventoryAndVarianceWrapper);
-    context.put("createPhysicalInventoryAndVarianceWrapper", createPhysicalInventoryAndVarianceWrapper);
 }
 
 nowTimestampString = UtilDateTime.nowTimestamp().toString();

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?view=diff&rev=505649&r1=505648&r2=505649
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Fri Feb  9 23:52:34 2007
@@ -460,6 +460,18 @@
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/inventory/EditInventoryItem.ftl"/></html>
                         </platform-specific>
+                        <section>
+                            <condition>
+                                <if-compare field-name="inventoryItem.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM"/>
+                            </condition>
+                            <widgets>
+                                <container>
+                                    <label style="head2">${uiLabelMap.ProductPhysicalInventoryVariances}</label>
+                                </container>
+                                <include-form name="CreatePhysicalInventoryAndVariance" location="component://product/webapp/facility/inventory/InventoryForms.xml"/>
+                                <include-form name="ViewPhysicalInventoryAndVariance" location="component://product/webapp/facility/inventory/InventoryForms.xml"/>
+                            </widgets>
+                        </section>
                     </decorator-section>
                 </decorator-screen>
             </widgets>