Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012499Openbravo ERPA. Platformpublic2010-03-01 12:042010-03-12 22:40
alostale 
shuehner 
immediatemajoralways
closedfixed 
5
 
2.50MP122.50MP12 
Core
No
0012499: DB error not parsed deleting record with child
When deleting a record with child records, the error message is not parsed in PostrgreSQL.
-Set core in development.
-Go to Application Dictionary || Windows, Tabs, and Fields || Window
-Delete a record

The message is

      
ERROR: update or delete on table "ad_window" violates foreign key constraint "ad_menu_ad_window" on table "ad_menu" Detail: Key (ad_window_id)=(134) is still referenced from table "ad_menu".
No tags attached.
related to defect 0012515 closed shuehner The ErrorTextParser class should get some junit tests to spot regressions like 12499 much faster 
Issue History
2010-03-01 12:04alostaleNew Issue
2010-03-01 12:04alostaleAssigned To => shuehner
2010-03-01 12:11alostaleStatusnew => scheduled
2010-03-01 12:11alostalefix_in_branch => pi
2010-03-01 13:37hgbotCheckin
2010-03-01 13:37hgbotNote Added: 0024903
2010-03-01 13:37hgbotStatusscheduled => resolved
2010-03-01 13:37hgbotResolutionopen => fixed
2010-03-01 13:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e9be931aca0e0328c46de207a3674b32fb3d0b53 [^]
2010-03-01 17:43iperdomoNote Added: 0024917
2010-03-01 17:43iperdomoStatusresolved => closed
2010-03-01 17:43iperdomoFixed in Version => 2.50MP12
2010-03-01 19:04shuehnerRelationship addedrelated to 0012515
2010-03-10 17:25anonymoussf_bug_id0 =>
2010-03-10 18:30anonymoussf_bug_id => 2968116
2010-03-12 22:40hudsonbotCheckin
2010-03-12 22:40hudsonbotNote Added: 0025365

Notes
(0024903)
hgbot   
2010-03-01 13:37   
Repository: erp/devel/pi
Changeset: e9be931aca0e0328c46de207a3674b32fb3d0b53
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Mon Mar 01 13:41:10 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e9be931aca0e0328c46de207a3674b32fb3d0b53 [^]

Fixed 12499: Re-add accidently removed generic error-message

---
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0024917)
iperdomo   
2010-03-01 17:43   
Tested on pi @ rev 8fd835841829

In the log you something like:
ERROR org.openbravo.erpWindows.BusinessPartner.BusinessPartnerData - SQL error in query: DELETE FROM C_BPartner WHERE C_BPartner.C_BPartner_ID = ? AND C_BPartner.AD_Client_ID IN ('1000000') AND C_BPartner.AD_Org_ID IN ('0','1000000','1000002','1000003','1000004','1000005','1000006','1000007','1000008','1000009') Exception:org.postgresql.util.PSQLException: ERROR: update or delete on table "c_bpartner" violates foreign key constraint "ad_user_c_bpartner" on table "ad_user"
  Detail: Key (c_bpartner_id)=(350D99045F4B42988F246D5BBFF869A4) is still referenced from table "ad_user".

And the User message is:
This record cannot be deleted because it is associated with other existing elements. Please see Linked Items
(0025365)
hudsonbot   
2010-03-12 22:40   
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/e9be931aca0e [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]