You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/03/16 16:20:53 UTC

svn commit: r519005 - in /ofbiz/trunk/applications: manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java order/data/OrderTypeData.xml

Author: jacopoc
Date: Fri Mar 16 08:20:53 2007
New Revision: 519005

URL: http://svn.apache.org/viewvc?view=rev&rev=519005
Log:
Added new status of "proposed" to Requirement, that is the initial status of all the requirements proposed by the mrp.

Modified:
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java
    ofbiz/trunk/applications/order/data/OrderTypeData.xml

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?view=diff&rev=519005&r1=519004&r2=519005
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Fri Mar 16 08:20:53 2007
@@ -98,11 +98,10 @@
         }
 
         // Proposed requirements are deleted
-        // TODO: we have to find a way (a new status REQ_PROPOSED?) to recognize the requirements automatically created by the MRP process
         listResult = null;
         List listResultRoles = new ArrayList();
         try{
-            listResult = delegator.findByAnd("Requirement", UtilMisc.toMap("requirementTypeId", "PRODUCT_REQUIREMENT", "statusId", "REQ_CREATED"));
+            listResult = delegator.findByAnd("Requirement", UtilMisc.toMap("requirementTypeId", "PRODUCT_REQUIREMENT", "statusId", "REQ_PROPOSED"));
         } catch(GenericEntityException e) {
             return ServiceUtil.returnError("Problem, we can not find all the items of InventoryEventPlanned, for more detail look at the log");
         }

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java?view=diff&rev=519005&r1=519004&r2=519005
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java Fri Mar 16 08:20:53 2007
@@ -213,6 +213,7 @@
         Map parameters = UtilMisc.toMap("userLogin", userLogin);
         
         parameters.put("productId", productId);
+        parameters.put("statusId", "REQ_PROPOSED");
         parameters.put("facilityId", (isBuilt? manufacturingFacilityId: facilityId));
         parameters.put("requiredByDate", requiredByDate);
         parameters.put("requirementStartDate", requirementStartDate);

Modified: ofbiz/trunk/applications/order/data/OrderTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/data/OrderTypeData.xml?view=diff&rev=519005&r1=519004&r2=519005
==============================================================================
--- ofbiz/trunk/applications/order/data/OrderTypeData.xml (original)
+++ ofbiz/trunk/applications/order/data/OrderTypeData.xml Fri Mar 16 08:20:53 2007
@@ -183,10 +183,13 @@
 
     <!-- Requirement statuses -->
     <StatusType description="Requirement Status" hasTable="N" parentTypeId="" statusTypeId="REQUIREMENT_STATUS"/>
+    <StatusItem description="Proposed" sequenceId="01" statusCode="PROPOSED" statusId="REQ_PROPOSED" statusTypeId="REQUIREMENT_STATUS"/>
     <StatusItem description="Created" sequenceId="01" statusCode="CREATED" statusId="REQ_CREATED" statusTypeId="REQUIREMENT_STATUS"/>
     <StatusItem description="Approved" sequenceId="02" statusCode="APPROVED" statusId="REQ_APPROVED" statusTypeId="REQUIREMENT_STATUS"/>
     <StatusItem description="Ordered" sequenceId="03" statusCode="ORDERED" statusId="REQ_ORDERED" statusTypeId="REQUIREMENT_STATUS"/>
     <StatusItem description="Rejected" sequenceId="98" statusCode="REJECTED" statusId="REQ_REJECTED" statusTypeId="REQUIREMENT_STATUS"/>
+    <StatusValidChange condition="" statusId="REQ_PROPOSED" statusIdTo="REQ_APPROVED" transitionName="Accept Requirement"/>
+    <StatusValidChange condition="" statusId="REQ_PROPOSED" statusIdTo="REQ_REJECTED" transitionName="Reject Requirement"/>
     <StatusValidChange condition="" statusId="REQ_CREATED" statusIdTo="REQ_APPROVED" transitionName="Accept Requirement"/>
     <StatusValidChange condition="" statusId="REQ_CREATED" statusIdTo="REQ_REJECTED" transitionName="Reject Requirement"/>
     <StatusValidChange condition="" statusId="REQ_APPROVED" statusIdTo="REQ_ORDERED" transitionName="Order Requirement"/>