svn commit: r1802755 - in /ofbiz/ofbiz-framework/trunk/applications: manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java product/servicedef/services_inventory.xml

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

svn commit: r1802755 - in /ofbiz/ofbiz-framework/trunk/applications: manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java product/servicedef/services_inventory.xml

Deepak Dixit-5
Author: deepak
Date: Mon Jul 24 06:47:08 2017
New Revision: 1802755

URL: http://svn.apache.org/viewvc?rev=1802755&view=rev
Log:
Fixed: Improvements in Lot entity definition and services,
Applied slightly modified patch from jira issue OFBIZ-8273.
productionruntests test was failing, this will fix the test case.  

Thanks Devanshu for your contribution.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
    ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_inventory.xml

Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=1802755&r1=1802754&r2=1802755&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Mon Jul 24 06:47:08 2017
@@ -1650,9 +1650,8 @@ public class ProductionRunServices {
                 GenericValue lot = EntityQuery.use(delegator).from("Lot").where("lotId", lotId).queryOne();
                 if (lot == null) {
                     if (createLotIfNeeded.booleanValue()) {
-                        Map<String, Object> createLotCtx = new HashMap<>();
+                        Map<String, Object> createLotCtx = ctx.makeValidContext("createLot", ModelService.IN_PARAM, context);
                         createLotCtx.put("creationDate", UtilDateTime.nowTimestamp());
-                        createLotCtx.put("userLogin", userLogin);
                         Map<String, Object> serviceResults = dispatcher.runSync("createLot", createLotCtx);
                         if (!ServiceUtil.isSuccess(serviceResults)) {
                             Debug.logError(ServiceUtil.getErrorMessage(serviceResults), module);

Modified: ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_inventory.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_inventory.xml?rev=1802755&r1=1802754&r2=1802755&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_inventory.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_inventory.xml Mon Jul 24 06:47:08 2017
@@ -71,7 +71,7 @@ under the License.
 
     <service name="createLot" default-entity-name="Lot" engine="entity-auto" invoke="create" auth="true">
         <description>Create a Lot</description>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="INOUT" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateLot" default-entity-name="Lot" engine="entity-auto" invoke="update" auth="true">