Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041328Openbravo ERP07. Sales managementpublic2019-07-08 12:022019-07-11 20:18
inaki_garcia 
collazoandy4 
immediatemajoralways
closedfixed 
5
pi 
3.0PR19Q2.13.0PR19Q2.1 
Sandrahuguet
Core
Automated tests
2019-07-03
https://code.openbravo.com/erp/devel/pi/rev/f831b0b71a5ec700751e645c9e6980001acd8c7b [^]
No
0041328: [AUoM] Operative Quantity isn't correctly calculated when Creating Lines in Purchase Invoice from a Return To Vendor order
When creating lines from a Return To Vendor order in the Purchase Invoice window, those that make use of Alternate Unit of Measure don't have their Operative Quantity
correctly calculated, in accordance to the Conversion Rate of the alternate unit as the assertion of the AUMRTVc010InvoiceAReturnToVendorShipment test expects it.

This issue has arised from thanks to qa-pi-aum jobs executing under the QA tab of CI, and with the mentioned test. More details of one of the latest execution showing the
issue can be found in the following link:
https://ci.openbravo.com/view/qa/job/qa-pi-aum-pgsql/485/ [^]
As group admin role:
   Set 'Enable UOM Management' preference to Y
   Log out and log in
   Add Liter unit to 'Cerveza Ale 0,5L' in Alternate UOM tab as Primary UOM
   Add a conversion of 2
   Create a Goods Receipt
   Add 10 Liters of 'Cerveza Ale 0,5L':
      Operative Quantity: 10
      Alternative UOM: Liter
      Ordered Quantity: 20
      Storage Bin: O01
      UOM: Unit
   Book it
   Go to Return To Vendor
   Open the Pick/Edit Lines popup to select the lines of the previously created Goods Receipt
   Check the quantities and other fields are shown as in the order line in the pop-up
   Set the "returned" field to 3, "returned UOM" to "Liter" and "return reason" to "Defective"
   Check the Alternative UOM is updated with Unit in the Return To Vendor line:
      Movement Quantity: 6
   Book it
   Go to Return to Vendor Shipment, and use the Pick/Edit Lines popup to create the lines from the Goods Receipt, and book it
   Go to Purchase Invoice window, and create a new record by importing the lines with the Return To Vendor.
   NOTICE that the Operative Quantity shows as "-3" when the value expected by the test is "-6"
   
No tags attached.
blocks defect 0041315 closed collazoandy4 [AUoM] Operative Quantity isn't correctly calculated when Creating Lines in Purchase Invoice from a Return To Vendor order 
Issue History
2019-07-10 08:54SandrahuguetTypedefect => backport
2019-07-10 08:54SandrahuguetTarget Version => 3.0PR19Q2.1
2019-07-11 20:17hgbotCheckin
2019-07-11 20:17hgbotNote Added: 0113309
2019-07-11 20:17hgbotStatusscheduled => resolved
2019-07-11 20:17hgbotResolutionopen => fixed
2019-07-11 20:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR19Q2.1/rev/cd2377490bd0c4905263271c0075e8f3c258b222 [^]
2019-07-11 20:17hgbotCheckin
2019-07-11 20:17hgbotNote Added: 0113310
2019-07-11 20:18SandrahuguetReview Assigned To => Sandrahuguet
2019-07-11 20:18SandrahuguetNote Added: 0113313
2019-07-11 20:18SandrahuguetStatusresolved => closed
2019-07-11 20:18SandrahuguetFixed in Version => 3.0PR19Q2.1

Notes
(0113309)
hgbot   
2019-07-11 20:17   
Repository: erp/backports/3.0PR19Q2.1
Changeset: cd2377490bd0c4905263271c0075e8f3c258b222
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Thu Jul 11 10:53:26 2019 -0400
URL: http://code.openbravo.com/erp/backports/3.0PR19Q2.1/rev/cd2377490bd0c4905263271c0075e8f3c258b222 [^]

Fixes issue 41328: [AUoM] Operative Quantity isn't correctly calculated when
Creating Lines in Purchase Invoice from a Return To Vendor order

A wrong operative UOM was used to create the new invoiceline if the orderline is
related to a shipment, the quantity is calculated in the P&E and the UOM from the copied
line.

Now when a line is created from an orderline and is related to a not invoiced shipmentline
this shipmentline is used to create the new invoiceline, in case the orderline is a return
the return to vendor shipment line is used to create a new invoiceline

---
M src/org/openbravo/common/actionhandler/createlinesfromprocess/CreateLinesFromUtil.java
M src/org/openbravo/common/actionhandler/createlinesfromprocess/UpdateQuantitiesAndUOMs.java
---
(0113310)
hgbot   
2019-07-11 20:17   
Repository: erp/backports/3.0PR19Q2.1
Changeset: 7ffb757fca201fa37c7cd8adf93963b3738266e9
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Thu Jul 11 17:37:43 2019 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR19Q2.1/rev/7ffb757fca201fa37c7cd8adf93963b3738266e9 [^]

related to issue 41328 code review changes

---
M src/org/openbravo/common/actionhandler/createlinesfromprocess/CreateLinesFromUtil.java
---
(0113313)
Sandrahuguet   
2019-07-11 20:18   
code review + testing ok