Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036195Openbravo ERP04. Warehouse managementpublic2017-06-06 13:552017-06-09 13:27
ngarcia 
markmm82 
immediatemajoralways
closedfixed 
5
 
3.0PR17Q1.23.0PR17Q1.2 
aferraz
Core
Production - Confirmed Stable
2016-12-02
3.0PR17Q1
https://code.openbravo.com/erp/devel/pi/rev/cde4e226d8de [^]
No
0036195: Cannot select an order line in Create Lines From of Goods Receipt window if it uses secondary UOM
Cannot select an order line in Create Lines From of Goods Receipt window if it uses secondary UOM
As system admin role:
   Set as displayed the 'Order Quantity' and 'Order UOM' fields of at least purchase order and goods receipt lines
   Set as active 'Product - UOM' and 'Unit Of Measure - Conversion' tabs

As group admin role:
   Create a new product
   Add a purchase price list to it
   Set a unit in the UOM tab, for example Kg
   Define a conversion between Kg and Unit
   Create a purchase order, add a line to it and include the previously created order
   Select Kg in Order UOM field and set the quantity in Order Quantity field
   Book it
   Create a Goods Receipt header
   Click on Create Lines From and select the already created order line
   Add a storage bin and click on OK
   Check the following error message is shown:

     "This record cannot be deleted because it is associated with other existing elements. Please see Linked Items"

   The logs shows:

   ERROR org.openbravo.erpCommon.ad_actionButton.CreateFromShipmentData - SQL error in query: INSERT INTO M_INOUTLINE ...

Exception:org.postgresql.util.PSQLException: ERROR: insert or update on table "m_inoutline" violates foreign key constraint "m_inoutline_m_product_uom"
  Detail: Key (m_product_uom_id)=(72BA247D31F745F3AF11F74A5E2CCBEF) is not present in table "m_product_uom".
   
No tags attached.
blocks defect 0036184 closed markmm82 Cannot select an order line in Create Lines From of Goods Receipt window if it uses secondary UOM 
Issue History
2017-06-07 22:11markmm82Typedefect => backport
2017-06-07 22:11markmm82Target Version => 3.0PR17Q1.2
2017-06-09 11:49aferrazRegression level => Production - Confirmed Stable
2017-06-09 11:49aferrazRegression date => 2016-12-02
2017-06-09 11:49aferrazRegression introduced in release => 3.0PR17Q1
2017-06-09 11:49aferrazRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/cde4e226d8de [^]
2017-06-09 13:26hgbotCheckin
2017-06-09 13:26hgbotNote Added: 0097283
2017-06-09 13:26hgbotStatusscheduled => resolved
2017-06-09 13:26hgbotResolutionopen => fixed
2017-06-09 13:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q1.2/rev/5c1488e2ccc41a5236f844dfca0e142bf31839ad [^]
2017-06-09 13:27aferrazReview Assigned To => aferraz
2017-06-09 13:27aferrazNote Added: 0097285
2017-06-09 13:27aferrazStatusresolved => closed
2017-06-09 13:27aferrazFixed in Version => 3.0PR17Q1.2

Notes
(0097283)
hgbot   
2017-06-09 13:26   
Repository: erp/backports/3.0PR17Q1.2
Changeset: 5c1488e2ccc41a5236f844dfca0e142bf31839ad
Author: Mark <markmm82 <at> gmail.com>
Date: Thu Jun 08 21:26:48 2017 -0400
URL: http://code.openbravo.com/erp/backports/3.0PR17Q1.2/rev/5c1488e2ccc41a5236f844dfca0e142bf31839ad [^]

Fixes issue 36195: Cannot select an order line in Create Lines From of Receipt
window if it uses secondary UOM

Cannot select an order line in Create Lines From of Goods Receipt window if it uses
secondary UOM.

It was caused because of use of the secondary unit of measure ID instead of the
M_PRODUCT_UOM_ID when creating the field provider for the field of secondary UOM.

To fix it, was used the M_PRODUCT_UOM_ID of the record when the secondary unit
is defined for the selected product, instead of the ID of it unit.

---
M src/org/openbravo/materialmgmt/UOMUtil.java
---
(0097285)
aferraz   
2017-06-09 13:27   
Code review + Testing OK