Openbravo Issue Tracking System - Modules
View Issue Details
0038482ModulesAdvanced Warehouse Operationspublic2018-05-02 17:072018-10-19 13:22
dmiguelez 
vmromanos 
urgentmajoralways
closedfixed 
5
 
 
dmiguelez
0038482: Pending to Generate Picking column in Sales Order Lines not properly updated when Delta tasks are generated
Pending to Generate Picking column in Sales Order Lines not properly updated when Delta tasks are generated
With AWO and AWO SampleData modules installed

Log in as AWO QA Admin

From the Front End, create Stock for Ale Beer in Bin Beverage101, Beverage102, Beverage103

Click on Count button from menu.
Search for Beverage101 Bin
Search for Ale Beer Product
Set 100 as confirmed quantity and confirm
Set again 100 as confirmed quantity and confirm


Go to Sales Order window and create a new record with:
- Organization: US West Coast
- Business Partner: Healthy Food Supermarkets
- Warehouse: US West Coast
Move to Lines and create a new record with:
- Product: Ale Beer
- Operative Quantity: 5
Book the Order.

Check Pending To Generate Picking column of Sales Order Line is 5
Click on Pick. A Task is generated and Pending to Generate Picking is 0

Move to the Task and set 1 as confirmed.
Click on confirm and set different as delta
A new Task is created for 4 units and the Pending to Generate Picking is 4 (this is already wrong)
Delete the new Task, the Pending to Generate Picking is 8
Delete db columns C_Order.EM_OBAWO_INCOMPLETE_PICKING and C_OrderLine.EM_OBAWO_PENDING_QTY_PICKING
Create computed columns instead.
Ensure no filtering/sorting is allowed at Sales Order header's column to avoid performance issues.

The logic in C_Order column is currently wrong and must be fixed.
This column represents the number of lines pending to be completely picked. It shows how many lines are pending to confirm the picking action through tasks. For example, if a line has a picking task for the full ordered quantity but not yet confirmed, it will be considered as a Pending To Pick Line.

The logic in C_OrderLine column is OK.
This column represents the pending Quantity to generate Picking for products declared as stocked. If the order line has picking task(s) (independent of the status) for the full ordered quantity, this field will show 0, as no more picking is necessary to be generated.

Update elements' help to properly explain the purpose of both columns
No tags attached.
Issue History
2018-05-02 17:07dmiguelezNew Issue
2018-05-02 17:07dmiguelezAssigned To => dmiguelez
2018-05-02 17:07dmiguelezAssigned Todmiguelez => Triage Finance
2018-09-05 17:32vmromanosStatusnew => scheduled
2018-09-05 17:32vmromanosAssigned ToTriage Finance => vmromanos
2018-09-05 17:38vmromanosReview Assigned To => dmiguelez
2018-09-05 17:38vmromanosProposed Solution updated
2018-09-14 14:58hgbotCheckin
2018-09-14 14:58hgbotNote Added: 0106783
2018-09-14 14:58hgbotStatusscheduled => resolved
2018-09-14 14:58hgbotResolutionopen => fixed
2018-09-14 14:58hgbotFixed in SCM revision => http://code.openbravo.com/retail/backports/AWO/3.0RR18Q3/org.openbravo.warehouse.advancedwarehouseoperations/rev/dda305110cefdf799f1274f4d371c933f5e7e77f [^]
2018-09-18 13:27vmromanosStatusresolved => new
2018-09-18 13:27vmromanosResolutionfixed => open
2018-10-09 13:13hgbotCheckin
2018-10-09 13:13hgbotNote Added: 0107224
2018-10-09 13:13hgbotStatusnew => resolved
2018-10-09 13:13hgbotResolutionopen => fixed
2018-10-09 13:13hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/AWO/3.0RR18Q3/org.openbravo.warehouse.advancedwarehouseoperations/rev/dda305110cefdf799f1274f4d371c933f5e7e77f [^] => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/dda305110cefdf799f1274f4d371c933f5e7e77f [^]
2018-10-15 18:09dmiguelezNote Added: 0107306
2018-10-15 18:10dmiguelezNote Added: 0107307
2018-10-15 18:10dmiguelezStatusresolved => closed
2018-10-19 13:22hgbotCheckin
2018-10-19 13:22hgbotNote Added: 0107458
2018-10-19 13:22hgbotCheckin
2018-10-19 13:22hgbotNote Added: 0107459
2022-09-06 17:18caristuCategoryAdvance Warehouse Operations => Advanced Warehouse Operations

