Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0017199
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2011-05-17 13:022011-05-31 10:02
ReporterrgorisView Statuspublic 
Assigned Toshuehner 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionbe3c8b49c119
ProjectionnoneETAnoneTarget Version3.0MP0
OSAnyDatabasePostgreSQLJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0017199: Error message when trying to delete a header with lines

DescriptionYou are supposed to be able to delete a header when it has lines (especially when it is draft without dependencies). Today this does not work.
Steps To ReproduceCreate header sales order
Create a line
Back to header
Click delete button
Error appear

Only on Postgresql!
TagsNo tags attached.
Attached Filespng file icon post.PNG [^] (99,049 bytes) 2011-05-17 13:02

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0003310 closedrgoris Document cascade deletion. 
related to feature request 0000365 acknowledgedrgoris AT240alpha - Linked Items have not enough info about cascade deletion 
related to defect 00169343.0MP0 closedalostale Extend delete-record warning message in case of children 
has duplicate defect 00172703.0RC7 closedmtaal You cannot delete a sales order (happens across the ERP) when it has lines 
has duplicate defect 00168783.0MP0 closedmarvintm Remove a sales order using DAL doesn't work properly 

-  Notes
(0037672)
shuehner (administrator)
2011-05-27 16:33

Some extra info after short debugging:

hibernate seems to cascade into child-records for the deletion in the following sequence
select children from table a (if exists)
select children from table b (if exists)
...

delete from table a
delete from table b
...

Problem is now if a trigger for table a already remove the related entry in table b -> the second delete fails and hibernate doesn'T recheck if the records to be deleted still exist

From pgsql-log in this case:

delete from C_OrderLine where C_OrderLine_ID=$1
delete from C_OrderTax where C_OrderTax_ID=$1
ROLLBACK

Checking the trigger C_ORDERLINETAX_TRG.xml it seems to delete c_ordertax entries on delete in some cases
(0037720)
shuehner (administrator)
2011-05-30 13:10

Windows affected (at least): sales order, purchase order, sales invoice, purchase invoice
(0037746)
hgbot (developer)
2011-05-30 17:02

Repository: erp/devel/pi
Changeset: be3c8b49c1194d896deffba3f2428e9a8f38e74d
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Mon May 30 17:00:15 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/be3c8b49c1194d896deffba3f2428e9a8f38e74d [^]

Fixed 17199: Fixed deletions of orders & invoices
Work around interaction between hibernate cascading delets and triggers attached
to c_order & c_invoice subtables.
Added interceptor of onDelete requests for c_order & c_invoice tables which does
excplicitely first issue deletes of c_ordertax or c_invoicetax (for this _id).

---
A modules/org.openbravo.client.application/src/org/openbravo/client/application/event/ReorderCascadingChildDeletionsHandler.java
---
(0037803)
hudsonbot (developer)
2011-05-31 09:45

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ea275e03a164 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2011-05-17 13:02 rgoris New Issue
2011-05-17 13:02 rgoris Assigned To => alostale
2011-05-17 13:02 rgoris File Added: post.PNG
2011-05-17 13:02 rgoris Modules => Core
2011-05-17 13:03 rgoris Relationship added related to 0003310
2011-05-17 13:03 rgoris Relationship added related to 0000365
2011-05-17 13:04 rgoris Relationship added related to 0016934
2011-05-19 14:15 alostale Priority high => immediate
2011-05-19 14:15 alostale Assigned To alostale => mtaal
2011-05-19 14:17 alostale Status new => scheduled
2011-05-19 14:17 alostale fix_in_branch => pi
2011-05-19 16:03 dmitry_mezentsev Relationship added has duplicate 0017270
2011-05-23 13:37 psarobe Relationship added has duplicate 0016878
2011-05-25 12:56 dmitry_mezentsev Priority immediate => urgent
2011-05-25 12:56 dmitry_mezentsev fix_in_branch pi =>
2011-05-27 16:33 shuehner Note Added: 0037672
2011-05-30 12:26 iperdomo Assigned To mtaal => shuehner
2011-05-30 13:10 shuehner Note Added: 0037720
2011-05-30 17:02 hgbot Checkin
2011-05-30 17:02 hgbot Note Added: 0037746
2011-05-30 17:02 hgbot Status scheduled => resolved
2011-05-30 17:02 hgbot Resolution open => fixed
2011-05-30 17:02 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/be3c8b49c1194d896deffba3f2428e9a8f38e74d [^]
2011-05-31 09:45 hudsonbot Checkin
2011-05-31 09:45 hudsonbot Note Added: 0037803
2011-05-31 10:02 rgoris Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker