Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014229Openbravo ERP01. General setuppublic2010-08-18 11:202010-09-22 00:00
networkb 
adrianromero 
normalminoralways
closedfixed 
5
 
2.50MP222.50MP22 
OBPS
Core
No
0014229: Delete Parent Organizations
When having the following organization structure:

Entity *, two organization of "organization type" and summary level, and inside of them two being "legal entity".

Being all of them validated, try to delete one parent organization, the application behaves differently depending on the database:

a) If it is oracle, it does not allow you to delete the parent organization and gives you the following error message:

ORA-04091: table TAD_MAIN_FULL.AD_TREENODE is mutating, trigger/function may not see it ORA-06512: at "TAD_MAIN_FULL.AD_ORG_TRG", line 111 ORA-04088: error during execution of trigger 'TAD_MAIN_FULL.AD_ORG_TRG'

b) If it is postgres, it allows you to delete the parent organization, and the child ones are not visible in the organization tree anymore.
Create an organization structure that contains at least one parent organization and inside one child that is legal entity. Validate all organizations. Then choose the parent organization and try to delete it: (From Big Bazaar data, this would be deleting organization "A")

a) Being in an Oracle database, see that is not possible

b) Being in Postgres, see that the organization is deleted, and the child ones are not visible in the tree anymore
No tags attached.
related to defect 0014545 closed harikrishnan int-api 413 fails with a warning 
Issue History
2010-08-18 11:20networkbNew Issue
2010-08-18 11:20networkbAssigned To => adrianromero
2010-08-18 11:20networkbOBNetwork customer => No
2010-08-18 11:39networkbOBNetwork customerNo => Yes
2010-08-26 09:07jonalegriaesarteTarget Version => 2.50MP23
2010-08-26 13:05adrianromeroStatusnew => scheduled
2010-08-26 13:05adrianromerofix_in_branch => pi
2010-09-03 16:53networkbIssue Monitored: emartinez
2010-09-06 10:46jonalegriaesarteTarget Version2.50MP23 => 2.50MP22
2010-09-06 10:46jonalegriaesartefix_in_branchpi =>
2010-09-14 10:02hgbotCheckin
2010-09-14 10:02hgbotNote Added: 0031022
2010-09-14 10:02hgbotStatusscheduled => resolved
2010-09-14 10:02hgbotResolutionopen => fixed
2010-09-14 10:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/97a50a6985e36bed6f3dbe197111877b2a5206e2 [^]
2010-09-14 10:19harikrishnanNote Added: 0031024
2010-09-14 15:33shuehnerRelationship addedrelated to 0014545
2010-09-15 20:55hudsonbotCheckin
2010-09-15 20:55hudsonbotNote Added: 0031115
2010-09-21 11:59psarobeNote Added: 0031265
2010-09-21 11:59psarobeStatusresolved => closed
2010-09-21 11:59psarobeFixed in Version => 2.50MP22
2010-09-22 00:00anonymoussf_bug_id0 => 3072968

Notes
(0031022)
hgbot   
2010-09-14 10:02   
Repository: erp/devel/pi
Changeset: 97a50a6985e36bed6f3dbe197111877b2a5206e2
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Tue Sep 14 13:32:07 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/97a50a6985e36bed6f3dbe197111877b2a5206e2 [^]

Fixes Issue 14229: Delete Parent Organizations

---
M src-db/database/model/tables/AD_TREENODE.xml
M src-db/database/model/triggers/AD_ORG_TRG.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0031024)
harikrishnan   
2010-09-14 10:19   
Steps to Test:

*If the Organization has child organization and if we try to delete the parent organization then error will be thrown other wise this organization can be deleted.
*In the case of Small Bazaar Client Org A cannot be deleted since it has child Org A1 and A2.
*So to delete A first to delete the child Org and then the parent.

Root Cause:

*Before a condition is not checked but this condition is checked added now.

Impact:

*Because of my commit it ll break the API.We need to fix their also.
(0031115)
hudsonbot   
2010-09-15 20:55   
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/97a50a6985e3 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/80bfed94a6e8 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18410.obx [^]
(0031265)
psarobe   
2010-09-21 11:59   
Tested working fine but since the ondelete cascade rule has been remove, which is correct, then is impossible to test the added message