Notes
(0106783)
hgbot   
2018-09-14 14:58   
Repository: retail/backports/AWO/3.0RR18Q3/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: dda305110cefdf799f1274f4d371c933f5e7e77f
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Sep 06 12:00:20 2018 +0200
URL: http://code.openbravo.com/retail/backports/AWO/3.0RR18Q3/org.openbravo.warehouse.advancedwarehouseoperations/rev/dda305110cefdf799f1274f4d371c933f5e7e77f [^]

Fixed bug 38482: C_Order.EM_OBAWO_INCOMPLETE_PICKING and C_OrderLine.EM_OBAWO_PENDING_QTY_PICKING

These db columns have been deleted and transformed to computed columns.
This drastically reduces the complexity to maintain these two columns.

From a performance POV I don't see a problem in C_OrderLine.EM_OBAWO_PENDING_QTY_PICKING as the number of lines in an order are usually low.
In the case C_Order.EM_OBAWO_INCOMPLETE_PICKING I do expect performance problems, so it's not possible to filter/order by this column. We should maybe think on replacing this column by a more meaningful physical column.

The old C_Order.EM_OBAWO_INCOMPLETE_PICKING logic was wrong, because it was just like a count of order lines with something pending to generate picking.
The purpose of the C_Order.EM_OBAWO_INCOMPLETE_PICKING is to show the lines pending to CONFIRM picking (not to generate), so the logic has been modified accordingly.

These changes have required to adapt JUnit tests to:
1. Work properly with the computed columns
2. Assert the right values in the C_Order.EM_OBAWO_INCOMPLETE_PICKING column.

Any old setter from these columns have been deleted.

---
M src-db/database/model/functions/OBAWO_CLOSE_ORDER_EP.xml
M src-db/database/model/modifiedTables/C_ORDER.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOq_PendingPickingLines.java
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/utils/AWOTestUtils.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/eventobserver/TaskEventObserver.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/IssueSalesOrder_ITTAlgorithm.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/PickingSalesOrder_ITTAlgorithm.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/ReceiptPurchaseOrder_ITTAlgorithm.java
A src-db/database/model/functions/OBAWO_ORDERLINE_PENDINGPICKING.xml
A src-db/database/model/functions/OBAWO_ORDER_PENDINGPICKING.xml
R src-db/database/model/modifiedTables/C_ORDERLINE.xml
R src/org/openbravo/warehouse/advancedwarehouseoperations/eventobserver/OrderEventObserver.java
R src/org/openbravo/warehouse/advancedwarehouseoperations/eventobserver/OrderLineEventObserver.java
---
(0107224)
hgbot   
2018-10-09 13:13   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: dda305110cefdf799f1274f4d371c933f5e7e77f
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Sep 06 12:00:20 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/dda305110cefdf799f1274f4d371c933f5e7e77f [^]

Fixed bug 38482: C_Order.EM_OBAWO_INCOMPLETE_PICKING and C_OrderLine.EM_OBAWO_PENDING_QTY_PICKING

These db columns have been deleted and transformed to computed columns.
This drastically reduces the complexity to maintain these two columns.

From a performance POV I don't see a problem in C_OrderLine.EM_OBAWO_PENDING_QTY_PICKING as the number of lines in an order are usually low.
In the case C_Order.EM_OBAWO_INCOMPLETE_PICKING I do expect performance problems, so it's not possible to filter/order by this column. We should maybe think on replacing this column by a more meaningful physical column.

