fixed bug 0000399: Remove insertions in AD_PInstance_Log table
authorAsier Lostalé <asier.lostale@openbravo.com>
Mon, 26 May 2008 11:24:39 +0000
changeset 1027 2e9052d7de0e
parent 1026 2a6d77a89ccb
child 1028 8b85368639cc
fixed bug 0000399: Remove insertions in AD_PInstance_Log table
src-db/database/model/functions/AD_TABLE_IMPORT.xml
src-db/database/model/functions/C_INVOICE_CREATE.xml
src-db/database/model/functions/C_ORDER_PO_CREATE.xml
src-db/database/model/functions/M_INOUT_CREATE.xml
src-db/database/model/functions/M_INOUT_POST.xml
src-db/database/model/functions/M_PRICELIST_CREATE.xml
src-db/database/model/functions/TEMPLATE.xml
src-db/database/model/functions/W_REQUEST_BPARTNER.xml
--- a/src-db/database/model/functions/AD_TABLE_IMPORT.xml	Mon May 26 10:59:52 2008 +0000
+++ b/src-db/database/model/functions/AD_TABLE_IMPORT.xml	Mon May 26 11:24:39 2008 +0000
@@ -238,18 +238,8 @@
       v_SeqNo:=v_SeqNo + 10;
       v_LastColumnName:=Cur_Column.Column_Name;
       -- Falta: insert de AD_Element
-      IF(p_PInstance_ID IS NOT NULL) THEN
-        AD_SEQUENCE_NEXT('AD_PInstance_Log', v_Client_ID, v_PInstance_Log_ID);
-        INSERT
-        INTO AD_PInstance_Log
-          (
-            AD_PInstance_ID, Log_ID, P_Msg
-          )
-          VALUES
-          (p_PInstance_ID, v_PInstance_Log_ID, '@Created@ @AD_Column_ID@ ' || InitCap(Cur_Column.Table_Name) || '.' || InitCap(Cur_Column.Column_Name)) ;
-      ELSE
-        DBMS_OUTPUT.PUT_LINE('adding Table ' || InitCap(Cur_Column.Table_Name) || ' Column ' || InitCap(Cur_Column.Column_Name)) ;
-      END IF;
+       DBMS_OUTPUT.PUT_LINE('adding Table ' || InitCap(Cur_Column.Table_Name) || ' Column ' || InitCap(Cur_Column.Column_Name)) ;
+      
     END LOOP; --  All new columns
     -- Summary info
     v_Message:='@Created@ = ' || v_count;
--- a/src-db/database/model/functions/C_INVOICE_CREATE.xml	Mon May 26 10:59:52 2008 +0000
+++ b/src-db/database/model/functions/C_INVOICE_CREATE.xml	Mon May 26 11:24:39 2008 +0000
@@ -415,20 +415,7 @@
                 )
                 ;
               --
-              IF(p_PInstance_ID IS NOT NULL) THEN
-                INSERT
-                INTO AD_PINSTANCE_LOG
-                  (
-                    AD_PInstance_ID, Log_ID,
-                    P_ID, P_Msg
-                  )
-                  VALUES
-                  (
-                    p_PInstance_ID, Cur_Order.C_Order_ID,
-                    p_Invoice_ID, '@Created@ @Invoice@ ' || v_DocumentNo
-                  )
-                  ;
-              END IF;
+             
               v_NoRecords:=v_NoRecords + 1;
               v_LineNo:=0;
               -- Insert Reference/Comment to Shipment for Warehouse Order/Pickup
@@ -941,20 +928,7 @@
                     )
                     ;
                   --
-                  IF(p_PInstance_ID IS NOT NULL) THEN
-                    INSERT
-                    INTO AD_PINSTANCE_LOG
-                      (
-                        AD_PInstance_ID, Log_ID,
-                        P_ID, P_Msg
-                      )
-                      VALUES
-                      (
-                        p_PInstance_ID, Cur_InvoiceSchedule.M_InOut_ID,
-                        p_Invoice_ID, '@Created@ @Invoice@ ' || v_DocumentNo
-                      )
-                      ;
-                  END IF;
+                  
                   v_NoRecords:=v_NoRecords + 1;
                   v_LineNo:=0;
                   v_InOut_ID:=-1;
