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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036476
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2017-07-12 12:362017-09-21 16:49
ReporterngarciaView Statuspublic 
Assigned Tocollazoandy4 
PriorityimmediateResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revision570ce3b92b69
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tovmromanos
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2016-11-18
Regression introduced in release3.0PR17Q1
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/7232cc0b37a99b4ed3f897372b1e97bcb2fe84a5#l10.73 [^]
Triggers an Emergency PackNo
Summary

0036476: Cannot add some sales order lines to goods shipments after upgrading to 3.0PR17Q1 as a modulescript set the order as isdelivered

DescriptionCannot add some sales order lines to goods shipments after upgrading to 3.0PR17Q1 as a modulescript set the order as isdelivered

The problem happens when sum(qtyordered) = sum(qtydelivered)
Steps To ReproduceIn a version previous to 3.0PR17Q1:
   As group admin role:
      Create a sales order
      Add -2 units of a product
      Add 2 units of another product
      Complete it
      Create a Goods Shipment header and check you can select the order in Create Lines From
      Do not select it

   As system admin role:
      Upgrade the instance to 3.0PR17Q1 (or later)
   
   As group admin role:
      Go to Goods Shipment header and check you cannot select the order in Create Lines From
TagsNo tags attached.
Attached Files? file icon affected_orders.sql [^] (477 bytes) 2017-07-21 08:48
? file icon fix_query.sql [^] (478 bytes) 2017-07-21 08:48

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00364823.0PR17Q3 closedcollazoandy4 Cannot add some sales order lines to goods shipments after upgrading to 3.0PR17Q1 as a modulescript set the order as isdelivered 
depends on backport 00364833.0PR17Q2.2 closedcollazoandy4 Cannot add some sales order lines to goods shipments after upgrading to 3.0PR17Q1 as a modulescript set the order as isdelivered 
depends on backport 00364843.0PR17Q1.3 closedcollazoandy4 Cannot add some sales order lines to goods shipments after upgrading to 3.0PR17Q1 as a modulescript set the order as isdelivered 
caused by design defect 00346123.0PR17Q1 closedvmromanos Performance problem in Return To Vendor Shipment 

-  Notes
(0098065)
collazoandy4 (reporter)
2017-07-13 16:23
edited on: 2017-07-14 23:46

Test Plan
 In a version previous to 3.0PR17Q1:
   As group admin role:
      Go to Sales Order window and create a new record for bp Alimentos y Supermercados, S.A:
        Add -2 units of Cerveza Ale 0,5L product
        Add 2 units of Cerveza Lager 0,5L product
        Complete it
      Create a Goods Shipment header and check you can select the previous order created (1000189) in Create Lines From
        Do not select it
      Go to Sales Order window and create a new record for bp Alimentos y Supermercados, S.A:
        Add 5 units of Vino Blanco 0,75L product
        Add -5 units of Vino Rosado 0,75L product
        Add 2 units of Vino Tinto 0,75L product
        Complete it
      Go to Goods Shipment window and select the previous one created and select the previous order created (1000190) in Create Lines From and select all order lines
        Edit the lines to 3 units of Vino Blanco 0,75L, -3 units of Vino Rosado 0,75L products and complete the shipment
      Go to Sales Order window and select previous order (1000190) and check:
        Product: Vino Blanco 0,75L, Ordered Quantity: 5 Delivered Quantity: 3
        Product: Vino Rosado 0,75L, Ordered Quantity: -5 Delivered Quantity: -3
        Product: Vino Tinto 0,75L, Ordered Quantity: 2 Delivered Quantity: 2
        Product: Descuento 10%, Ordered Quantity: 1 Delivered Quantity: 1
      Create a Goods Shipment header and check you can select the previous order created (1000190) in Create Lines From
        Do not select it
      Go to Sales Order window and create a new record for bp Alimentos y Supermercados, S.A:
        Add 5 units of Cerveza Ale 0,5L product
        Add -4 units of Cerveza Lager 0,5L product
        Remove the record in Basic discount tab and Complete it
        Check no discount line was added to Lines tab
      Go to Goods Shipment and check you can select the previous order created (1000191) in Create Lines From
        Do not select it
      Go to Sales Order window and create a new record for bp Alimentos y Supermercados, S.A:
        Add 8 units of Vino Blanco 0,75L product
        Add -6 units of Vino Rosado 0,75L product
        Add 3 units of Vino Tinto 0,75L product
        Remove the record in Basic discount and Complete it
      Go to Goods Shipment window and select the previous one created and select the previous order created (1000192) in Create Lines From and select all order lines
        Edit the lines to 5 units of Vino Blanco 0,75L, 1 Vino Tinto 0,75L products and complete the shipment
      Go to Sales Order window and select previous order (1000192) and check:
        Product: Vino Blanco 0,75L, Ordered Quantity: 8 Delivered Quantity: 5
        Product: Vino Rosado 0,75L, Ordered Quantity: -6 Delivered Quantity: -6
        Product: Vino Tinto 0,75L, Ordered Quantity: 3 Delivered Quantity: 1
      Create a Goods Shipment header and check you can select the previous order created (1000192) in Create Lines From
        Do not select it
   As system admin role:
      Upgrade the instance to 3.0PR17Q1 (or later)
   As group admin role:
      Go to Goods Shipment header and check you can select the orders 1000189, 1000190, 1000191, and 1000192 in Create Lines From
        Select the order 1000189 and Complete the Shipment
      Go to Sales Order and check the Sales Order is with Delivery Status: 100% and Delivered: Yes
      Void the last shipment and check the order change the Delivery Status: 0%, Delivered: No and you can select it in Create Lines From process in the shipment window

