Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041186Openbravo ERP07. Sales managementpublic2019-06-25 16:452019-06-28 12:06
ngarcia 
collazoandy4 
immediateminoralways
closedfixed 
5
 
3.0PR19Q1.23.0PR19Q1.2 
Sandrahuguet
Core
No
0041186: Alternative UOM is modified to UOM in Create Lines From processes of Invoice window if it is defined as Secondary
Alternative UOM is modified to UOM in Create Lines From processes of Invoice window if it is defined as Secondary
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 Secondary UOM
   Add a conversion of 5
   Create a Sales Order
   Add 6 Liters of 'Cerveza Ale 0,5L':
      Operative Quantity: 6
      Alternative UOM: Liter
      Ordered Quantity: 30
      UOM: Unit
   Book it
   Set its Invoice Terms as Immediate
   Go to Sales Invoice
   Create Lines From Order
   Select the previously created order line
   Check the quantities are shown as in the order line in the pop-up
   Check the Alternative UOM is updated with Unit in the Sales Invoice line:
      Operative Quantity: 30
      Alternative UOM: Unit
      Ordered Quantity: 30
      UOM: Unit
It seems the problem is in the UpdateQuantitiesAndUOMs file:

The uomManagementIsEnabledAndAUMAndOrderUOMAreEmpty function is returning true because the Order UOM field is empty (it belongs to the old second UOM feature):

return isUomManagementEnabled && (orderUOM == null || operativeUOM == null);
No tags attached.
blocks defect 0041174 closed collazoandy4 Alternative UOM is modified to UOM in Create Lines From processes of Invoice window if it is defined as Secondary 
Issue History
2019-06-26 17:40SandrahuguetTypedefect => backport
2019-06-26 17:40SandrahuguetTarget Version => 3.0PR19Q1.2
2019-06-28 11:51hgbotCheckin
2019-06-28 11:51hgbotNote Added: 0113096
2019-06-28 11:51hgbotStatusscheduled => resolved
2019-06-28 11:51hgbotResolutionopen => fixed
2019-06-28 11:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR19Q1.2/rev/e63e7eef95981d224b4e1506d03d67c1b90c7fd5 [^]
2019-06-28 12:06SandrahuguetReview Assigned To => Sandrahuguet
2019-06-28 12:06SandrahuguetNote Added: 0113101
2019-06-28 12:06SandrahuguetStatusresolved => closed
2019-06-28 12:06SandrahuguetFixed in Version => 3.0PR19Q1.2

Notes
(0113096)
hgbot   
2019-06-28 11:51   
Repository: erp/backports/3.0PR19Q1.2
Changeset: e63e7eef95981d224b4e1506d03d67c1b90c7fd5
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Wed Jun 26 14:29:58 2019 -0400
URL: http://code.openbravo.com/erp/backports/3.0PR19Q1.2/rev/e63e7eef95981d224b4e1506d03d67c1b90c7fd5 [^]

Fixes issue 41186: Alternative UOM is modified to UOM in Create Lines From
processes of Invoice window if it is defined as Secondary

If the orderUOM is null and operativeUOM is not null the alternative UOM was updated
to the

---
M src/org/openbravo/common/actionhandler/createlinesfromprocess/UpdateQuantitiesAndUOMs.java
---
(0113101)
Sandrahuguet   
2019-06-28 12:06   
code review + testing ok