You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by da...@apache.org on 2022/12/13 14:10:01 UTC

[ofbiz-framework] branch ofbiz-12723 created (now 5267532fde)

This is an automated email from the ASF dual-hosted git repository.

danwatford pushed a change to branch ofbiz-12723
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


      at 5267532fde Improved: Removed unused oldQOH and oldATP fields from InventoryItem (OFBIZ-12723)

This branch includes the following new commits:

     new 5267532fde Improved: Removed unused oldQOH and oldATP fields from InventoryItem (OFBIZ-12723)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[ofbiz-framework] 01/01: Improved: Removed unused oldQOH and oldATP fields from InventoryItem (OFBIZ-12723)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danwatford pushed a commit to branch ofbiz-12723
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 5267532fdeeba262cd2f1d5f7e40a98bcbefcaa5
Author: Daniel Watford <da...@watfordconsulting.com>
AuthorDate: Tue Dec 13 14:00:54 2022 +0000

    Improved: Removed unused oldQOH and oldATP fields from InventoryItem (OFBIZ-12723)
    
    Fields were used to migrate QOH and ATP inventory values to
    InventoryItemDetails entities following data model changes prior to June
    2006 are are no longer needed. Similarly, services which performed the
    migration have also been removed.
---
 .../datamodel/entitydef/product-entitymodel.xml    |  4 ----
 .../datamodel/entitydef/shipment-entitymodel.xml   |  2 --
 .../product/inventory/InventoryServices.xml        | 26 ----------------------
 applications/product/servicedef/services_maint.xml | 16 -------------
 .../product/widget/facility/InventoryForms.xml     |  4 ----
 5 files changed, 52 deletions(-)

diff --git a/applications/datamodel/entitydef/product-entitymodel.xml b/applications/datamodel/entitydef/product-entitymodel.xml
index 868659f370..6adaa70f0d 100644
--- a/applications/datamodel/entitydef/product-entitymodel.xml
+++ b/applications/datamodel/entitydef/product-entitymodel.xml
@@ -1973,8 +1973,6 @@ under the License.
       <field name="quantityOnHandTotal" type="fixed-point"></field>
       <field name="availableToPromiseTotal" type="fixed-point"></field>
       <field name="accountingQuantityTotal" type="fixed-point"></field>
-      <field name="oldQuantityOnHand" col-name="QUANTITY_ON_HAND" type="fixed-point"></field>
-      <field name="oldAvailableToPromise" col-name="AVAILABLE_TO_PROMISE" type="fixed-point"></field>
       <field name="serialNumber" type="value"></field>
       <field name="softIdentifier" type="value"></field>
       <field name="activationNumber" type="value"></field>
@@ -2115,8 +2113,6 @@ under the License.
         <alias entity-alias="II" name="quantityOnHandTotal"/>
         <alias entity-alias="II" name="availableToPromiseTotal"/>
         <alias entity-alias="II" name="accountingQuantityTotal"/>
-        <alias entity-alias="II" name="oldQuantityOnHand"/>
-        <alias entity-alias="II" name="oldAvailableToPromise"/>
         <alias entity-alias="II" name="serialNumber"/>
         <alias entity-alias="II" name="softIdentifier"/>
         <alias entity-alias="II" name="activationNumber"/>
diff --git a/applications/datamodel/entitydef/shipment-entitymodel.xml b/applications/datamodel/entitydef/shipment-entitymodel.xml
index 053d35796d..83ed93a3f9 100644
--- a/applications/datamodel/entitydef/shipment-entitymodel.xml
+++ b/applications/datamodel/entitydef/shipment-entitymodel.xml
@@ -112,8 +112,6 @@ under the License.
         <alias entity-alias="IITM" name="quantityOnHandTotal"/>
         <alias entity-alias="IITM" name="availableToPromiseTotal"/>
         <alias entity-alias="IITM" name="accountingQuantityTotal"/>
-        <alias entity-alias="IITM" name="oldQuantityOnHand"/>
-        <alias entity-alias="IITM" name="oldAvailableToPromise"/>
         <alias entity-alias="IITM" name="serialNumber"/>
         <alias entity-alias="IITM" name="softIdentifier"/>
         <alias entity-alias="IITM" name="activationNumber"/>
diff --git a/applications/product/minilang/product/inventory/InventoryServices.xml b/applications/product/minilang/product/inventory/InventoryServices.xml
index 2f1ad23971..d0811e8d4f 100644
--- a/applications/product/minilang/product/inventory/InventoryServices.xml
+++ b/applications/product/minilang/product/inventory/InventoryServices.xml
@@ -452,32 +452,6 @@ under the License.
         </if-compare>
     </simple-method>
 
