Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029448Openbravo ERP07. Sales managementpublic2015-02-10 12:422015-04-10 10:13
ngarcia 
reinaldoguerra 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q1.33.0PR15Q1.3 
umartirena
Core
Production - Confirmed Stable
2014-02-20
3.0PR14Q2
https://code.openbravo.com/erp/devel/pi/rev/0b033ca5bd1b08e81a30cfdbab2b459549d8c17c [^]
No
0029448: Cannot filter the Manage Reservation Stock pop-up of Sales Order window
Cannot filter the Manage Reservation Stock pop-up of Sales Order window
As group admin role:
   Set the Enable Stock Reservation preference to 'Y'
   Create a Sales Order with a product that has stock and book it
   Go to the line and open the Manage Reservation pop-up
   Filter by warehouse and check no records are shown
   Clean the filter and check the records are not shown
   The logs shows:
ERROR org.openbravo.client.kernel.KernelUtils - id to load is required for loading
java.lang.IllegalArgumentException: id to load is required for loading
    at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:89)
    at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:61)
    at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1002)
    at org.openbravo.dal.core.SessionHandler.find(SessionHandler.java:219)
    at org.openbravo.dal.core.SessionHandler.find(SessionHandler.java:202)
    at org.openbravo.dal.service.OBDal.get(OBDal.java:298)
    at org.openbravo.common.datasource.StockReservationPickAndEditDataSource.getFilteredWarehouse(StockReservationPickAndEditDataSource.java:235)
...
Approved
blocks defect 00289073.0PR15Q3 closed reinaldoguerra Cannot filter the Manage Reservation Stock pop-up of Sales Order window 
Issue History
2015-03-27 14:49aferrazTypedefect => backport
2015-03-27 14:49aferrazTarget Version3.0PR15Q3 => 3.0PR15Q1.3
2015-04-09 12:44hgbotCheckin
2015-04-09 12:44hgbotNote Added: 0076410
2015-04-09 12:44hgbotStatusscheduled => resolved
2015-04-09 12:44hgbotResolutionopen => fixed
2015-04-09 12:44hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/4f00f31f65e1024bf0a9e985297f8bef5746b68f [^] => http://code.openbravo.com/erp/backports/3.0PR15Q1.3/rev/9a563be5f58d3772b4bcd1be275cab2a6d506243 [^]
2015-04-09 12:44hgbotCheckin
2015-04-09 12:44hgbotNote Added: 0076413
2015-04-09 12:45umartirenaReview Assigned Toaferraz => umartirena
2015-04-09 12:45umartirenaNote Added: 0076417
2015-04-09 12:45umartirenaStatusresolved => closed
2015-04-09 12:45umartirenaFixed in Version => 3.0PR15Q1.3
2015-04-09 12:46umartirenaNote Edited: 0076417bug_revision_view_page.php?bugnote_id=0076417#r8212
2015-04-10 10:13dmitry_mezentsevTag Attached: Approved

Notes
(0076410)
hgbot   
2015-04-09 12:44   
Repository: erp/backports/3.0PR15Q1.3
Changeset: 9a563be5f58d3772b4bcd1be275cab2a6d506243
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Thu Apr 09 12:26:23 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.3/rev/9a563be5f58d3772b4bcd1be275cab2a6d506243 [^]

Fixes bug 29448, Fixes bug 29447, Fixes bug 29449

The following changes was made in Stock Reservation pick and edit:
When filters are executed, a Reservation entity is created from the json parameter @MaterialMgmtReservation.id@. This works fine when the pop-up is called from Stock Reservation window, but from Sales Order, this parameter does not exists, and the filter process fails. Now is included a code line that puts a @MaterialMgmtReservation.id@ into the json parameters before the filters are applied.
Array critera filtering was bad created when getting grid's data, so was changed, to allow filter's multiple selection.
An hibernate exception is launched when typing wrong filters and the expression 'in ()' is included in the query to be executed. So this expression was replaced by one which returns a false value: '1 = 2'
Were included also, changes to allow filtering quantity's column. Other changes were included to avoid exceptions comparing to null values.

---
M src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java
---
(0076413)
hgbot   
2015-04-09 12:44   
Repository: erp/backports/3.0PR15Q1.3
Changeset: c098ff22e611aca82141585692df29bf7b675163
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Thu Apr 09 12:30:22 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.3/rev/c098ff22e611aca82141585692df29bf7b675163 [^]

Related to issue 29448: Empty filter when there is no attribute set value.

When records are created in Stock Reservation pick and edit, the 0 value retrieved from default attribute set instance, defined in reservation's tables, is now set to null, when creating filter criteria.
Now if there is no attribute set defined for reservation's products, the attribute set value filter is empty.

---
M src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java
---
(0076417)
umartirena   
2015-04-09 12:45   
(edited on: 2015-04-09 12:46)
Code Review + Testing OK

Issue fixed by Reinaldo Guerra