Author: mor
Date: Tue Apr 14 06:42:37 2009 New Revision: 764685 URL: http://svn.apache.org/viewvc?rev=764685&view=rev Log: New stock move screen to do a quick stock move. Part of OFBIZ-2233 (https://issues.apache.org/jira/browse/OFBIZ-2233) Thanks Divesh for contribution. Modified: ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml ofbiz/trunk/applications/product/config/ProductUiLabels.xml ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml ofbiz/trunk/applications/product/servicedef/services_facility.xml ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml ofbiz/trunk/applications/product/webapp/facility/facility/PickMoveStock.ftl ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml Modified: ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml?rev=764685&r1=764684&r2=764685&view=diff ============================================================================== --- ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml (original) +++ ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml Tue Apr 14 06:42:37 2009 @@ -61,6 +61,9 @@ <value xml:lang="fr">La réf. de type de caractéristique d'article ne doit contenir que des lettres, le tiret bas "_" et des chiffres. Recommencez SVP</value> <value xml:lang="it">Il tipo caratteristica prodotto deve contenere solamente lettere, underscore e numeri. Prego reinserire</value> </property> + <property key="ProductNotInAnyLocation"> + <value xml:lang="en">This Product is not in any Location</value> + </property> <property key="ProductRemoveCommunicationEventProductPermissionError"> <value xml:lang="en">Remove Communication Event Product Permission Error</value> <value xml:lang="it">Errore permesso durante la rimozione dell'evento comunicazione prodotto</value> Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=764685&r1=764684&r2=764685&view=diff ============================================================================== --- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Tue Apr 14 06:42:37 2009 @@ -11919,6 +11919,9 @@ <value xml:lang="fr">Liste des informations sur les contenus associés</value> <value xml:lang="it">Lista informazioni contenuto associato</value> </property> + <property key="ProductListFacilityLocation"> + <value xml:lang="en">List Facility Location</value> + </property> <property key="ProductListFeatureInteractions"> <value xml:lang="de">Liste Merkmal Interaktionen</value> <value xml:lang="en">List Feature Interactions</value> @@ -16177,6 +16180,9 @@ <value xml:lang="th">à¸à¸²à¸à¸£à¸²à¸¢à¸à¸²à¸£à¸à¸²à¸£à¸à¸à¸ªà¹à¸à¸à¸¢à¹à¸²à¸à¸£à¸§à¸à¹à¸£à¹à¸§</value> <value xml:lang="zh">å¿«éé货订åæ¥èª</value> </property> + <property key="ProductQuickStockMove"> + <value xml:lang="en">Quick Stock Move</value> + </property> <property key="ProductRating"> <value xml:lang="de">Bewertung</value> <value xml:lang="en">Rating</value> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml?rev=764685&r1=764684&r2=764685&view=diff ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml Tue Apr 14 06:42:37 2009 @@ -609,4 +609,14 @@ </if-compare> </iterate-map> </simple-method> + <simple-method method-name="findProductInventorylocations" short-description="Find Product's inventory locations from facility"> + <entity-condition entity-name="InventoryItemAndLocation" list="LocationList"> + <condition-list> + <condition-expr field-name="facilityId" operator="equals" from-field="parameters.facilityId"/> + <condition-expr field-name="productId" operator="equals" from-field="parameters.productId"/> + <condition-expr field-name="locationSeqId" operator="not-equals" from-field="nullField"/> + </condition-list> + </entity-condition> + <field-to-result field="LocationList"/> + </simple-method> </simple-methods> Modified: ofbiz/trunk/applications/product/servicedef/services_facility.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_facility.xml?rev=764685&r1=764684&r2=764685&view=diff ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services_facility.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services_facility.xml Tue Apr 14 06:42:37 2009 @@ -882,4 +882,12 @@ <attribute name="priority" mode="IN" type="String" optional="true"/> <attribute name="orderId" mode="IN" type="String" optional="false"/> </service> + <service name="findProductInventorylocations" engine="simple" + location="component://product/script/org/ofbiz/product/inventory/StockMoveServices.xml" invoke="findProductInventorylocations"> + <description>Find Product's inventory locations from facility</description> + <permission-service service-name="facilityGenericPermission" main-action="VIEW"/> + <attribute name="facilityId" type="String" mode="IN" optional="false"/> + <attribute name="productId" type="String" mode="IN" optional="false"/> + <attribute name="LocationList" type="List" mode="OUT" optional="true"/> + </service> </services> Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?rev=764685&r1=764684&r2=764685&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Tue Apr 14 06:42:37 2009 @@ -641,6 +641,12 @@ <response name="success" type="view" value="PickMoveStock"/> <response name="error" type="view" value="PickMoveStock"/> </request-map> + <request-map uri="processQuickStockMove"> + <security https="true" auth="true"/> + <event type="service" path="" invoke="processPhysicalStockMove"/> + <response name="success" type="view" value="PickMoveStock"/> + <response name="error" type="view" value="PickMoveStock"/> + </request-map> <!-- ================ Picking Verify Requests ================= --> <request-map uri="VerifyPick"> @@ -1162,6 +1168,7 @@ <request-map uri="LookupProductCategory"><security auth="true" https="true"/><response name="success" type="view" value="LookupProductCategory"/></request-map> <request-map uri="LookupFacility"><security https="true" auth="true"/><response name="success" type="view" value="LookupFacility"/></request-map> <request-map uri="LookupFacilityLocation"><security auth="true" https="true"/><response name="success" type="view" value="LookupFacilityLocation"/></request-map> + <request-map uri="LookupProductInventoryLocation"><security auth="true" https="true"/><response name="success" type="view" value="LookupProductInventoryLocation"/></request-map> <request-map uri="LookupPartyName"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyName"/></request-map> <request-map uri="LookupInventoryItem"><security https="true" auth="true"/><response name="success" type="view" value="LookupInventoryItem"/></request-map> <!-- end of request mappings --> @@ -1254,6 +1261,7 @@ <view-map name="LookupProductCategory" type="screen" page="component://product/widget/catalog/LookupScreens.xml#LookupProductCategory"/> <view-map name="LookupFacility" type="screen" page="component://product/widget/facility/LookupScreens.xml#LookupFacility"/> <view-map name="LookupFacilityLocation" page="component://product/widget/facility/LookupScreens.xml#LookupFacilityLocation" type="screen"/> + <view-map name="LookupProductInventoryLocation" page="component://product/widget/facility/LookupScreens.xml#LookupProductInventoryLocation" type="screen"/> <view-map name="LookupPartyName" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyName"/> <view-map name="LookupInventoryItem" type="screen" page="component://product/widget/facility/LookupScreens.xml#LookupInventoryItem"/> <!-- end of view mappings --> Modified: ofbiz/trunk/applications/product/webapp/facility/facility/PickMoveStock.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/PickMoveStock.ftl?rev=764685&r1=764684&r2=764685&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/facility/PickMoveStock.ftl (original) +++ ofbiz/trunk/applications/product/webapp/facility/facility/PickMoveStock.ftl Tue Apr 14 06:42:37 2009 @@ -17,6 +17,16 @@ under the License. --> +<script language="JavaScript" type="text/javascript"> + function quicklookup(func, locationelement, facilityelement, productelement) { + + var productId = productelement.value; + var facilityId = facilityelement.value; + var request = "LookupProductInventoryLocation?productId=" + productId + "&facilityId=" + facilityId; + window[func](locationelement, request); + } +</script> + <div class="screenlet"> <div class="screenlet-title-bar"> <ul> @@ -134,4 +144,46 @@ <input type="hidden" name="_rowCount" value="${rowCount}"> </form> </div> + <div class="screenlet-title-bar"> + <ul> + <li class="h3">${uiLabelMap.ProductQuickStockMove}</li> + </ul> + <br class="clear"/> + </div> + <div class="screenlet-body"> + <form method="post" action="<@ofbizUrl>processQuickStockMove</@ofbizUrl>" name='quickStockMove'> + <input type="hidden" name="facilityId" value="${facilityId?if_exists}"> + <table cellspacing="0" class="basic-table hover-bar"> + <tr class="header-row"> + <td>${uiLabelMap.ProductProduct}</td> + <td>${uiLabelMap.ProductFromLocation}</td> + <td>${uiLabelMap.ProductToLocation}</td> + <td>${uiLabelMap.ProductMoveQuantity}</td> + <td> </td> + </tr> + <td> + <input type="text" size="20" name="productId" maxlength="20"> + <a href="javascript:call_fieldlookup2(document.quickStockMove.productId,'LookupProduct');"> + <img src="<@ofbizContentUrl>/images/fieldlookup.gif</@ofbizContentUrl>" width="15" height="14" border="0" alt="Click here For Field Lookup"/> + </a> + </td> + <td> + <input type="text" size="20" name="locationSeqId" id= "locationSeqId" maxlength="20"> + <a href="javascript:quicklookup('call_fieldlookup2', document.quickStockMove.locationSeqId, document.quickStockMove.facilityId, document.quickStockMove.productId)"> + <img src="<@ofbizContentUrl>/images/fieldlookup.gif</@ofbizContentUrl>" width="15" height="14" border="0" alt="Click here For Field Lookup"/> + <td> + <input type="text" size="20" name="targetLocationSeqId" id= "targetLocationSeqId_o_" maxlength="20"> + <a href="javascript:call_fieldlookup2(document.quickStockMove.targetLocationSeqId,'LookupFacilityLocation?facilityId=${facilityId}&locationTypeEnumId=FLT_PICKLOC');"> + <img src="<@ofbizContentUrl>/images/fieldlookup.gif</@ofbizContentUrl>" width="15" height="14" border="0" alt="Click here For Field Lookup"/> + </a> + </td> + <td><input type="text" name="quantityMoved" size="6"></td> + <tr> + <td colspan="13" align="right"> + <a href="javascript:document.quickStockMove.submit();" class="buttontext">${uiLabelMap.ProductQuickStockMove}</a> + </td> + </tr> + </table> + </form> + </div> </div> \ No newline at end of file Modified: ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml?rev=764685&r1=764684&r2=764685&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml (original) +++ ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml Tue Apr 14 06:42:37 2009 @@ -129,4 +129,16 @@ <field name="partyIdFrom" title="${uiLabelMap.PartyPartyFrom}"><display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${lastName}[${partyId}]"/></field> <field name="partyIdTo" title="${uiLabelMap.PartyPartyTo}"><display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${lastName}[${partyId}]"/></field> </form> + <form name="ListProductInventoryLocation" list-name="LocationList" title="" type="list" paginate-target="ListProductInventoryLocation" + odd-row-style="alternate-row" default-table-style="basic-table hover-bar" view-size="20"> + <field name="inventoryItemId"><display/></field> + <field name="locationSeqId" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" > + <hyperlink also-hidden="false" target-type="plain" description="${locationSeqId}" target="javascript:set_value('${locationSeqId}')"/> + </field> + <field name="locationTypeEnumId"> + <display-entity entity-name="Enumeration" description="${description}" key-field-name="enumId"/> + </field> + <field name="quantityOnHandTotal" title="${uiLabelMap.ProductQoh}"><display/></field> + <field name="availableToPromiseTotal" title="${uiLabelMap.ProductAtp}"><display/></field> + </form> </forms> \ No newline at end of file Modified: ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml?rev=764685&r1=764684&r2=764685&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml Tue Apr 14 06:42:37 2009 @@ -109,4 +109,46 @@ </widgets> </section> </screen> + <screen name="LookupProductInventoryLocation"> + <section> + <condition> + <if-service-permission service-name="facilityGenericPermission" main-action="VIEW"/> + </condition> + <actions> + <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="ProductErrorUiLabels" map-name="uiLabelMap" global="true"/> + <set field="title" value="${uiLabelMap.ProductListFacilityLocation}"/> + <set field="facilityId" from-field="parameters.facilityId"/> + <set field="productId" from-field="parameters.productId"/> + <service service-name="findProductInventorylocations"> + <field-map field-name="facilityId"/> + <field-map field-name="productId"/> + </service> + </actions> + <widgets> + <section> + <condition> + <not><if-empty field="LocationList"/></not> + </condition> + <widgets> + <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="search-results"> + <include-form name="ListProductInventoryLocation" location="component://product/webapp/facility/lookup/FieldLookupForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + <fail-widgets> + <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="search-results"> + <label style="h3" text="${uiLabelMap.ProductNotInAnyLocation}"/> + </decorator-section> + </decorator-screen> + </fail-widgets> + </section> + </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.ProductFacilityViewPermissionError}</label> + </fail-widgets> + </section> + </screen> </screens> |
Free forum by Nabble | Edit this page |