Openbravo Issue Tracking System - Modules
View Issue Details
0048241ModulesAdvanced Warehouse Operationspublic2021-12-13 17:482021-12-22 11:47
vmromanos 
vmromanos 
lowminorhave not tried
closedfixed 
5
 
 
0048241: "Initialize Quantity Count with Book Quantity" and manual backoffice lines
The "Initialize Quantity Count with Book Quantity" flag configures how to initialize the quantity count for the inventory count lines. When set, the quantity count will be equal to the quantity on hand; otherwise it will be set to 0.

This flag is working fine in the usual scenarios:
- when creating an inventory count from a list (both backend and frontend)
- when manually adding a new count line in the frontend


In the backoffice it is possible to manually create new shared inventory count lines by creating a new record and selecting the stock. In this cases the flag is NOT taken into account and it always initializes the quantity count with the quantity on hand.
This is wrong, and instead the flag should be taken into account to initialize to the quantity on hand or to 0.

The problem is in the usage of the Core's SL_Inventory_Product callout.
Login in AWO-QA client
Create a new shared Inventory Count for West org/warehouse.
Set "Initialize Quantity Count with Book Quantity" = N
Press Assign and select any user.
Select the user and then go to Shared Counts tab
Enter a new record. Select "Heineken Beer" in product for "Beverage102" bin.
Verify Book Quantity is set to 300 [OK]
Verify Quantity count is set to 300 (same as Book Quantity) [WRONG: it should be 0 because "Initialize Quantity Count with Book Quantity" = N]
Create a new callout in AWO module that extends from Core's SL_Inventory_Product.
Override the execute() method and:
 - call super.execute()
 - take the info object and replace inpqtycount property by 0 only when "Initialize Quantity Count with Book Quantity" = N
No tags attached.
related to defect 0048123 closed ranjith_qualiantech_com using not blind count -> qty counted is 0 if nothing is counted but UI shows qtyOnHand as counted 
related to defect 0048135 closed vmromanos Inventory Count: unable to make difference between "not counted yet" and "counted at 0" 
caused by defect 0046635 closed davidverrier Counted quantity functionality is not present in AWO anymore 
related to defect 0048379 closed vmromanos Blind Count and Initialize Qty Count with Book Qty when launching a Count/Recount from Warehouse Operations 
Issue History
2021-12-13 17:48vmromanosNew Issue
2021-12-13 17:48vmromanosAssigned To => Triage Finance
2021-12-13 17:49vmromanosRelationship addedcaused by 0046635
2021-12-13 18:05guilleaerRelationship addedrelated to 0048123
2021-12-13 18:06guilleaerRelationship addedrelated to 0048135
2021-12-14 17:31vmromanosStatusnew => scheduled
2021-12-14 17:31vmromanosAssigned ToTriage Finance => vmromanos
2021-12-14 17:32hgbotNote Added: 0133700
2021-12-14 17:41vmromanosNote Added: 0133701
2021-12-22 11:47hgbotResolutionopen => fixed
2021-12-22 11:47hgbotStatusscheduled => closed
2021-12-22 11:47hgbotNote Added: 0133895
2021-12-22 11:47hgbotNote Added: 0133896
2022-01-11 17:31vmromanosRelationship addedrelated to 0048379
2022-09-06 17:18caristuCategoryAdvance Warehouse Operations => Advanced Warehouse Operations

Notes
(0133700)
hgbot   
2021-12-14 17:32   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations/-/merge_requests/40 [^]
(0133701)
vmromanos   
2021-12-14 17:41   
Test plan:

Login as System Admin.
Go to Preference window and search for the "Force Blind Inventory Count" record and change the value to N.

Login as AWO-QA admin in backoffice
Create an Inventory Count header for West org/warehouse
Set Blind Count = Y, Shared Count = Y
Press Assign and select any user
Go to Shared Count tab and create a new record.
Select any product. Make sure the Quantity Count = 0 while the Book Quantity <> 0

Now go to the header and set Blind Count = N and Initialize Quantity Count with Book Quantity = N
Go to Shared Count tab and create a new record.
Select any product. Make sure the Quantity Count = 0 while the Book Quantity <> 0

Now go to the header and set Blind Count = N and Initialize Quantity Count with Book Quantity = Y
Go to Shared Count tab and create a new record.
Select any product. Make sure the Quantity Count = Book Quantity <> 0



Create an Inventory Count header for West org/warehouse
Set Blind Count = Y, Shared Count = N
Press Generate List and select Beverage101 storage bin and press Done. Some records should be created in Physical Inventory Proposal Line tab.
Edit any of the lines and select any product. Make sure the Quantity Count = 0 while the Book Quantity <> 0

Now go to the header and set Blind Count = N and Initialize Quantity Count with Book Quantity = N.
Edit any of the lines and select any product. Make sure the Quantity Count = 0 while the Book Quantity <> 0


Now go to the header and set Blind Count = N and Initialize Quantity Count with Book Quantity = Y
Edit any of the lines and select any product. Make sure the Quantity Count = Book Quantity <> 0
(0133895)
hgbot   
2021-12-22 11:47   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations [^]
Changeset: 928528c3501f85b08c2b274f5d55cb604a34ea16
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 22-12-2021 10:44:35
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations/-/commit/928528c3501f85b08c2b274f5d55cb604a34ea16 [^]

Fixed ISSUE-48241: Initialize Qty Count with Book Qty and manual BO lines

Implemented two new simple callouts that:
- Extends from the existing core's callouts
- Set to Zero the Qty Count when the Initialize Quantity Count with Book Quantity
flag is set to No.

Note that, by default, the core's callouts used before were always setting the
Qty Count = Book Qty.

The Initialize Quantity Count with Book Quantity is set as Stored in Session to
safely retrieve its value inside the callouts.

---
A src/org/openbravo/warehouse/advancedwarehouseoperations/ad_callouts/InitializeQtyCountUtil.java
A src/org/openbravo/warehouse/advancedwarehouseoperations/ad_callouts/SL_Inventory_Locator_InitializeQtyCount.java
A src/org/openbravo/warehouse/advancedwarehouseoperations/ad_callouts/SL_Inventory_Product_InitializeQtyCount.java
M src-db/database/sourcedata/AD_CALLOUT.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
---
(0133896)
hgbot   
2021-12-22 11:47   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations/-/merge_requests/40 [^]