The old C_Order.EM_OBAWO_INCOMPLETE_PICKING logic was wrong, because it was just like a count of order lines with something pending to generate picking.
The purpose of the C_Order.EM_OBAWO_INCOMPLETE_PICKING is to show the lines pending to CONFIRM picking (not to generate), so the logic has been modified accordingly.

These changes have required to adapt JUnit tests to:
1. Work properly with the computed columns
2. Assert the right values in the C_Order.EM_OBAWO_INCOMPLETE_PICKING column.

Any old setter from these columns have been deleted.

---
M src-db/database/model/functions/OBAWO_CLOSE_ORDER_EP.xml
M src-db/database/model/modifiedTables/C_ORDER.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOq_PendingPickingLines.java
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/utils/AWOTestUtils.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/eventobserver/TaskEventObserver.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/IssueSalesOrder_ITTAlgorithm.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/PickingSalesOrder_ITTAlgorithm.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/ReceiptPurchaseOrder_ITTAlgorithm.java
A src-db/database/model/functions/OBAWO_ORDERLINE_PENDINGPICKING.xml
A src-db/database/model/functions/OBAWO_ORDER_PENDINGPICKING.xml
R src-db/database/model/modifiedTables/C_ORDERLINE.xml
R src/org/openbravo/warehouse/advancedwarehouseoperations/eventobserver/OrderEventObserver.java
R src/org/openbravo/warehouse/advancedwarehouseoperations/eventobserver/OrderLineEventObserver.java
---
(0107306)
dmiguelez   
2018-10-15 18:09   
Test Plan:

With AWO and AWO SampleData modules installed

Log in as AWO QA Admin

From the Front End, create Stock for Ale Beer in Bin Beverage101, Beverage102, Beverage103

Click on Count button from menu.
Search for Beverage101 Bin
Search for Ale Beer Product
Set 100 as confirmed quantity and confirm
Set again 100 as confirmed quantity and confirm


Go to Sales Order window and create a new record with:
- Organization: US West Coast
- Business Partner: Healthy Food Supermarkets
- Warehouse: US West Coast
Move to Lines and create a new record with:
- Product: Ale Beer
- Operative Quantity: 5
Book the Order.

Check Pending To Generate Picking column of Sales Order Line is 5
Click on Pick. A Task is generated and Pending to Generate Picking is 0

Move to the Task and set 1 as confirmed.
Click on confirm and set different as delta
A new Task is created for 4 units and the Pending to Generate Picking is 0
Delete the new Task, the Pending to Generate Picking is 4
(0107307)
dmiguelez   
2018-10-15 18:10   
Code Review + Testing Ok
(0107458)
hgbot   
2018-10-19 13:22   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: dd9b9e637099f93ff51ad4f4e0b0f014ce21b2e0
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Oct 19 13:17:57 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/dd9b9e637099f93ff51ad4f4e0b0f014ce21b2e0 [^]

Related to issue 38482: fixed standalone issue task query

Use the same query as the PickingSalesOrder_ITTAlgorithmDao to get the standalone issue task.
It is a standalone issue task when there is no reservation stock associated or when the reservation stock has not been created automatically by the Task generator.

---
M src-db/database/model/functions/OBAWO_ORDERLINE_PENDINGPICKING.xml
---
(0107459)
hgbot   
2018-10-19 13:22   
Repository: retail/backports/AWO/3.0RR18Q3/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 8349b3d4d30b287253428612660db66b86530b12
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Oct 19 13:17:57 2018 +0200
URL: http://code.openbravo.com/retail/backports/AWO/3.0RR18Q3/org.openbravo.warehouse.advancedwarehouseoperations/rev/8349b3d4d30b287253428612660db66b86530b12 [^]

Related to issue 38482: fixed standalone issue task query

Use the same query as the PickingSalesOrder_ITTAlgorithmDao to get the standalone issue task.
It is a standalone issue task when there is no reservation stock associated or when the reservation stock has not been created automatically by the Task generator.

---
M src-db/database/model/functions/OBAWO_ORDERLINE_PENDINGPICKING.xml
---