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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0024905
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2013-10-08 09:352017-04-01 12:06
ReportercaristuView Statuspublic 
Assigned Tomcobas 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q2
StatusclosedFix in branchFixed in SCM revision9c931e5263c1
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarkmm82
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0024905: Sales Order relation is not updated in Shipment header in some cases

DescriptionSales Order relation is not updated in Shipment header in some cases. The problem is also reproducible in purchase flow
Steps To ReproduceCase 1:
1) Create a sales order with at least one line
2) Create a goods shipment header
3) Using the create lines from, insert lines created in step 1) for the shipment
4) Add a new line for the shipment (not linked to any sales order line)
5) Delete the lines created from the order
6) Notice that the Sales Order information has not been cleared in the shipment header

Case 2:
1) Create two sales orders with at least one line each
2) Create a goods shipment header
3) Using the create lines from, insert lines created in step 1)
4) Delete the line associated with one of the orders
5) Complete the goods shipment
6) Notice that the Sales Order information has not been set although all the lines belong to the same order
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0024890 closedjecharri Cannot delete shipments 

-  Notes
(0094580)
markmm82 (developer)
2017-02-23 17:18
edited on: 2017-02-28 15:50

Test Plan

Sales flow
Case 1:
1) Create a sales order with at least one line.
2) Create a goods shipment header.
3) Using the create lines from, insert lines created in step 1 for the shipment.
4) Notice that the Sales Order information has been updated in the shipment header with the previously created order.
5) Add a new line for the shipment (not linked to any sales order line).
6) Notice that the Sales Order information has not been updated in the shipment header.
7) Delete the lines created from the order and complete the shipment.
8) Notice that the Sales Order information has been cleared in the shipment header, and the value is empty.

Case 2:
1) Create two sales orders with at least one line each.
2) Create a goods shipment header.
3) Using the create lines from, insert any of the lines created in step 1.
4) Notice that the Sales Order information has been set in the shipment header with that order.
5) Using the create lines from, insert the other line created in step 1.
6) Notice that the Sales Order information has been cleared in the shipment header.
7) Delete the line associated with one of the orders and complete the shipment.
8) Notice that the Sales Order information has been set in the shipment header with the lefting order.

Case 3:
1) Create three sales orders with at least one line each.
2) Create a goods shipment header.
3) Using the create lines from, insert one line created in step 1.
4) Notice that the Sales Order information has been set in the shipment header.
5) Using the create lines from, insert others lines created in step 1.
6) Notice that the Sales Order information has been cleared in the shipment header.
7) Delete one line associated with the orders.
8) Notice that the Sales Order information has been kept clear in the shipment header.
9) Delete other line associated with the orders and complete the shipment.
10) Notice that the Sales Order information has been set in the shipment header.

Repeat above test cases for the Purchase flow.

(0094662)
hgbot (developer)
2017-02-28 15:51

Repository: erp/devel/pi
Changeset: 9c931e5263c1c2fbd8263bb68176c035907e1b6d
Author: Miguel <martencobasmiguel <at> gmail.com>
Date: Mon Feb 27 13:05:01 2017 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/9c931e5263c1c2fbd8263bb68176c035907e1b6d [^]

Fixes issue 24905: Sales Order relation is not updated in Shipment
header in some cases.

When a line was deleted was not verified if there was other
invoice lines associated to orders distinct than the header's Sales/Purchase
Order field and it was not updated rightly. Also when inserting a line from the
create lines process, there being two or more lines already inserted related to
different orders, the Sales Order field related with the header was updated
with the last one.

To get the sales order field updated correctly depending on the previous cases,
the following logic was added to the CreateFrom_Shipment_data.xsql and M_InOut
function.

Each time a line is inserted, the shipment's order line field will be updated
with NULL if there are not any line created from an order or if there are more
than one line created from different orders. In the case that lines were created
from an unique sales order then it will be fullfilled with it, otherwise it will
be left empty.

When the line is deleted, the logic explained above needs to be checked inside
a trigger, but it is not possible because the table is in a mutant status in
Oracle, due this reason it is not possible to update the shipment's header at
line's deletion time. As solution to this situation, this field is updated when
the shipment is completed.

---
M src-db/database/model/functions/M_INOUT_POST.xml
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql
---
(0094663)
markmm82 (developer)
2017-02-28 15:54

Code review + Testing OK
(0095241)
hudsonbot (developer)
2017-03-15 20:20

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/54e102bef53e [^]
Maturity status: Test
(0095753)
hgbot (developer)
2017-03-31 11:34

Repository: erp/devel/pi
Changeset: 4f040fb8603a46d49bc3ac4533d2418d6147a5e3
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Mar 31 10:34:33 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4f040fb8603a46d49bc3ac4533d2418d6147a5e3 [^]

Related to issue 24905: Code review improvements

Write three queries in just one.
Do just one update with a select sub-query.

---
M src-db/database/model/functions/M_INOUT_POST.xml
---
(0095779)
hudsonbot (developer)
2017-04-01 12:06

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/44185ff76d75 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2013-10-08 09:35 caristu New Issue
2013-10-08 09:35 caristu Assigned To => jecharri
2013-10-08 09:35 caristu Modules => Core
2013-10-08 09:35 caristu Triggers an Emergency Pack => No
2013-10-08 09:35 caristu Relationship added related to 0024890
2013-10-08 09:35 caristu Issue Monitored: networkb
2015-05-13 15:30 jecharri Assigned To jecharri => Triage Finance
2017-02-16 11:18 ngarcia Steps to Reproduce Updated View Revisions
2017-02-16 11:21 ngarcia Steps to Reproduce Updated View Revisions
2017-02-16 11:25 ngarcia Resolution time => 1489014000
2017-02-16 11:25 ngarcia Description Updated View Revisions
2017-02-16 11:25 ngarcia Issue Monitored: ngarcia
2017-02-16 11:26 ngarcia Priority high => urgent
2017-02-16 15:05 markmm82 Assigned To Triage Finance => Sanjota
2017-02-23 17:18 markmm82 Note Added: 0094580
2017-02-28 15:50 markmm82 Note Edited: 0094580 View Revisions
2017-02-28 15:51 hgbot Checkin
2017-02-28 15:51 hgbot Note Added: 0094662
2017-02-28 15:51 hgbot Status new => resolved
2017-02-28 15:51 hgbot Resolution open => fixed
2017-02-28 15:51 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9c931e5263c1c2fbd8263bb68176c035907e1b6d [^]
2017-02-28 15:54 markmm82 Review Assigned To => markmm82
2017-02-28 15:54 markmm82 Note Added: 0094663
2017-02-28 15:54 markmm82 Status resolved => closed
2017-02-28 15:54 markmm82 Fixed in Version => 3.0PR17Q2
2017-03-08 18:08 markmm82 Assigned To Sanjota => mcobas
2017-03-15 20:20 hudsonbot Checkin
2017-03-15 20:20 hudsonbot Note Added: 0095241
2017-03-31 11:34 hgbot Checkin
2017-03-31 11:34 hgbot Note Added: 0095753
2017-04-01 12:06 hudsonbot Checkin
2017-04-01 12:06 hudsonbot Note Added: 0095779


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker