Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020822Openbravo ERPA. Platformpublic2012-06-21 09:512012-09-03 13:28
ioritzCia 
marvintm 
normalminoralways
closedfixed 
20Ubuntu 10.04
 
3.0MP153.0MP15 
AugustoMauch
Google Chrome, Mozilla Firefox
Core
No
0020822: Dataset applying process leads to an error situation.
System/client access level entity dataset can lead to an erroneous situation concerning dataset application.
- Take a system/client access level entity dataset as regions and import it into client A. Information is inserted in ad_ref_data_loaded with generic_id = specific_id for regions.
- Take this dataset and now apply it to system level. Information is inserted in ad_ref_data_loaded with generic_id and specific_id=new_uuid.
- Now apply a client access level entity dataset which entity depends on the previous system/client access level entity for client A. For example taxes, that depend on regions. It works fine because there are regions for this client with generic_ids.
- After that, log in with client B and try to apply this second dependant dataset. This should work as the regions dataset has been applied to system level. It does not due to the dataset applying procedure.
   - This procedure will try to look into ad_ref_dataloaded but in his client and it will not find them.
   - Then, it will look for the generic_id into system access level data it will not find them and it will not try to look into ad_ref_data_loaded with system access level where it would find them.
- As it hasn't been able to find the regions which are referenced by the taxes, the process will fail.
No tags attached.
diff fixresolver.diff (1,233) 2012-07-04 16:01
https://issues.openbravo.com/file_download.php?file_id=5351&type=bug
Issue History
2012-06-21 09:51ioritzCiaNew Issue
2012-06-21 09:51ioritzCiaAssigned To => alostale
2012-06-21 09:51ioritzCiaWeb browser => Google Chrome, Mozilla Firefox
2012-06-21 09:51ioritzCiaModules => Core
2012-06-21 09:57marvintmWeb browserGoogle Chrome, Mozilla Firefox => Google Chrome, Mozilla Firefox
2012-06-21 09:57marvintmSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3562#r3562
2012-07-04 14:33shuehnerIssue Monitored: shuehner
2012-07-04 14:34shuehnerWeb browserGoogle Chrome, Mozilla Firefox => Google Chrome, Mozilla Firefox
2012-07-04 14:34shuehnerNote Added: 0050349
2012-07-04 14:34shuehnerTarget Version => 3.0MP14
2012-07-04 16:01marvintmFile Added: fixresolver.diff
2012-07-04 16:02marvintmNote Added: 0050350
2012-08-01 12:48marvintmWeb browserGoogle Chrome, Mozilla Firefox => Google Chrome, Mozilla Firefox
2012-08-01 12:48marvintmTarget Version3.0MP14 => 3.0MP15
2012-08-20 17:25marvintmAssigned Toalostale => marvintm
2012-08-20 17:37hgbotCheckin
2012-08-20 17:37hgbotNote Added: 0051398
2012-08-20 17:37hgbotStatusnew => resolved
2012-08-20 17:37hgbotResolutionopen => fixed
2012-08-20 17:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/57f229938edf25aad9d55473eb116550d10c7c65 [^]
2012-09-03 13:28AugustoMauchClosed by => AugustoMauch
2012-09-03 13:28AugustoMauchNote Added: 0051769
2012-09-03 13:28AugustoMauchStatusresolved => closed
2012-09-03 13:28AugustoMauchFixed in Version => 3.0MP15

Notes
(0050349)
shuehner   
2012-07-04 14:34   
Adding target version MP14 as after discussion with AMO+DME should be done as soon as possible.
(0050350)
marvintm   
2012-07-04 16:02   
I've added a diff which contains a fix for this issue. It needs to be reviewed to verify that it is correct in all cases.
(0051398)
hgbot   
2012-08-20 17:37   
Repository: erp/devel/pi
Changeset: 57f229938edf25aad9d55473eb116550d10c7c65
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Aug 20 17:35:10 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/57f229938edf25aad9d55473eb116550d10c7c65 [^]

Fixed issue 20822. Changed slightly how reference data is applied.
- Before, for System/Client tables, it was assumed that the 'system' part should be searched just by id. This is unfortunately wrong, as it could happen that data in the same table could be loaded as 'client', and after that, as 'system'. In this situation, the data loaded as system would have different ids.
- The fix basically consists in searching the data at system level using the AD_Ref_Data_Loaded information. Retrieving the records this way will ensure that the correct ids are used, and that data at System/Client tables is correctly found.

---
M src/org/openbravo/dal/xml/EntityResolver.java
---
(0051769)
AugustoMauch   
2012-09-03 13:28   
Code reviewed and verified in pi@288baadd3b3c