Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037221Openbravo ERP04. Warehouse managementpublic2017-11-03 14:142018-01-03 12:38
ngarcia 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q1 
dmiguelez
Core
No
0037221: Cannot add a purchase order line to a goods receipt if both secondary UOM and alternate UOM are configured for the product
Cannot add a purchase order line to a goods receipt if both secondary UOM and alternate UOM are configured for the product

updateData function of CreateFrom_ShipmentPO.html is receiving a value in inpmProductUomId
As System Admin role:
   Set Product - UOM tab as Active

As group admin role:
   Create a new product
   Add a purchase price list to it
   Add a unit in UOM tab

As System Admin role:
   Set the Enable UOM Management preference to Y

As group admin role:
   Add a the same unit in Alternate UOM to the previously created product
   Create a purchase order and set Alternate UOM and Operative Quantity
   Book it
   Create a Goods Receipt and select the previously created purchase order in Create Lines From process
   Try to modify the Operative Quantity and check you could not (you can modify the Quantity field)
   Select a storage bin and click on OK
   The following error is raised:
      ERROR: null value in column "movementqty" violates not-null constraint
   And the log shows:
      ERROR org.openbravo.erpCommon.ad_actionButton.CreateFromShipmentData - SQL error in query: INSERT INTO M_INOUTLINE
No tags attached.
causes defect 0039448 closed markmm82 [PR18Q4] "Create Lines From" on Goods Receipt not working properly when using Alternate UOM 
Issue History
2017-11-03 14:14ngarciaNew Issue
2017-11-03 14:14ngarciaAssigned To => Triage Finance
2017-11-03 14:14ngarciaModules => Core
2017-11-03 14:14ngarciaResolution time => 1511478000
2017-11-03 14:14ngarciaTriggers an Emergency Pack => No
2017-11-03 14:14ngarciaIssue Monitored: networkb
2017-11-06 10:59dmiguelezAssigned ToTriage Finance => collazoandy4
2017-11-06 11:07ngarciaPriorityimmediate => urgent
2017-11-06 15:21collazoandy4Statusnew => scheduled
2017-11-06 23:40collazoandy4Note Added: 0100293
2017-11-13 16:56hgbotCheckin
2017-11-13 16:56hgbotNote Added: 0100499
2017-11-13 16:56hgbotStatusscheduled => resolved
2017-11-13 16:56hgbotResolutionopen => fixed
2017-11-13 16:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/01c6dc6168f6c99f1e9c223d26fdf789e2ad2e61 [^]
2017-11-13 16:57dmiguelezReview Assigned To => dmiguelez
2017-11-13 16:57dmiguelezNote Added: 0100500
2017-11-13 16:57dmiguelezStatusresolved => closed
2017-11-13 16:57dmiguelezFixed in Version => 3.0PR18Q1
2018-01-03 12:38hudsonbotCheckin
2018-01-03 12:38hudsonbotNote Added: 0101417
2018-10-16 10:00SandrahuguetRelationship addedcauses 0039448

Notes
(0100293)
collazoandy4   
2017-11-06 23:40   
Test Plan
 Configuration Steps
  As System Admin role:
    Set in the UOM Tab for Product window as Active
    Log out and Log In

  As group admin role:
    Go to Product window and create a new record:
      Search Key/Name: IssueProduct
      Create two records in Price Tab:
        Price List Version: Tarifa Bebidas Alegres Unit/List Price: 8.00
        Price List Version: Tarifa de ventas Unit/List Price: 9.00
      Create a new record in UOM Tab:
        UOM: Kilogram
   
  As System Admin role:
    Set the Enable UOM Management preference to Y

  As group admin role:
    Go to Product window and select IssueProduct
      Create a new record in Alternate UOM tab:
        UOM: Kilogram
        Conversion rate: 2
        Sales: Secondary
        Purchase: Primary

 Steps to reproduce
   Go to Purchase order and create a new record:
     Business Partner: Bebidas Alegres, S.L.
     Create a new record in Lines tab:
       Product: IssueProduct
       Operative Quantity: 5
       Alternative UOM: Kilogram
     Book the order
   Go to Purchase Invoice and create a new record:
     Business Partner: Bebidas Alegres, S.L.
     Using Create Lines From process select the previous order created select the line and check the process ends sucessfully
     Do not Complete it
   Go to Goods Receipt and create a new record:
     Business Partner: Bebidas Alegres, S.L.
     Using Create Lines From process select the previous order created select the line and check the process ends sucessfully
     Do not Complete it
   Complete the previous invoice created
   Go to the receipt created and remove the line
     Using Create Lines From process select the previous order created select the line and check the process ends sucessfully
     Complete it

 Repeat the same steps to reproduce for a product without Alternative UOM enabled and sales flow
 Set the Enable UOM Management preference to N and test de above steps to reproduce for purchase and sales flow
(0100499)
hgbot   
2017-11-13 16:56   
Repository: erp/devel/pi
Changeset: 01c6dc6168f6c99f1e9c223d26fdf789e2ad2e61
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Mon Nov 06 17:31:38 2017 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/01c6dc6168f6c99f1e9c223d26fdf789e2ad2e61 [^]

Fixes issue 37221: Cannot add a purchase order line to a goods receipt if both
secondary UOM and alternate UOM are configured for the product

When creating a goods receipt line from an order with a product wich have configured
secondary and alternate UOM the qtyAum parameter was empty.

Now if the AUM is enabled and the line in the order doesn't have a secondary uom
the qtyAum value is get from the line

---
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
---
(0100500)
dmiguelez   
2017-11-13 16:57   
Code Review + Testing Ok
(0101417)
hudsonbot   
2018-01-03 12:38   
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/c81e0d3cbab5 [^]
Maturity status: Test