Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041174Openbravo ERP07. Sales managementpublic2019-06-25 16:452019-08-22 11:29
ngarcia 
collazoandy4 
immediateminoralways
closedfixed 
5
 
3.0PR19Q3 
Sandrahuguet
Core
No
0041174: 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.
depends on backport 00411853.0PR19Q2.1 closed collazoandy4 Alternative UOM is modified to UOM in Create Lines From processes of Invoice window if it is defined as Secondary 
depends on backport 00411863.0PR19Q1.2 closed collazoandy4 Alternative UOM is modified to UOM in Create Lines From processes of Invoice window if it is defined as Secondary 
causes 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-06-25 16:45ngarciaNew Issue
2019-06-25 16:45ngarciaAssigned To => Triage Finance
2019-06-25 16:45ngarciaModules => Core
2019-06-25 16:45ngarciaResolution time => 1563228000
2019-06-25 16:45ngarciaTriggers an Emergency Pack => No
2019-06-25 16:46ngarciaSummaryAlternative UOM is modified to UOM in Create Lines From processes of Invoice window => Alternative UOM is modified to UOM in Create Lines From processes of Invoice window if it is defined as Secondary
2019-06-25 16:46ngarciaDescription Updatedbug_revision_view_page.php?rev_id=19001#r19001
2019-06-25 16:46ngarciaIssue Monitored: networkb
2019-06-26 03:01collazoandy4Assigned ToTriage Finance => collazoandy4
2019-06-26 03:01collazoandy4Statusnew => scheduled
2019-06-26 17:40SandrahuguetStatusscheduled => acknowledged
2019-06-26 17:40SandrahuguetStatusacknowledged => scheduled
2019-06-27 16:05collazoandy4Note Added: 0113066
2019-06-28 10:24hgbotCheckin
2019-06-28 10:24hgbotNote Added: 0113092
2019-06-28 10:24hgbotStatusscheduled => resolved
2019-06-28 10:24hgbotResolutionopen => fixed
2019-06-28 10:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f831b0b71a5ec700751e645c9e6980001acd8c7b [^]
2019-06-28 12:06SandrahuguetReview Assigned To => Sandrahuguet
2019-06-28 12:06SandrahuguetNote Added: 0113102
2019-06-28 12:06SandrahuguetStatusresolved => closed
2019-06-28 12:06SandrahuguetFixed in Version => 3.0PR19Q3
2019-06-28 14:49hudsonbotCheckin
2019-06-28 14:49hudsonbotNote Added: 0113110
2019-07-08 12:02inaki_garciaIssue cloned0041315
2019-07-08 12:02inaki_garciaRelationship addedcauses 0041315
2019-08-02 12:32hgbotCheckin
2019-08-02 12:32hgbotNote Added: 0113782
2019-08-22 11:29SandrahuguetNote Added: 0114118

Notes
(0113066)
collazoandy4   
2019-06-27 16:05   
As group admin role:
   Set 'Enable UOM Management' preference to Y
   Log out and log in
As F&B International Group Admin
   Go to Product window and select 'Cerveza Ale 0,5L'
     Create a new record in Alternate UOM tab of Liter unit as Secondary UOM with a conversion of 5
   Create a Sales Order with 6 Liters of 'Cerveza Ale 0,5L'
     Set its Invoice Terms as Immediate
     Check line
      Operative Quantity: 6
      Alternative UOM: Liter
      Ordered Quantity: 30
      UOM: Unit
     Book it
   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 Sales Invoice line:
      Operative Quantity: 6
      Alternative UOM: Liter
      Ordered Quantity: 30
      UOM: Unit
(0113092)
hgbot   
2019-06-28 10:24   
Repository: erp/devel/pi
Changeset: f831b0b71a5ec700751e645c9e6980001acd8c7b
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Wed Jun 26 14:29:58 2019 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/f831b0b71a5ec700751e645c9e6980001acd8c7b [^]

Fixes issue 41174: 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
---
(0113102)
Sandrahuguet   
2019-06-28 12:06   
code review + testing ok
(0113110)
hudsonbot   
2019-06-28 14: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/bdfae79302ea [^]
Maturity status: Test
(0113782)
hgbot   
2019-08-02 12:32   
Repository: tools/automation/int
Changeset: 6c6f04b039d5511e53fb66f43a411130d8ee6699
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Fri Jul 26 00:00:44 2019 -0400
URL: http://code.openbravo.com/tools/automation/int/rev/6c6f04b039d5511e53fb66f43a411130d8ee6699 [^]

Related to issue 41174: Added some automated test

---
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SAL_RegressionSuite.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression41174.java
---
(0114118)
Sandrahuguet   
2019-08-22 11:29   
automated test created