Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0006890Openbravo ERP01. General setuppublic2009-01-14 17:432009-03-02 07:30
plujan 
vmromanos 
normalmajorhave not tried
closedfixed 
30
2.50alpha-r6 
2.50beta 
Core
No
0006890: Recently created organization can not be deleted
I create an organization. Doing nothing else, I try to delete it. I can not because of linked items. I move to linked items and delete all of them, but I still can not delete the organization.
1. Go General Setup > Enterprise > Organization
2. Create a new Organization by filling all mandatory fields
3. Delete the org. It can not be deleted because of linked items.
4. Open linked items window and navigate to all of the related records, deleting them all.
5. With no linked items remaining, try to delete the org again. It is still not possible because of linked items. See attach
QA_review_pre_beta
related to defect 00058482.50 closed shuehner Can not delete an organization 
png BUG_250-a-r6-LinkedItemsOrganization.PNG (99,154) 2009-01-14 17:43
https://issues.openbravo.com/file_download.php?file_id=640&type=bug
png
Issue History
2009-01-14 17:43plujanNew Issue
2009-01-14 17:43plujanAssigned To => rafaroda
2009-01-14 17:43plujansf_bug_id0 => 2507361
2009-01-14 17:43plujanFile Added: BUG_250-a-r6-LinkedItemsOrganization.PNG
2009-01-14 17:43plujanRegression testing => No
2009-01-14 17:44plujanTag Attached: QA_review_pre_beta
2009-01-19 11:00psarobeStatusnew => scheduled
2009-01-19 11:00psarobeAssigned Torafaroda => vmromanos
2009-01-19 11:00psarobefix_in_branch => trunk
2009-01-20 18:56eduardo_ArgalNote Added: 0012412
2009-01-21 11:00vmromanosRelationship addedrelated to 0005848
2009-01-22 12:23svnbotCheckin
2009-01-22 12:23svnbotNote Added: 0012519
2009-01-22 12:23svnbotStatusscheduled => resolved
2009-01-22 12:23svnbotResolutionopen => fixed
2009-01-22 12:23svnbotsvn_revision => 12147
2009-02-19 12:43sureshbabuStatusresolved => new
2009-02-19 12:43sureshbabuResolutionfixed => open
2009-02-19 12:43sureshbabuNote Added: 0013727
2009-02-19 13:34vmromanosNote Added: 0013738
2009-02-20 11:21svnbotCheckin
2009-02-20 11:21svnbotNote Added: 0013813
2009-02-20 11:21svnbotStatusnew => resolved
2009-02-20 11:21svnbotResolutionopen => fixed
2009-02-20 11:21svnbotsvn_revision12147 => 13447
2009-03-02 07:30sureshbabuStatusresolved => closed
2009-03-02 07:30sureshbabuNote Added: 0014189
2009-03-02 07:30sureshbabuFixed in Version => trunk

Notes
(0012412)
eduardo_Argal   
2009-01-20 18:56   
I think it is because of ad_treenode records. ad_org_trg is trying to delete ad_treenode record but as that trg fires after the delete sentence fails first.
we should build a delete on cascade constraint for ad_org and ad_treenode
(0012519)
svnbot   
2009-01-22 12:23   
Repository: openbravo
Revision: 12147
Author: vmromanos
Date: 2009-01-22 12:23:00 +0100 (Thu, 22 Jan 2009)

Fixed bug 6890: Recently created organization can not be deleted.
It is now not necessary to manually delete the organization info and the role org access before deleting the organization.
The organization can only be deleted if it has no records associated (like for example an invoice).

---
U trunk/src-db/database/model/tables/AD_ORGINFO.xml
U trunk/src-db/database/model/tables/AD_ROLE_ORGACCESS.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=12147&sc=1 [^]
(0013727)
sureshbabu   
2009-02-19 12:43   
Retested in Context 79.125.56.185/openbravotrunk, still not able to delete the newly created organization after deleting all the link items manually.
(0013738)
vmromanos   
2009-02-19 13:34   
This bug only happens using PostgreSQL. In Oracle it is working fine.
(0013813)
svnbot   
2009-02-20 11:21   
Repository: openbravo
Revision: 13447
Author: vmromanos
Date: 2009-02-20 11:21:28 +0100 (Fri, 20 Feb 2009)

Fixed bug 6890: Recently created organization can not be deleted. Now it also works on PostgreSQL

---
U trunk/src-db/database/model/tables/AD_TREENODE.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=13447&sc=1 [^]
(0014189)
sureshbabu   
2009-03-02 07:30   
Retested in context 79.125.56.185/openbravotrunk