(0098163)
hgbot (developer)
2017-07-21 08:31

Repository: erp/devel/pi
Changeset: 570ce3b92b6965c01400aa95c687deb71d872bae
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Tue Jul 18 11:06:02 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/570ce3b92b6965c01400aa95c687deb71d872bae [^]

Fixes issue 36476: Cannot add some sales order lines to goods shipments after
upgrading to 3.0PR17Q1 as a modulescript set the order as isdelivered

Cannot add some sales order lines to goods shipments because the modulescript
set the order as isdelivered when the order contains lines with negative qtyordered
and the sum(qtyordered) = sum(qtydelivered)

Now the update only happend when the order don't have a line where
QTYORDERED <> QTYDELIVERED.

Because the NOT EXISTS change the check to issotrx field now is made in the main
query because a wrong evaluation in the subquery happends when issotrx = 'N' and
NOT EXISTS

---
M src-db/database/model/functions/M_INOUT_POST.xml
M src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateQtyDeliveredData.class
M src-util/modulescript/src/org/openbravo/modulescript/UpdateQtyDelivered_data.xsql
---
(0098170)
vmromanos (manager)
2017-07-21 08:34

Code review + testing OK
(0099282)
hudsonbot (developer)
2017-09-21 16:49

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

- Issue History
Date Modified Username Field Change
2017-07-12 12:36 ngarcia New Issue
2017-07-12 12:36 ngarcia Assigned To => Triage Finance
2017-07-12 12:36 ngarcia Modules => Core
2017-07-12 12:36 ngarcia Resolution time => 1501624800
2017-07-12 12:36 ngarcia Triggers an Emergency Pack => No
2017-07-12 12:37 ngarcia Relationship added caused by 0034612
2017-07-12 12:38 ngarcia Issue Monitored: networkb
2017-07-12 12:38 ngarcia Summary Cannot add sales order lines to goods shipments after upgrading to 3.0PR17Q1 as a modulescript set the order as isdelivered => Cannot add some sales order lines to goods shipments after upgrading to 3.0PR17Q1 as a modulescript set the order as isdelivered
2017-07-12 12:38 ngarcia Description Updated View Revisions
2017-07-12 13:24 vmromanos Assigned To Triage Finance => collazoandy4
2017-07-12 16:25 collazoandy4 Status new => scheduled
2017-07-12 22:16 collazoandy4 Status scheduled => acknowledged
2017-07-12 22:19 collazoandy4 Status acknowledged => scheduled
2017-07-13 16:23 collazoandy4 Note Added: 0098065
2017-07-14 23:46 collazoandy4 Note Edited: 0098065 View Revisions
2017-07-20 16:01 vmromanos Regression level => Production - Confirmed Stable
2017-07-20 16:01 vmromanos Regression date => 2016-11-18
2017-07-20 16:01 vmromanos Regression introduced in release => 3.0PR17Q1
2017-07-20 16:01 vmromanos Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/7232cc0b37a99b4ed3f897372b1e97bcb2fe84a5#l10.73 [^]
2017-07-21 08:31 hgbot Checkin
2017-07-21 08:31 hgbot Note Added: 0098163
2017-07-21 08:31 hgbot Status scheduled => resolved
2017-07-21 08:31 hgbot Resolution open => fixed
2017-07-21 08:31 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/570ce3b92b6965c01400aa95c687deb71d872bae [^]
2017-07-21 08:34 vmromanos Review Assigned To => vmromanos
2017-07-21 08:34 vmromanos Note Added: 0098170
2017-07-21 08:34 vmromanos Status resolved => closed
2017-07-21 08:34 vmromanos Fixed in Version => 3.0PR17Q4
2017-07-21 08:48 vmromanos File Added: affected_orders.sql
2017-07-21 08:48 vmromanos File Added: fix_query.sql
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099282


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker