Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016878Openbravo ERPA. Platformpublic2011-04-23 18:432011-05-23 13:37
rafademiguel 
marvintm 
urgentmajoralways
closedduplicate 
5
3.0RC6 
3.0MP0 
Core
No
0016878: Remove a sales order using DAL doesn't work properly
On a process I use

OBDal.getInstance().remove(order);


RC5 Does work
[EntityDeleteAction[OrderTax#FE059311F74D4D52BC16C391B7E70FDA],
EntityDeleteAction[OrderDiscount#9F074DB50C334D89B71395024BE1505B],
EntityDeleteAction[OrderLineTax#8AFF5F739B664D678089B5C5F9E94267],
EntityDeleteAction[OrderLine#FF8081812F82F2FF012F82F89155000E],
EntityDeleteAction[Order#FF8081812F82F2FF012F82F890AB000D]]

Doesn't crash


RC6 Doesn't work
[EntityDeleteAction[OrderDiscount#67BACF8F841245638787E28B60E1FD67],
EntityDeleteAction[OrderLineTax#22FB69144CB84594A7152FEE49CD94A0],
EntityDeleteAction[OrderLine#FF8081812F81DD34012F82810586000E],
EntityDeleteAction[OrderTax#BAC6E6B381CD42F99F06DF655A12A68A],
EntityDeleteAction[Order#FF8081812F81DD34012F8281049D000D]]

Crash deleting the tax


As you can see what changes is the order deleting the elements so I have try to do this manually.

Create Order with one line complete it, reactivate it and.....

RC5 Deleting Order:
Delete Order Tax OK
Delte Order Discount OK
Delete OrderLineTax OK
Delete Order Line OK
Delte Order OK

Everything fine


RC6 Deleting Order:
Delete Order Discount OK
Delete OrderLineTax OK
Delete Order Line OK
Delete Order Tax DOES NOT EXISTS (Because delete OrderLine has deleted this) AND CRASH
XXXXDelete Order



No tags attached.
duplicate of defect 00171993.0MP0 closed shuehner Error message when trying to delete a header with lines 
zip hbm_files.zip (249,125) 2011-04-26 10:55
https://issues.openbravo.com/file_download.php?file_id=3899&type=bug
Issue History
2011-04-23 18:43rafademiguelNew Issue
2011-04-23 18:43rafademiguelAssigned To => alostale
2011-04-23 18:43rafademiguelModules => Core
2011-04-26 10:47jonalegriaesarteTarget Version => 3.0RC7
2011-04-26 10:55rafademiguelFile Added: hbm_files.zip
2011-04-26 10:57rafademiguelNote Added: 0036084
2011-04-26 16:19dalsasuaIssue Monitored: networkb
2011-04-27 10:24rafademiguelNote Added: 0036115
2011-04-27 10:55rafademiguelNote Edited: 0036115bug_revision_view_page.php?bugnote_id=0036115#r1873
2011-05-02 10:40alostaleStatusnew => scheduled
2011-05-02 10:40alostaleAssigned Toalostale => marvintm
2011-05-02 10:40alostalefix_in_branch => pi
2011-05-05 17:52dmitry_mezentsevNote Added: 0036424
2011-05-05 17:52dmitry_mezentsevTarget Version3.0RC7 => 3.0MP0
2011-05-05 17:52dmitry_mezentsevfix_in_branchpi =>
2011-05-17 09:15iperdomoPriorityhigh => normal
2011-05-17 13:41iperdomoPrioritynormal => urgent
2011-05-23 13:37psarobeRelationship addedduplicate of 0017199
2011-05-23 13:37psarobeStatusscheduled => closed
2011-05-23 13:37psarobeResolutionopen => duplicate

Notes
(0036084)
rafademiguel   
2011-04-26 10:57   
Upload hbm_files.zip. Contains hbm files from RC5 and RC6 from my instance.
(0036115)
rafademiguel   
2011-04-27 10:24   
(edited on: 2011-04-27 10:55)
Workaround already tested: Delete OrderTax before
          
          for (OrderTax ot : salesorder.getOrderTaxList()) {
            OBDal.getInstance().remove(ot);
          }
          OBDal.getInstance().remove(salesorder);

(0036424)
dmitry_mezentsev   
2011-05-05 17:52   
Does not fit RC7, workaround exists.