Author: diveshdutta
Date: Sun Jun 19 00:19:15 2016
New Revision: 1749109
URL: http://svn.apache.org/viewvc?rev=1749109&view=rev
Log:
[OFBIZ-7108] Applying slightly modified patch. Provided an option to to
specifiy the facility location while provinding the inventory/stock once the
production run gets completed. If product which is produced is not associated
with facility then, ProductFacility record was created in service
setLastInventoryCount, I skipped this part of the patch. I think this should be
done in productionRunProduce service. So I am committing the main fuctionality
to specify the facility location.
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml
ofbiz/trunk/applications/product/widget/facility/FieldLookupForms.xml
ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=1749109&r1=1749108&r2=1749109&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
(original)
+++
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
Sun Jun 19 00:19:15 2016
@@ -1567,6 +1567,7 @@ public class ProductionRunServices {
String inventoryItemTypeId =
(String)context.get("inventoryItemTypeId");
String lotId = (String)context.get("lotId");
String uomId = (String) context.get("quantityUomId");
+ String locationSeqId = (String) context.get("locationSeqId");
Boolean createLotIfNeeded = (Boolean)context.get("createLotIfNeeded");
Boolean autoCreateLot = (Boolean)context.get("autoCreateLot");
@@ -1688,6 +1689,7 @@ public class ProductionRunServices {
}
//serviceContext.put("serialNumber", productionRunId);
serviceContext.put("lotId", lotId);
+ serviceContext.put("locationSeqId", locationSeqId);
serviceContext.put("uomId",uomId);
serviceContext.put("userLogin", userLogin);
Map<String, Object> resultService =
dispatcher.runSync("createInventoryItem", serviceContext);
@@ -1723,6 +1725,7 @@ public class ProductionRunServices {
serviceContext.put("datetimeManufactured",
UtilDateTime.nowTimestamp());
serviceContext.put("comments", "Created by production run " +
productionRunId);
serviceContext.put("lotId", lotId);
+ serviceContext.put("locationSeqId", locationSeqId);
serviceContext.put("uomId",uomId);
if (unitCost.compareTo(ZERO) != 0) {
serviceContext.put("unitCost", unitCost);
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=1749109&r1=1749108&r2=1749109&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
(original)
+++
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
Sun Jun 19 00:19:15 2016
@@ -777,6 +777,7 @@ under the License.
<security https="true" auth="true"/>
<response name="success" type="view" value="PRunsInfoAndOrder"/>
</request-map>
+ <request-map uri="LookupFacilityLocation"><security auth="true"
https="true"/><response name="success" type="view"
value="LookupFacilityLocation"/></request-map>
<!-- end of request mappings -->
@@ -811,6 +812,7 @@ under the License.
<view-map name="LookupRouting"
page="component://manufacturing/widget/manufacturing/LookupScreens.xml#LookupRouting"
type="screen"/>
<view-map name="LookupRoutingTask"
page="component://manufacturing/widget/manufacturing/LookupScreens.xml#LookupRoutingTask"
type="screen"/>
<view-map name="LookupProductFeature"
page="component://product/widget/catalog/LookupScreens.xml#LookupProductFeature"
type="screen"/>
+ <view-map name="LookupFacilityLocation" type="screen"
page="component://product/widget/facility/LookupScreens.xml#LookupFacilityLocation"/>
<!-- BOM view mappings -->
<view-map name="EditProductBom"
page="component://manufacturing/widget/manufacturing/BomScreens.xml#EditProductBom"
type="screen"/>
Modified:
ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml?rev=1749109&r1=1749108&r2=1749109&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml
(original)
+++
ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml
Sun Jun 19 00:19:15 2016
@@ -312,6 +312,8 @@ under the License.
</drop-down>
</field>
<field name="lotId"><text default-value="${lastLotId}"/></field>
+ <field name="facilityId"><hidden/></field>
+ <field name="locationSeqId"> <lookup
target-form-name="LookupFacilityLocation" target-parameter="facilityId"
></lookup></field>
<field name="submitButton"
title="${uiLabelMap.CommonAdd}"><submit/></field>
</form>
<form name="ProductionRunDeclareAndProduceTop" type="single"
skip-end="true" target="productionRunDeclareAndProduce" title=""
default-map-name="productionRunData"
Modified: ofbiz/trunk/applications/product/widget/facility/FieldLookupForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FieldLookupForms.xml?rev=1749109&r1=1749108&r2=1749109&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FieldLookupForms.xml
(original)
+++ ofbiz/trunk/applications/product/widget/facility/FieldLookupForms.xml Sun
Jun 19 00:19:15 2016
@@ -56,7 +56,8 @@ under the License.
<form name="lookupFacilityLocation" target="LookupFacilityLocation"
title="" type="single"
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-entity entity-name="FacilityLocation"
default-field-type="find"/>
- <field name="facilityId">
+ <field name="facilityId" use-when="facilityId !=
null"><hidden/></field>
+ <field name="facilityId" use-when="facilityId == null">
<drop-down allow-empty="false">
<entity-options entity-name="Facility"
description="${facilityName}" key-field-name="facilityId">
<entity-order-by field-name="facilityName"/>
Modified: ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml?rev=1749109&r1=1749108&r2=1749109&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml
(original)
+++ ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml Sun Jun
19 00:19:15 2016
@@ -55,6 +55,7 @@ under the License.
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap"
global="true"/>
<set field="title"
value="${uiLabelMap.PageTitleLookupFacility}"/>
+ <set field="facilityId" from-field="parameters.facilityId"
default-value="${parameters.parm0}"/>
<set field="queryString" from-field="result.queryString"/>
<set field="viewIndex" from-field="parameters.VIEW_INDEX"
type="Integer"/>
<property-to-field resource="widget"
property="widget.form.defaultViewSize" field="viewSizeDefaultValue"/>
@@ -74,7 +75,6 @@ under the License.
</widgets>
</section>
</screen>
-
<screen name="LookupShipment">
<section>
<actions>