Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0026317Openbravo ERPA. Platformpublic2014-04-18 08:232014-05-07 18:12
jecharri 
alostale 
immediatemajoralways
closedfixed 
5
pi 
3.0PR14Q23.0PR14Q2 
AugustoMauch
Google Chrome
Core
QA functional test
2014-01-07
https://code.openbravo.com/erp/devel/pi/rev/46ec5ec2839da79ae27a5225c105c85ecde1cf6a [^]
Yes
0026317: Product selector is not working when you try to filter by warehouse
Product selector is not working find when you try to filter by warehouse
-Go to Goods shipment window
-Create a header
-Create a line
-Open product selector in a window
-Remove the filters

Now, if you try to filter by warehouse you will see that the filter says --> No items to show
No tags attached.
related to defect 00251823.0PR14Q2 closed alostale Query in org drop down in the list field is having bad performance 
Issue History
2014-04-18 08:23jecharriNew Issue
2014-04-18 08:23jecharriAssigned To => AugustoMauch
2014-04-18 08:23jecharriWeb browser => Google Chrome
2014-04-18 08:23jecharriModules => Core
2014-04-18 08:23jecharriResolution time => 1398290400
2014-04-18 08:23jecharriTriggers an Emergency Pack => No
2014-04-18 08:26jecharriWeb browserGoogle Chrome => Google Chrome
2014-04-18 08:26jecharriRegression level => QA functional test
2014-04-18 08:26jecharriTriggers an Emergency PackNo => Yes
2014-04-22 08:01alostaleNote Added: 0066520
2014-04-22 08:37alostaleRelationship addedrelated to 0025182
2014-04-22 08:38alostaleWeb browserGoogle Chrome => Google Chrome
2014-04-22 08:38alostaleRegression date => 2014-01-07
2014-04-22 08:38alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/46ec5ec2839da79ae27a5225c105c85ecde1cf6a [^]
2014-04-22 08:38alostaleSummaryProduct selector is not working find when you try to filter by warehouse => Product selector is not working when you try to filter by warehouse
2014-04-22 09:07alostaleAssigned ToAugustoMauch => alostale
2014-04-22 09:19alostaleNote Added: 0066521
2014-04-22 09:22alostaleReview Assigned To => AugustoMauch
2014-04-22 09:22alostaleWeb browserGoogle Chrome => Google Chrome
2014-04-22 09:23hgbotCheckin
2014-04-22 09:23hgbotNote Added: 0066522
2014-04-22 09:23hgbotStatusnew => resolved
2014-04-22 09:23hgbotResolutionopen => fixed
2014-04-22 09:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/bde8cc5b9fd9c55ad08b65efe2917a37c26cbf01 [^]
2014-04-22 10:00AugustoMauchNote Added: 0066523
2014-04-22 10:00AugustoMauchStatusresolved => closed
2014-04-22 10:00AugustoMauchFixed in Version => PR14Q2
2014-04-22 10:15hgbotCheckin
2014-04-22 10:15hgbotNote Added: 0066524
2014-04-22 13:52hgbotCheckin
2014-04-22 13:52hgbotNote Added: 0066529
2014-05-07 18:11hudsonbotCheckin
2014-05-07 18:12hudsonbotNote Added: 0066955
2014-05-07 18:12hudsonbotCheckin
2014-05-07 18:12hudsonbotNote Added: 0066956
2014-05-07 18:12hudsonbotCheckin
2014-05-07 18:12hudsonbotNote Added: 0066958

