Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005848Openbravo ERP01. General setuppublic2008-11-06 12:122008-12-15 14:49
rafaroda 
shuehner 
highmajoralways
closedunable to reproduce 
20Ubuntu 7.10
pi 
2.50 
No
Core
No
0005848: Can not delete an organization
Using PostgreSQL, I create a new organization but then I'm unable to delete it.
1) Go to 'General Setup || Enterprise || Organization'
2) Create a new record.
3) Try to delete this new created record.
4) You can not with message: This record cannot be deleted because it is associated with other existing elements. Please see Linked Items
5) Try to see Linked Items: @CODE=0@ERROR: operator does not exist: character varying = integer
multi-org
related to defect 0006890 closed vmromanos Recently created organization can not be deleted 
Issue History
2008-11-06 12:12rafarodaNew Issue
2008-11-06 12:12rafarodaAssigned To => vmromanos
2008-11-06 12:12rafarodasf_bug_id0 => 2229176
2008-11-06 12:12rafarodaOBNetwork customer => No
2008-11-06 12:12rafarodaRegression testing => No
2008-11-06 12:12rafarodaTag Attached: multi-org
2008-11-09 20:29psarobeStatusnew => scheduled
2008-11-09 20:29psarobefix_in_branch => trunk
2008-11-13 17:19vmromanosNote Added: 0010254
2008-11-13 17:20vmromanosAssigned Tovmromanos => rafaroda
2008-11-13 17:20vmromanosStatusscheduled => feedback
2008-11-20 10:40rafarodaStatusfeedback => scheduled
2008-11-20 10:40rafarodaAssigned Torafaroda => alostale
2008-12-10 09:48alostaleAssigned Toalostale => shuehner
2008-12-15 14:45shuehnerNote Added: 0011368
2008-12-15 14:49shuehnerStatusscheduled => closed
2008-12-15 14:49shuehnerNote Added: 0011369
2008-12-15 14:49shuehnerResolutionopen => unable to reproduce
2009-01-21 11:00vmromanosRelationship addedrelated to 0006890

Notes
(0010254)
vmromanos   
2008-11-13 17:19   
I think this bug is not related with the multiorg project. Currently (version 2.40), the application does not allow the user to delete an organization because of a foreign key constraint ("ad_org_ad_orginfo") on the "AD_OrgInfo" table.

On the other hand, the "@CODE=0@ERROR: operator does not exist: character varying = integer" error is related to a SQL sentence which is executed by the org.openbravo.erpCommon.utility.UsedByLinkData class:
12:58:20 [ajp-8009-15] ERROR org.openbravo.erpCommon.utility.UsedByLinkData - SQL error in query: SELECT COUNT(*) AS ID FROM M_RequisitionLine WHERE AD_Org_ID = ? AND EXISTS (SELECT 1 FROM M_Requisition WHERE M_Requisition.M_Requisition_ID = M_RequisitionLine.M_Requisition_ID AND M_Requisition.Ad_User_ID = 100) AND AD_ORG_ID NOT IN ('0','1000000','1000002','1000003','1000004','1000005','1000006','1000008','1000009','1000007','68FE30EBEE36477D9E8D632B22FCB4E3')Exception:org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
12:58:20 [ajp-8009-15] ERROR org.openbravo.erpCommon.utility.UsedByLink - Error captured: javax.servlet.ServletException: @CODE=0@ERROR: operator does not exist: character varying = integer


So, from my point of view, we should remove the multiorg tag and reassign this bug to the responsible of the 'Linked Items' issue.
(0011368)
shuehner   
2008-12-15 14:45   
The Linked Items problems it not reproducible anymore in current trunk (r11204)
(0011369)
shuehner   
2008-12-15 14:49   
The Linked Items issue is not reproducible anymore. The other topic is not a bug as it is the same behavior as present in 2.40 .