-    <simple-method method-name="updateOldInventoryToDetailAll" short-description="Update Old Inventory To Detail All">
-        <!-- find all InventoryItem records where oldQuantityOnHand or oldAvailableToPromise are not null -->
-        <entity-condition entity-name="InventoryItem" list="inventoryItemList">
-            <condition-list combine="or">
-                <condition-expr field-name="oldQuantityOnHand" operator="not-equals" value=""/>
-                <condition-expr field-name="oldAvailableToPromise" operator="not-equals" value=""/>
-            </condition-list>
-        </entity-condition>
-        <iterate list="inventoryItemList" entry="inventoryItem">
-            <set from-field="inventoryItem" field="callServiceMap.inventoryItem"/>
-            <call-service service-name="updateOldInventoryToDetailSingle" in-map-name="callServiceMap"/>
-            <clear-field field="callServiceMap.inventoryItem"/>
-        </iterate>
-    </simple-method>
-    <simple-method method-name="updateOldInventoryToDetailSingle" short-description="Update Old Inventory To Detail Single">
-        <!-- for each create an InventoryItemDetail representing the old QOH or ATP value, then null those fields -->
-        <set from-field="parameters.inventoryItem.inventoryItemId" field="createDetailMap.inventoryItemId"/>
-        <set from-field="parameters.inventoryItem.oldAvailableToPromise" field="createDetailMap.availableToPromiseDiff"/>
-        <set from-field="parameters.inventoryItem.oldQuantityOnHand" field="createDetailMap.quantityOnHandDiff"/>
-        <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
-
-        <clear-field field="parameters.inventoryItem.oldAvailableToPromise"/>
-        <clear-field field="parameters.inventoryItem.oldQuantityOnHand"/>
-        <store-value value-field="parameters.inventoryItem"/>
-    </simple-method>
-
     <simple-method method-name="checkProductInventoryDiscontinuation" short-description="Check Product Inventory Discontinuation" login-required="false">
         <set from-field="parameters.productId" field="productIdMap.productId"/>
         <find-by-primary-key entity-name="Product" map="productIdMap" value-field="product"/>
diff --git a/applications/product/servicedef/services_maint.xml b/applications/product/servicedef/services_maint.xml
index ce9f5311eb..43df0dce79 100644
--- a/applications/product/servicedef/services_maint.xml
+++ b/applications/product/servicedef/services_maint.xml
@@ -201,20 +201,4 @@ under the License.
         <attribute name="productStoreId" type="String" mode="IN" optional="true"/>
     </service>
 
-    <!-- ============================== -->
-    <!-- Inventory Maintenance Services -->
-    <!-- ============================== -->
-    <service name="updateOldInventoryToDetailAll" engine="simple"
-            location="component://product/minilang/product/inventory/InventoryServices.xml" invoke="updateOldInventoryToDetailAll" auth="true">
-        <description>Update Old Inventory To Detail</description>
-    </service>
-    <service name="updateOldInventoryToDetailSingle" engine="simple" require-new-transaction="true"
-            location="component://product/minilang/product/inventory/InventoryServices.xml" invoke="updateOldInventoryToDetailSingle" auth="true">
-        <description>Update Old Inventory To Detail</description>
-        <attribute name="inventoryItem" type="org.apache.ofbiz.entity.GenericValue" mode="IN" optional="false">
-	     <type-validate>
-	         <fail-property resource="ProductErrorUiLabels" property="ProductRequiredFieldMissingInventoryItem"/>
-	     </type-validate>
-        </attribute>
-    </service>
 </services>
diff --git a/applications/product/widget/facility/InventoryForms.xml b/applications/product/widget/facility/InventoryForms.xml
index ab5116c05c..e0a24fe377 100644
--- a/applications/product/widget/facility/InventoryForms.xml
+++ b/applications/product/widget/facility/InventoryForms.xml
@@ -36,10 +36,6 @@ under the License.
         <alt-target use-when="inventoryItemId==null" target="CreateInventoryItem"/>
         <auto-fields-service service-name="updateInventoryItem" map-name="inventoryItem"/>        
 
-        <!-- ignored fields -->
-        <field name="oldAvailableToPromise"><ignored/></field>
-        <field name="oldQuantityOnHand"><ignored/></field>
-        
         <!-- custom formatted fields -->
         <field name="inventoryItemId" tooltip="${uiLabelMap.ProductNotModificationRecrationInventoryItem}"><display/></field>
         <field name="inventoryItemTypeId" title="${uiLabelMap.ProductInventoryItemTypeId}">