Notes
(0066520)
alostale   
2014-04-22 08:01   
This error is raised:
595dbc4c 343143 [http-8080-2] ERROR org.openbravo.base.exception.OBException - Exception when creating query select me from Warehouse as me where ( me.organization in ('E443A31992CB4635AFCAEABE7183CE85','0','19404EAD144C49A0AF37D54377CF452D','B843C30461EA4501935CB1D125C9C25A') and exists (select 1 from ProductStockView as e left join e.storageBin as join_0 left join join_0.warehouse as join_1 left join e.product as join_2 where ((( upper((COALESCE(to_char(join_0.searchKey),''))) like upper(:alias_0) escape '|' and upper((COALESCE(to_char(join_1.name),''))) like upper(:alias_1) escape '|' )) and e.organization in ('E443A31992CB4635AFCAEABE7183CE85','0','19404EAD144C49A0AF37D54377CF452D','B843C30461EA4501935CB1D125C9C25A') ) and (e.active='Y' and ( ('169' in ('800051', '800052', '800096') and e.product.production = true and e.stocked = false) or ('169' in ('170') and e.product.stocked = true) or '169' not in ('800051', '800052', '800096','170'))) and e.warehouse = me and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '4735EFF4E48E42A7A84E9B5AEFDBAFDD', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')) )order by me.name
org.hibernate.QueryException: could not resolve property: warehouse of: ProductStockView [select me from Warehouse as me where ( me.organization in ('E443A31992CB4635AFCAEABE7183CE85','0','19404EAD144C49A0AF37D54377CF452D','B843C30461EA4501935CB1D125C9C25A') and exists (select 1 from ProductStockView as e left join e.storageBin as join_0 left join join_0.warehouse as join_1 left join e.product as join_2 where ((( upper((COALESCE(to_char(join_0.searchKey),''))) like upper(:alias_0) escape '|' and upper((COALESCE(to_char(join_1.name),''))) like upper(:alias_1) escape '|' )) and e.organization in ('E443A31992CB4635AFCAEABE7183CE85','0','19404EAD144C49A0AF37D54377CF452D','B843C30461EA4501935CB1D125C9C25A') ) and (e.active='Y' and ( ('169' in ('800051', '800052', '800096') and e.product.production = true and e.stocked = false) or ('169' in ('170') and e.product.stocked = true) or '169' not in ('800051', '800052', '800096','170'))) and e.warehouse = me and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '4735EFF4E48E42A7A84E9B5AEFDBAFDD', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')) )order by me.name]
(0066521)
alostale   
2014-04-22 09:19   
It fails when trying to filter by a property that is not directly in the main entity. In this case main entity is ProductStockView, and warehouse is reached through storageBin.warehouse.
(0066522)
hgbot   
2014-04-22 09:23   
Repository: erp/devel/pi
Changeset: bde8cc5b9fd9c55ad08b65efe2917a37c26cbf01
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Apr 22 09:22:32 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/bde8cc5b9fd9c55ad08b65efe2917a37c26cbf01 [^]

fixed bug 26317: cannot filter by properties not in main entity

  Adding complete path to filtered property, so it works even it is not
  a direct property of the main entity but it is reached through a path

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DataEntityQueryService.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
---
(0066523)
AugustoMauch   
2014-04-22 10:00   
Code reviewed and verified in pi@bde8cc5b9fd9
(0066524)
hgbot   
2014-04-22 10:15   
Repository: erp/devel/pi
Changeset: 3d8b217d74c19ea89bccb273063c05110eabe782
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Apr 22 10:15:36 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3d8b217d74c19ea89bccb273063c05110eabe782 [^]

related to issue 26317: added test case

---
M src-test/org/openbravo/test/AllWebserviceTests.java
A src-test/org/openbravo/test/datasource/ProductSelectorDataSourceTest.java
---
(0066529)
hgbot   
2014-04-22 13:52   
Repository: erp/devel/pi
Changeset: 44096d49148a53e911048d5d109bb7b646ce3e80
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Apr 22 13:52:02 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/44096d49148a53e911048d5d109bb7b646ce3e80 [^]

related to issue 26317: fixed test case

ensure proper profile

---
M src-test/org/openbravo/test/datasource/ProductSelectorDataSourceTest.java
---
(0066955)
hudsonbot   
2014-05-07 18:12   
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/02ca2648bcdc [^]
Maturity status: Test
(0066956)
hudsonbot   
2014-05-07 18:12   
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/02ca2648bcdc [^]
Maturity status: Test
(0066958)
hudsonbot   
2014-05-07 18:12   
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/02ca2648bcdc [^]
Maturity status: Test