Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||||||||||||||||
View Issue Details | ||||||||||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||||||||||||||||
0027148 | Openbravo ERP | A. Platform | public | 2014-07-22 11:32 | 2014-08-08 18:53 | |||||||||||||||||||||
Reporter | shuehner | |||||||||||||||||||||||||
Assigned To | alostale | |||||||||||||||||||||||||
Priority | normal | Severity | major | Reproducibility | have not tried | |||||||||||||||||||||
Status | closed | Resolution | fixed | |||||||||||||||||||||||
Platform | OS | 5 | OS Version | |||||||||||||||||||||||
Product Version | ||||||||||||||||||||||||||
Target Version | Fixed in Version | 3.0PR14Q4 | ||||||||||||||||||||||||
Merge Request Status | ||||||||||||||||||||||||||
Review Assigned To | shankarb | |||||||||||||||||||||||||
OBNetwork customer | ||||||||||||||||||||||||||
Web browser | ||||||||||||||||||||||||||
Modules | Core | |||||||||||||||||||||||||
Support ticket | ||||||||||||||||||||||||||
Regression level | ||||||||||||||||||||||||||
Regression date | ||||||||||||||||||||||||||
Regression introduced in release | ||||||||||||||||||||||||||
Regression introduced by commit | ||||||||||||||||||||||||||
Triggers an Emergency Pack | No | |||||||||||||||||||||||||
Summary | 0027148: Module org.openbravo.module.resources cannot be uninstalled | |||||||||||||||||||||||||
Description | At least in some cases that module is uninstallable. This shows itself when having a db with that module used, then deleting the module folder and running update.database. It fails with a fk-violation of an ad_tree entry pointing to a ad_table (obre_resource_category, B47E504D23D549A5A9CD9A9A426D20AF) shipped in that module. As the ad_tree.ad_table-id fk is not defined as onDelete cascade this tree is not deleted and the module uninstall fails (note: only if some ad_tree entries to point to an ad_table of that module, not sure if that always is the case, but observed in at least 1 customer install). However fixing that is not enough as the ad_tree pointing to that table are referenced from ad_clientinfo.AD_TREE_OBRE_RESOURCE_CATEGORY field. Note those entries in ad_tree being referenced are auto-creaed by a modulescript. Talking to vma he said that this field in ad_clientinfo is not used at all in core but only by this module. However it had to be added to core back then for technical reason. Based on that it is find to add onDelete="setnull" to this field. The combination of those 2 changes lets an update.db run suceed without error. | |||||||||||||||||||||||||
Steps To Reproduce | Take pigrape1207 db available from shu Combine it with sources of PR14Q2.4 + RR14Q2.1 run update.database Maybe also reproducible by taking pi + installing that module Then verifying that the auto-created ad_tree entries point to some ad_table in that module and that they are referenced by ad_clientinfo. Having that fullfilled should be enough to trigger the uninstallation problem. | |||||||||||||||||||||||||
Proposed Solution | - Add onDelete="cascade" to fk-definition in ad_tree pointing to ad_table - Add onDelete="setnull" to fk-definition in ad_clientinfo of field AD_TREE_OBRE_RESOURCE_CATEGORY pointin to ad_tree | |||||||||||||||||||||||||
Additional Information | ||||||||||||||||||||||||||
Tags | No tags attached. | |||||||||||||||||||||||||
Relationships |
| |||||||||||||||||||||||||
Attached Files | ||||||||||||||||||||||||||
Issue History | ||||||||||||||||||||||||||
Date Modified | Username | Field | Change | |||||||||||||||||||||||
2014-07-22 11:32 | shuehner | New Issue | ||||||||||||||||||||||||
2014-07-22 11:32 | shuehner | Assigned To | => AugustoMauch | |||||||||||||||||||||||
2014-07-22 11:32 | shuehner | Modules | => Core | |||||||||||||||||||||||
2014-07-22 11:32 | shuehner | Triggers an Emergency Pack | => No | |||||||||||||||||||||||
2014-07-22 11:33 | shuehner | Proposed Solution updated | ||||||||||||||||||||||||
2014-07-22 11:34 | shuehner | Relationship added | related to 0022403 | |||||||||||||||||||||||
2014-07-22 11:35 | shuehner | Relationship added | related to 0025906 | |||||||||||||||||||||||
2014-07-22 11:50 | alostale | Assigned To | AugustoMauch => alostale | |||||||||||||||||||||||
2014-07-22 12:14 | alostale | Note Added: 0068792 | ||||||||||||||||||||||||
2014-07-22 12:30 | alostale | Review Assigned To | => shankarb | |||||||||||||||||||||||
2014-07-22 12:31 | hgbot | Checkin | ||||||||||||||||||||||||
2014-07-22 12:31 | hgbot | Note Added: 0068795 | ||||||||||||||||||||||||
2014-07-22 12:31 | hgbot | Status | new => resolved | |||||||||||||||||||||||
2014-07-22 12:31 | hgbot | Resolution | open => fixed | |||||||||||||||||||||||
2014-07-22 12:31 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/a1bf5514b4218cf4a36c0353ff6e59f0c0e346aa [^] | |||||||||||||||||||||||
2014-07-22 12:39 | alostale | Relationship added | related to 0027152 | |||||||||||||||||||||||
2014-07-31 06:31 | shankarb | Note Added: 0068994 | ||||||||||||||||||||||||
2014-07-31 06:31 | shankarb | Status | resolved => closed | |||||||||||||||||||||||
2014-07-31 06:31 | shankarb | Fixed in Version | => 3.0PR14Q4 | |||||||||||||||||||||||
2014-08-08 18:53 | hudsonbot | Checkin | ||||||||||||||||||||||||
2014-08-08 18:53 | hudsonbot | Note Added: 0069207 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|