--- a/src-db/database/model/functions/C_ORDER_PO_CREATE.xml	Mon May 26 10:59:52 2008 +0000
+++ b/src-db/database/model/functions/C_ORDER_PO_CREATE.xml	Mon May 26 11:24:39 2008 +0000
@@ -397,22 +397,7 @@
             --
             v_Lines:=v_Lines + 1;
           END LOOP; -- For all SO Lines
-          -- Log info - Log_ID must be unique in instance
-          AD_SEQUENCE_NEXT('AD_PInstance_Log', v_Client_ID, v_PInstance_Log_ID);
-          INSERT
-          INTO AD_PINSTANCE_LOG
-            (
-              AD_PInstance_ID, Log_ID,
-              P_ID, P_Number,
-              P_Msg
-            )
-            VALUES
-            (
-              p_PInstance_ID,v_PInstance_Log_ID,
-              v_PO_Order_ID, v_Lines,
-              Cur_SO.DocumentNo || ': @Created@ ' || v_DocumentNo
-            )
-            ;
+          
           v_Created:=v_Created + 1;
         END LOOP; -- For all SO
       END;
--- a/src-db/database/model/functions/M_INOUT_CREATE.xml	Mon May 26 10:59:52 2008 +0000
+++ b/src-db/database/model/functions/M_INOUT_CREATE.xml	Mon May 26 11:24:39 2008 +0000
@@ -150,11 +150,10 @@
     FINISH_PROCESS BOOLEAN:=false;
     Cur_Storage_ISOPEN BOOLEAN:=false;
     Cur_OrderLine_ISOPEN BOOLEAN:=false;
-    v_PInstance_Log_ID NUMBER;
   BEGIN
     -- Process Parameters
     IF(p_PInstance_ID IS NOT NULL) THEN
-      --  Check for serial execution
+      --  Chec  k for serial execution
       DBMS_OUTPUT.PUT_LINE('Updating PInstance - Processing ' || p_PInstance_ID) ;
       SELECT COUNT(*)
       INTO v_count
@@ -531,22 +530,7 @@
               ROLLBACK TO SAVEPOINT sp_new_shipment;
             ELSE
               v_Message:=v_Message || '@OrderDocumentno@ ' || Cur_Order.DocumentNo || ' -> @InoutDocumentno@ ' || v_DocumentNo || '; ';
-              AD_SEQUENCE_NEXT('AD_PInstance_Log', v_AD_Client_ID, v_PInstance_Log_ID);
-              IF(p_PInstance_ID IS NOT NULL) THEN
-                v_ResultStr:='InsertLog';
-                INSERT INTO AD_PINSTANCE_LOG
-                  (AD_PInstance_ID,
-                  Log_ID,
-                  P_ID,
-                  P_Msg
-                  )
-                VALUES
-                  (p_PInstance_ID,
-                  v_PInstance_Log_ID,
-                  p_InOut_ID,
-                  v_DocumentNo
-                  );
-              END IF;
+              
               -- Post Shipment
               M_INOUT_POST(NULL, p_InOut_ID) ;
             END IF;
@@ -629,20 +613,7 @@
               'DR', 'CO', 'N', 'N'
               );
             --
