Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036484Openbravo ERP07. Sales managementpublic2017-07-12 12:362017-07-21 08:32
ngarcia 
collazoandy4 
immediatemajoralways
closedfixed 
5
 
3.0PR17Q1.33.0PR17Q1.3 
vmromanos
Core
Production - Confirmed Stable
2016-11-18
3.0PR17Q1
https://code.openbravo.com/erp/devel/pi/rev/7232cc0b37a99b4ed3f897372b1e97bcb2fe84a5#l10.73 [^]
No
0036484: 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 after upgrading to 3.0PR17Q1 as a modulescript set the order as isdelivered

The problem happens when sum(qtyordered) = sum(qtydelivered)
In 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
No tags attached.
blocks defect 0036476 closed collazoandy4 Cannot add some sales order lines to goods shipments after upgrading to 3.0PR17Q1 as a modulescript set the order as isdelivered 
Issue History
2017-07-12 22:19collazoandy4Typedefect => backport
2017-07-12 22:19collazoandy4Target Version => 3.0PR17Q1.3
2017-07-20 16:03vmromanosRegression level => Production - Confirmed Stable
2017-07-20 16:03vmromanosRegression date => 2016-11-18
2017-07-20 16:03vmromanosRegression introduced in release => 3.0PR17Q1
2017-07-20 16:03vmromanosRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/7232cc0b37a99b4ed3f897372b1e97bcb2fe84a5#l10.73 [^]
2017-07-21 08:31hgbotCheckin
2017-07-21 08:31hgbotNote Added: 0098164
2017-07-21 08:31hgbotStatusscheduled => resolved
2017-07-21 08:31hgbotResolutionopen => fixed
2017-07-21 08:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q1.3/rev/a031e45f7316cee810e4c708191b42565fef0117 [^]
2017-07-21 08:32vmromanosReview Assigned To => vmromanos
2017-07-21 08:32vmromanosNote Added: 0098166
2017-07-21 08:32vmromanosStatusresolved => closed
2017-07-21 08:32vmromanosFixed in Version => 3.0PR17Q1.3

Notes
(0098164)
hgbot   
2017-07-21 08:31   
Repository: erp/backports/3.0PR17Q1.3
Changeset: a031e45f7316cee810e4c708191b42565fef0117
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Tue Jul 18 11:06:02 2017 -0400
URL: http://code.openbravo.com/erp/backports/3.0PR17Q1.3/rev/a031e45f7316cee810e4c708191b42565fef0117 [^]

Fixes issue 36484: 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
---
(0098166)
vmromanos   
2017-07-21 08:32   
Code review + testing OK