Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020743Openbravo ERPA. Platformpublic2012-06-13 11:192012-06-27 05:29
sureshbabu 
marvintm 
highmajorrandom
closedfixed 
20Community Appliance
pi 
3.0MP133.0MP13 
Internet Explorer
Openbravo 3.0
Production - Confirmed Stable
2009-02-25
http://code.openbravo.com/erp/devel/pi/rev/4930b9515f5167311d198cc6b06568f6262779e4 [^]
No
0020743: Reference data error appears when i rebuild the system after installing spanish localization pack
Reference data error appears when i rebuild the system after installing spanish localization pack
1) Login in as System Admin role
2) Navigate to module management window
3) In Add modules add, try to add Localization pack spain
4) After adding the module, then try to rebuild the system, by clicking the rebuild link

System throws error message as reference data issue

Note: Please look into the attached image for reference
No tags attached.
related to defect 0007805 closed alostale Unistall a module with ad_process fails 
png Reference data issue while rebuilding the system after installing the Spanish localization pack.png (171,176) 2012-06-13 11:19
https://issues.openbravo.com/file_download.php?file_id=5288&type=bug
png
Issue History
2012-06-13 11:19sureshbabuNew Issue
2012-06-13 11:19sureshbabuAssigned To => alostale
2012-06-13 11:19sureshbabuFile Added: Reference data issue while rebuilding the system after installing the Spanish localization pack.png
2012-06-13 11:19sureshbabuWeb browser => Internet Explorer
2012-06-13 11:19sureshbabuModules => Openbravo 3.0
2012-06-13 11:21sureshbabuNote Added: 0049800
2012-06-14 12:02marvintmAssigned Toalostale => marvintm
2012-06-14 12:04marvintmNote Added: 0049833
2012-06-19 13:25shuehnerWeb browserInternet Explorer => Internet Explorer
2012-06-19 13:25shuehnerRegression level => Production - Confirmed Stable
2012-06-19 13:25shuehnerRegression date => 2009-02-25
2012-06-19 13:25shuehnerRegression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/4930b9515f5167311d198cc6b06568f6262779e4 [^]
2012-06-19 13:25shuehnerTarget Version => 3.0MP13
2012-06-19 15:30alostaleRelationship addedrelated to 0007805
2012-06-22 09:08marvintmNote Added: 0050010
2012-06-22 09:11hgbotCheckin
2012-06-22 09:11hgbotNote Added: 0050012
2012-06-22 09:11hgbotStatusnew => resolved
2012-06-22 09:11hgbotResolutionopen => fixed
2012-06-22 09:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/889f630ff69db889a5acc53f17d0be858ac16e93 [^]
2012-06-25 10:07AugustoMauchNote Added: 0050055
2012-06-25 10:07AugustoMauchStatusresolved => closed
2012-06-25 10:07AugustoMauchFixed in Version => 3.0MP13
2012-06-27 05:29hudsonbotCheckin
2012-06-27 05:29hudsonbotNote Added: 0050157

Notes
(0049800)
sureshbabu   
2012-06-13 11:21   
I am not getting the error always.(Randomly the above issue raises)
(0049833)
marvintm   
2012-06-14 12:04   
The issue can be reproduced by:

- Installing the Spanish Localization Pack.
- Uninstalling it.
- Installing it again. This last rebuild will fail.
(0050010)
marvintm   
2012-06-22 09:08   
There are actually two different errors here:
- There is a foreign key marked as "on delete cascade" in the AD_Ref_data_Loaded table, pointing to the ad_module table. This foreign key is wrong, and is responsible for creating the error in case a module with reference data is installed, uninstalled, and installed back again.

- Also, the process which applies reference data doesn't take into account the ad_ref_data_loaded table when working with data at system level. This is also wrong, because it can lead to errors in case the access level of the table is "System/Client". A separate issue for this was logged here: https://issues.openbravo.com/view.php?id=20822. [^] Note that this second problem is not a regression: DAL never checked for ad_ref_data_loaded in system-level entities.

The first error will be fixed as part of this issue. The second error breaks the process for sampledata in MP10-MP11, but doesn't break it in MP12 and subsequent versions because the ids of the regions were changed.
(0050012)
hgbot   
2012-06-22 09:11   
Repository: erp/devel/pi
Changeset: 889f630ff69db889a5acc53f17d0be858ac16e93
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Jun 22 09:11:05 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/889f630ff69db889a5acc53f17d0be858ac16e93 [^]

Fixed issue 20743. Removed wrong foreign key.
This foreign key basically killed all ad_ref_data_loaded information in case the module which contained the original reference data was uninstalled. If the user then installed the module again, and tried to apply the dataset, the process failed.

---
M src-db/database/model/tables/AD_REF_DATA_LOADED.xml
---
(0050055)
AugustoMauch   
2012-06-25 10:07   
Code reviewed and verified in pi@e62a369d2763
(0050157)
hudsonbot   
2012-06-27 05:29   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/cf3a7135839f [^]

Maturity status: Test