Fixes bug 0008568: Not able to create products when there are more than 3 organizations
authorEduardo Argal Guibert <eduardo.argal@openbravo.com>
Tue, 14 Apr 2009 18:49:31 +0200
changeset 3556 8ff3b6a030cf
parent 3555 c93be69a78a4
child 3557 856286809636
Fixes bug 0008568: Not able to create products when there are more than 3 organizations
src-db/database/model/triggers/C_BPARTNER_TRG.xml
src-db/database/model/triggers/M_PRODUCT_TRG.xml
--- a/src-db/database/model/triggers/C_BPARTNER_TRG.xml	Tue Apr 14 17:50:44 2009 +0200
+++ b/src-db/database/model/triggers/C_BPARTNER_TRG.xml	Tue Apr 14 18:49:31 2009 +0200
@@ -48,7 +48,7 @@
     --  Default Accounts for all AcctSchema
  IF (INSERTING) THEN
      FOR Cur_Defaults IN (
-		SELECT  d1.*
+		SELECT  distinct d1.*
 		FROM  C_BP_Group_Acct d1, ad_Org_AcctSchema a
 		WHERE  d1.C_BP_Group_ID=:new.C_BP_Group_ID
 		AND d1.C_AcctSchema_ID = a.C_AcctSchema_ID
--- a/src-db/database/model/triggers/M_PRODUCT_TRG.xml	Tue Apr 14 17:50:44 2009 +0200
+++ b/src-db/database/model/triggers/M_PRODUCT_TRG.xml	Tue Apr 14 18:49:31 2009 +0200
@@ -68,7 +68,7 @@
  ELSIF (INSERTING) THEN
   -- For all AcctSchema create ...
   FOR Cur_Defaults IN (
-	SELECT  d.*
+	SELECT  distinct d.*
 	FROM  M_Product_Category_Acct d, ad_Org_AcctSchema a
 	WHERE  d.M_Product_Category_ID=:new.M_Product_Category_ID
 	AND d.C_AcctSchema_ID = a.C_AcctSchema_ID