Author: jleroux
Date: Mon Jun 13 07:58:09 2016
New Revision: 1748121
URL: http://svn.apache.org/viewvc?rev=1748121&view=rev
Log:
A patch from Florian Montalbano for "Stock Move: Unable to select From Stock
location from List Facility Location popup"
https://issues.apache.org/jira/browse/OFBIZ-7309 reported by Ankush Upadhyay
Functionality working as expected over ofbiz-13.07.03 but failing in trunk.
Steps to reproduce:
1. Login to facility component.
2. Select any facility.
2. Navigate to Stock Moves tab.
3. Click on From Location lookup from Quick Stock Move section against GZ-8544
product.
4. Try to select any location from List Facility Location popup.
We looked into the problem and found what seems to be the root of this bug.
The form with the not working lookup is described in the following ftl file :
PickLiveStock.ftl .
For some reason, the 'Product' input and the 'To Location' input are created
with the macro @htmlTemplate.lookupField (and are working well) but the 'From
Location' field is created by a direct call to a javascript function (and is
not working well).
That causes the lookup to open in another window and to lose the context.
That's why the selection didn't work. Moreover, the theme was not rendered with
Saphir.
Modified:
ofbiz/trunk/applications/product/template/facility/PickMoveStock.ftl
Modified: ofbiz/trunk/applications/product/template/facility/PickMoveStock.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/template/facility/PickMoveStock.ftl?rev=1748121&r1=1748120&r2=1748121&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/template/facility/PickMoveStock.ftl
(original)
+++ ofbiz/trunk/applications/product/template/facility/PickMoveStock.ftl Mon
Jun 13 07:58:09 2016
@@ -169,11 +169,8 @@ under the License.
<@htmlTemplate.lookupField formName="quickStockMove"
name="productId" id="productId" fieldFormName="LookupProduct"/>
</td>
<td>
- <input type="text" size="20" name="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="${uiLabelMap.CommonClickHereForFieldLookup}"/>
- </a>
- </td>
+ <@htmlTemplate.lookupField formName="quickStockMove"
name="locationSeqId" id="locationSeqId"
fieldFormName="LookupFacilityLocation?facilityId=${facilityId}&locationTypeEnumId=FLT_PICKLOC"/>
+ </td>
<td>
<@htmlTemplate.lookupField formName="quickStockMove"
name="targetLocationSeqId" id="targetLocationSeqId"
fieldFormName="LookupFacilityLocation?facilityId=${facilityId}&locationTypeEnumId=FLT_PICKLOC"/>
</td>