-            IF(p_PInstance_ID IS NOT NULL AND v_Selection='Y') THEN
-              INSERT INTO AD_PINSTANCE_LOG
-                (AD_PInstance_ID,
-                Log_ID,
-                P_ID,
-                P_Msg
-                )
-              VALUES
-                (p_PInstance_ID,
-                Cur_Invoice.C_Invoice_ID,
-                p_InOut_ID,
-                '@Created@ @Shipment@ ' || v_DocumentNo
-                );
-            END IF;
+           
             -- Lines
             FOR Cur_Lines IN
               (SELECT *
--- a/src-db/database/model/functions/M_INOUT_POST.xml	Mon May 26 10:59:52 2008 +0000
+++ b/src-db/database/model/functions/M_INOUT_POST.xml	Mon May 26 11:24:39 2008 +0000
@@ -382,21 +382,8 @@
             Updated=now()
           WHERE M_INOUT.M_INOUT_ID=Cur_InOut.M_INOUT_ID;
           --
-          v_ResultStr:='LogEntry';
-          IF(p_PInstance_ID IS NOT NULL) THEN
-            INSERT
-            INTO AD_PINSTANCE_LOG
-              (
-                AD_PInstance_ID, Log_ID,
-                P_ID, P_Msg
-              )
-              VALUES
-              (
-                p_PInstance_ID, Cur_InOut.M_InOut_ID,
-                Cur_InOut.M_InOut_ID, Cur_InOut.DocAction || ': ' || Cur_InOut.DocumentNo
-              )
-              ;
-          END IF;
+          
+         
           -- Not Processed + Complete --
           /**
           * Reverse Correction
@@ -490,21 +477,7 @@
             Updated=now(),
             UpdatedBy=v_User
           WHERE M_INOUT.M_INOUT_ID=Cur_InOut.M_INOUT_ID;
-          v_ResultStr:='LogEntry';
-          IF(p_PInstance_ID IS NOT NULL) THEN
-            INSERT
-            INTO AD_PINSTANCE_LOG
-              (
-                AD_PInstance_ID, Log_ID,
-                P_ID, P_Msg
-              )
-              VALUES
-              (
-                p_PInstance_ID, Cur_InOut.M_InOut_ID,
-                Cur_InOut.M_InOut_ID, Cur_InOut.DocAction || ': ' || Cur_InOut.DocumentNo
-              )
-              ;
-          END IF;
+         
           -- Post Reversal
           v_ResultStr:='PostReversal';
           M_INOUT_POST(NULL, v_RInOut_ID) ;
--- a/src-db/database/model/functions/M_PRICELIST_CREATE.xml	Mon May 26 10:59:52 2008 +0000
+++ b/src-db/database/model/functions/M_PRICELIST_CREATE.xml	Mon May 26 11:24:39 2008 +0000
@@ -456,21 +456,6 @@
           WHERE s.T_Selection_ID=M_ProductPrice.M_Product_ID
           )
           ;
-        -- Log Info
-        INSERT
-        INTO AD_PInstance_Log
-          (
-            AD_PInstance_ID, Log_ID,
-            P_ID, P_NUMBER,
-            P_MSG
-          )
-          VALUES
-          (
-            PInstance_ID, v_NextNo,
-            null, Cur_DiscountLine.SeqNo,
-            v_Message
-          )
-          ;
         --
         v_NextNo:=v_NextNo + 1;
         v_Message:='';
--- a/src-db/database/model/functions/TEMPLATE.xml	Mon May 26 10:59:52 2008 +0000
+++ b/src-db/database/model/functions/TEMPLATE.xml	Mon May 26 11:24:39 2008 +0000
@@ -76,23 +76,7 @@
       --  END IF;
     END LOOP; -- Get Parameter
     DBMS_OUTPUT.PUT_LINE('  Record_ID=' || v_Record_ID) ;
-    -- Log info - Log_ID must be unique in instance
-    --  P_Date/P_ID/P_Number/P_Msg are optional.
-    AD_SEQUENCE_NEXT('AD_PInstance_Log', v_Client_ID, v_PInstance_Log_ID);
-    INSERT
-    INTO AD_PInstance_Log
-      (
-        AD_PInstance_ID,
-        Log_ID,
-        P_Msg
-      )
-      VALUES
-      (
-        p_PInstance_ID,
-        v_PInstance_Log_ID,
-         '@Created@'
-      )
-      ;
+   
     -- Summary info rowcount
     rowcount:=SQL%ROWCOUNT;
     DBMS_OUTPUT.PUT_LINE('  Count=' || rowcount);
--- a/src-db/database/model/functions/W_REQUEST_BPARTNER.xml	Mon May 26 10:59:52 2008 +0000
+++ b/src-db/database/model/functions/W_REQUEST_BPARTNER.xml	Mon May 26 11:24:39 2008 +0000
@@ -71,23 +71,7 @@
       v_Client_ID:=Cur_Parameter.AD_CLIENT_ID;
     END LOOP; -- Get Parameter
     DBMS_OUTPUT.PUT_LINE('  Record_ID=' || v_Record_ID) ;
-    -- Log info - Log_ID must be unique in instance
-    --  P_Date/P_ID/P_Number/P_Msg are optional.
-    AD_SEQUENCE_NEXT('AD_PInstance_Log', v_Client_ID, v_PInstance_Log_ID);
-    INSERT
-    INTO AD_PInstance_Log
-      (
-        AD_PInstance_ID,
-        Log_ID,
-        P_Msg
-      )
-      VALUES
-      (
-        p_PInstance_ID,
-        v_PInstance_Log_ID,
-         '@Created@'
-      )
-      ;
+    
     -- Summary info
     v_Message:='@Created@ @Updated@';
     --<<FINISH_PROCESS>>