Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027992Openbravo ERP04. Warehouse managementpublic2014-10-27 18:412014-12-30 23:27
caristu 
reinaldoguerra 
urgentmajoralways
closedfixed 
5
pi 
3.0PR15Q1pi 
umartirena
Core
No
0027992: Create Inventory Count List is not adding products with attribute set under some circumstances
Create Inventory Count List process is not adding products with attribute set if the same product already exists in the physical inventory lines.
1) Create a new product with Lot as attribute set
2) To generate stock for our product, create a new physical inventory with two lines
   - Line 1: product: our product, lot name 1, quantity 100
   - Line 2: product: our product, lot name 2, quantity 0
3) Process the physical inventory
4) Create a new physical inventory
5) Use the Create Inventory Count List button:
   - Product search key: our product search key
   - Inventory Quantity: 0

   A line with our product with lot name 2 is added.
   
6) Use the Create Inventory Count List button again
   - Product search key: our product search key
   - Inventory Quantity: > 0

  Notice that a line with our product with lot name 1 is not added.
In the "m_inventory_listcreate" the following select is avoiding the product with different attribute set to be added:

...
 AND NOT EXISTS
        (SELECT *
        FROM M_InventoryLine l
        WHERE l.M_Inventory_ID=v_Record_ID
          AND l.M_Product_ID=s.M_Product_ID
          AND l.M_Locator_ID=s.M_Locator_ID
        )
...

The attribute_set_id should be take into account too.
No tags attached.
Issue History
2014-10-27 18:41caristuNew Issue
2014-10-27 18:41caristuAssigned To => AtulOpenbravo
2014-10-27 18:41caristuModules => Core
2014-10-27 18:41caristuResolution time => 1417734000
2014-10-27 18:41caristuTriggers an Emergency Pack => No
2014-10-27 18:41caristuIssue Monitored: networkb
2014-11-10 17:23reinaldoguerraAssigned ToAtulOpenbravo => reinaldoguerra
2014-11-10 17:23reinaldoguerraStatusnew => scheduled
2014-11-11 02:52reinaldoguerraNote Added: 0071540
2014-12-16 16:22hgbotCheckin
2014-12-16 16:22hgbotNote Added: 0072562
2014-12-16 16:22hgbotStatusscheduled => resolved
2014-12-16 16:22hgbotResolutionopen => fixed
2014-12-16 16:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a65bafad9865ac84c3158730848bcab744df22ee [^]
2014-12-16 16:25umartirenaReview Assigned To => umartirena
2014-12-16 16:25umartirenaNote Added: 0072564
2014-12-16 16:25umartirenaStatusresolved => closed
2014-12-16 16:25umartirenaFixed in Version => pi
2014-12-30 23:27hudsonbotCheckin
2014-12-30 23:27hudsonbotNote Added: 0073223

Notes
(0071540)
reinaldoguerra   
2014-11-11 02:52   
Test plan used:
1- Login into Openbravo ERP
2- Go to product window and create a new one with Lot as attribute set.
3- Go to physical inventory window and create a new record with two lines.
   Line 1 - Product: our product, Lot name: 1, Quantity: 100
   Line 2 - Product: our product, Lot name: 2, Quantity: 0
4- Click Process Inventory Count button
5- Create a new physical inventory header
6- Use the Create Inventory Count List button:
   Product search key: our product search key
   Inventory Quantity: 0
7- Realize that a line with our product with lot name 2 is added.
8- Use the Create Inventory Count List button again
   Product search key: our product search key
   Inventory Quantity: > 0
9- Notice that a line with our product with lot name 1 is added.
(0072562)
hgbot   
2014-12-16 16:22   
Repository: erp/devel/pi
Changeset: a65bafad9865ac84c3158730848bcab744df22ee
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Dec 16 16:21:31 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a65bafad9865ac84c3158730848bcab744df22ee [^]

Fixes bug 27992: Create Inventory Process should take into account attributes

'Create Inventory Count List' process in Physical Inventory it was not adding products with attribute set if the same product already exists in the physical inventory lines. This was because there was a select that was avoiding to select the products with different attribute set. The attribute_set_id has been added to this select to take into account these ones.

---
M src-db/database/model/functions/M_INVENTORY_LISTCREATE.xml
---
(0072564)
umartirena   
2014-12-16 16:25   
Code review and Testing Done.

Issue was fixed by Reinaldo Guerra.
(0073223)
hudsonbot   
2014-12-30 23:27   
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/6525fe229e06 [^]
Maturity status: Test