Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013139Openbravo ERPA. Platformpublic2010-04-27 18:592010-05-18 21:43
networkb 
alostale 
urgentmajoralways
closedfixed 
5
2.50MP14 
2.50MP17pi 
Core
No
0013139: The ad_tab_trg2 is not correct
The ad_trg2_trg is not correct.
This trigger obtain the javapackage from the module defined on the window and not on the tab.
This error is reproducible when the module of the window is different than the module of the tab.
-Create a new module A. Set name, javapackage, prefix, description and set as indevelopment.
-Create a new module B. Set name, javapackage, prefix, description and set as indevelopment.
-Define a new window. Select A in the module field.
-Create a new tab. Select B in the module field.
-Create fields.

-Compile the application and you get an error because the validation on the Model Object.
On the ad_tab_trg2 field the following select is not correct:

   SELECT W.IsActive,
           (CASE WHEN M.AD_MODULE_ID ='0' THEN NULL ELSE JavaPackage END)
    INTO v_IsActive, v_JavaPackage
    FROM AD_WINDOW W, AD_MODULE M
    WHERE AD_WINDOW_ID = :NEW.AD_WINDOW_ID
     AND W.AD_MODULE_ID = M.AD_MODULE_ID;

You should use the module of the tab and not from the window.
No tags attached.
Issue History
2010-04-27 18:59networkbNew Issue
2010-04-27 18:59networkbAssigned To => alostale
2010-04-29 15:32alostaleSummaryThe ad_trg2_trg is not correct => The ad_tab_trg2 is not correct
2010-04-29 15:33alostaleNote Added: 0026797
2010-04-29 15:34hgbotCheckin
2010-04-29 15:34hgbotNote Added: 0026798
2010-04-29 15:34hgbotStatusnew => resolved
2010-04-29 15:34hgbotResolutionopen => fixed
2010-04-29 15:34hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fcb37864f70da8b0315ba8b12f147dc83eacd8bf [^]
2010-05-11 18:19jpabloaeTarget Version2.50MP16 => 2.50MP17
2010-05-13 10:05marvintmNote Added: 0027185
2010-05-13 10:05marvintmStatusresolved => closed
2010-05-13 10:05marvintmFixed in Version => pi
2010-05-14 00:00anonymoussf_bug_id0 => 3001313
2010-05-18 21:43hudsonbotCheckin
2010-05-18 21:43hudsonbotNote Added: 0027456

Notes
(0026797)
alostale   
2010-04-29 15:33   
The problem is not in the trigger, which is working correctly. All the tabs in the same window must have the same package.

The problem is in the validation that is not taken into account tabs in a different module than their window.
(0026798)
hgbot   
2010-04-29 15:34   
Repository: erp/devel/pi
Changeset: fcb37864f70da8b0315ba8b12f147dc83eacd8bf
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Apr 29 15:34:38 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fcb37864f70da8b0315ba8b12f147dc83eacd8bf [^]

fixed bug 13139: Incorrect module checking for tabs

---
M src-wad/src/org/openbravo/wad/validation/WADValidator_data.xsql
M src/org/openbravo/erpCommon/utility/UsedByLink.java
M src/org/openbravo/erpCommon/utility/UsedByLink_data.xsql
---
(0027185)
marvintm   
2010-05-13 10:05   
Followed the steps to reproduce, and the compilation went well, so the problem appears to be fixed.
(0027456)
hudsonbot   
2010-05-18 21:43   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/fcb37864f70d [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/aa11838d5f80 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17380.obx [^]