details:   https://code.openbravo.com/erp/devel/pi/rev/43a3e127a044
changeset: 31610:43a3e127a044
user:      Luis <luisrs8608 <at> gmail.com>
date:      Mon Mar 06 09:51:37 2017 -0500
summary:   Fixes issue 35302: Updated the node's organization of the product 
category tree.

When you change the organization of a product category, it is not changed from
the node of the product category tree. As consequence, categories are not shown
in webPOS.

To solve this, when the product category's organization is changed, the node's 
organization of the
product category tree is updated too.

diffstat:

 src-db/database/model/triggers/M_PRODUCT_CATEGORY_TRG.xml |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (30 lines):

diff -r ee35e34cd34b -r 43a3e127a044 
src-db/database/model/triggers/M_PRODUCT_CATEGORY_TRG.xml
--- a/src-db/database/model/triggers/M_PRODUCT_CATEGORY_TRG.xml Tue Mar 07 
12:36:31 2017 +0100
+++ b/src-db/database/model/triggers/M_PRODUCT_CATEGORY_TRG.xml Mon Mar 06 
09:51:37 2017 -0500
@@ -17,7 +17,7 @@
     * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
     * All Rights Reserved.
     * Contributor(s): Openbravo SLU
-    * Contributions are Copyright (C) 2001-2012 Openbravo, S.L.U.
+    * Contributions are Copyright (C) 2001-2017 Openbravo, S.L.U.
     *
     * Specifically, this derivative work is based upon the following Compiere
     * file and version.
@@ -108,6 +108,17 @@
   ELSIF (UPDATING) THEN
     UPDATE M_PRODUCT_CATEGORY_ACCT SET AD_ORG_ID = :new.AD_ORG_ID
     WHERE M_PRODUCT_CATEGORY_ID = :new.M_PRODUCT_CATEGORY_ID;
+
+    SELECT c.AD_Tree_Product_Category_ID
+    INTO v_xTree_ID
+    FROM AD_ClientInfo c
+    WHERE c.AD_Client_ID=:new.AD_Client_ID;
+       
+    UPDATE AD_TREENODE
+    SET AD_ORG_ID = :new.AD_ORG_ID
+    WHERE AD_CLIENT_ID=:new.AD_Client_ID
+      AND AD_Tree_ID=v_xTree_ID
+      AND Node_ID=:new.M_Product_Category_ID;
   ELSIF (DELETING) THEN
     --  Delete TreeNode --
     --  get AD_Tree_ID

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to