details:   https://code.openbravo.com/erp/devel/pi/rev/ae110fab1bff
changeset: 30501:ae110fab1bff
user:      Inigo Sanchez <inigo.sanchez <at> openbravo.com>
date:      Wed Oct 19 15:41:26 2016 +0200
summary:   Fixed issue 34180: A missing code in AD_LANGUAGE_CREATE function.

The problem was the missing code in AD_LANGUAGE_CREATE function
related with M_Offer_Type table. A translation problem in
"Discounts and Promotions Types" is caused by this missing code.

The problem has resolved by adding the missing code related with
M_Offer_Type. Now M_Offer_Type is managed properly in
AD_LANGUAGE_CREATE function.

diffstat:

 src-db/database/model/functions/AD_LANGUAGE_CREATE.xml |  22 ++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diffs (32 lines):

diff -r 043f858edd91 -r ae110fab1bff 
src-db/database/model/functions/AD_LANGUAGE_CREATE.xml
--- a/src-db/database/model/functions/AD_LANGUAGE_CREATE.xml    Thu Oct 20 
11:31:00 2016 +0200
+++ b/src-db/database/model/functions/AD_LANGUAGE_CREATE.xml    Wed Oct 19 
15:41:26 2016 +0200
@@ -590,6 +590,28 @@
     v_Created:=v_Created + v_rowcount;
     DBMS_OUTPUT.PUT_LINE('- AD_TextInterfaces ' || v_rowcount) ;
 
+    -- Offer_Type
+    INSERT
+    INTO M_Offer_Type_Trl
+      (
+        M_Offer_Type_Trl_ID, M_Offer_Type_ID, AD_Language, Name, IsTranslated,
+        Createdby, UpdatedBy, Created, Updated,
+        AD_Client_ID, AD_Org_ID, IsActive
+      )
+    SELECT get_uuid(), M_Offer_Type_ID, AD_Language.AD_Language, 
M_Offer_Type.name, 'N', '0', '0', now(), now(), M_Offer_Type.AD_Client_ID, 
M_Offer_Type.AD_Org_ID, 'Y'
+    FROM M_Offer_Type, AD_Language, AD_module m
+    WHERE AD_Language.IsActive='Y'  
+    AND AD_Language.IsSystemLanguage='Y'  
+    and m.ad_module_id = M_Offer_Type.AD_MODULE_ID
+    and m.ad_language != AD_Language.AD_Language
+    AND NOT EXISTS (SELECT 1 FROM M_Offer_Type_Trl
+                 WHERE M_Offer_Type_ID = M_Offer_Type.M_Offer_Type_ID
+                   AND AD_LANGUAGE = AD_Language.AD_Language); 
+
+    v_rowcount:=SQL%ROWCOUNT;
+    v_Created:=v_Created + v_rowcount;
+    DBMS_OUTPUT.PUT_LINE('- M_Offer_Type ' || v_rowcount) ;
+    
     -- Call extension points
     SELECT count(*) INTO v_count
     FROM DUAL

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to