Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #38734 All Revisions ] Back to Issue ]
Summary 0038734: Default Expression of Field in OBUISEL_Selector definition is mixing js and hql expressions, and is not working in all scenarios
Revision 2018-06-11 18:42 by dmiguelez
Steps To Reproduce As System Admin

Go to Reference window and look for one named Product Complete.
Move to Defined Selector || Defined Selector field Tab
Look for the field named Quantity on Hand.
In the Default Expression field put: '>0'

Change Role to F&B Admin

Go to Goods Shipment Window. Create a header.
Move to lines and click on the Product selector.
Clicking on the magnifying glass works, the expression >0 is used to pre-filter the grid.

Clicking on the arrow for the drop down list throws this error in the log:
4026063 [http-bio-8080-exec-3] ERROR org.hibernate.hql.PARSER - line 1:982: unexpected token: >
4026064 [http-bio-8080-exec-3] ERROR org.openbravo.service.json.DefaultJsonDataService - Exception when creating query select e from ProductStockView as e left join e.product as join_0 where ( ( e.organization in ('0','097E2B5F86394085B84832391860905E','E70BD74CE0E4432D9A8B22C43B12CD4C','BF67B59606F643E08CCC51A1CD93ECD5','B9BA55A1633440C4B8BAB5A66A569A10') ) and (e.active='Y' and ( ('169' in ('800051', '800052', '800096') and e.product.production = true and e.stocked = false) or ('169' in ('800053', 'FF808181323E504701323E57E08D0017') and e.product.production = true) or ('169' in ('170') and e.product.stocked = true) or ('169' in ('800092') and e.product.purchase = true) or ('169' in ('169') and (e.warehouse.id is null or e.warehouse.id in (select ow.warehouse.id from OrganizationWarehouse ow where ow.organization.id = 'BF67B59606F643E08CCC51A1CD93ECD5'))) or '169' not in ('800051', '800052', '800053', 'FF808181323E504701323E57E08D0017', '800096','170','800092','169')) and e.storageBin.warehouse.id = 'F7E634AE3D904FE6B8503D604ED2C5B5' and e.stocked = true and e.quantityOnHand = >0) ) and e.client.id in (:_dal_readableClients_dal_) and e.active='Y' order by join_0.name,join_0.id
org.openbravo.base.exception.OBException: Exception when creating query select e from ProductStockView as e left join e.product as join_0 where ( ( e.organization in ('0','097E2B5F86394085B84832391860905E','E70BD74CE0E4432D9A8B22C43B12CD4C','BF67B59606F643E08CCC51A1CD93ECD5','B9BA55A1633440C4B8BAB5A66A569A10') ) and (e.active='Y' and ( ('169' in ('800051', '800052', '800096') and e.product.production = true and e.stocked = false) or ('169' in ('800053', 'FF808181323E504701323E57E08D0017') and e.product.production = true) or ('169' in ('170') and e.product.stocked = true) or ('169' in ('800092') and e.product.purchase = true) or ('169' in ('169') and (e.warehouse.id is null or e.warehouse.id in (select ow.warehouse.id from OrganizationWarehouse ow where ow.organization.id = 'BF67B59606F643E08CCC51A1CD93ECD5'))) or '169' not in ('800051', '800052', '800053', 'FF808181323E504701323E57E08D0017', '800096','170','800092','169')) and e.storageBin.warehouse.id = 'F7E634AE3D904FE6B8503D604ED2C5B5' and e.stocked = true and e.quantityOnHand = >0) ) and e.client.id in (:_dal_readableClients_dal_) and e.active='Y' order by join_0.name,join_0.id
    at org.openbravo.dal.service.OBQuery.createQuery(OBQuery.java:266)
Revision 2018-06-11 18:41 by dmiguelez
Steps To Reproduce As System Admin

Go to Reference window and look for one named Product Complete.
Move to Defined Selector || Defined Selector field Tab
Look for the field named Quantity on Hand.
In the Default Expression field put: '>0'

Change Role to F&B Admin

Go to Goods Shipment Window. Create a header.
Move to lines and click on the Product selector.
Clicking on the magnifying glass works, the expression >0 is used to pre-filter the grid.
Clicking on the arrow for the drop down list throws this error in the log:
4026063 [http-bio-8080-exec-3] ERROR org.hibernate.hql.PARSER - line 1:982: unexpected token: >
4026064 [http-bio-8080-exec-3] ERROR org.openbravo.service.json.DefaultJsonDataService - Exception when creating query select e from ProductStockView as e left join e.product as join_0 where ( ( e.organization in ('0','097E2B5F86394085B84832391860905E','E70BD74CE0E4432D9A8B22C43B12CD4C','BF67B59606F643E08CCC51A1CD93ECD5','B9BA55A1633440C4B8BAB5A66A569A10') ) and (e.active='Y' and ( ('169' in ('800051', '800052', '800096') and e.product.production = true and e.stocked = false) or ('169' in ('800053', 'FF808181323E504701323E57E08D0017') and e.product.production = true) or ('169' in ('170') and e.product.stocked = true) or ('169' in ('800092') and e.product.purchase = true) or ('169' in ('169') and (e.warehouse.id is null or e.warehouse.id in (select ow.warehouse.id from OrganizationWarehouse ow where ow.organization.id = 'BF67B59606F643E08CCC51A1CD93ECD5'))) or '169' not in ('800051', '800052', '800053', 'FF808181323E504701323E57E08D0017', '800096','170','800092','169')) and e.storageBin.warehouse.id = 'F7E634AE3D904FE6B8503D604ED2C5B5' and e.stocked = true and e.quantityOnHand = >0) ) and e.client.id in (:_dal_readableClients_dal_) and e.active='Y' order by join_0.name,join_0.id
org.openbravo.base.exception.OBException: Exception when creating query select e from ProductStockView as e left join e.product as join_0 where ( ( e.organization in ('0','097E2B5F86394085B84832391860905E','E70BD74CE0E4432D9A8B22C43B12CD4C','BF67B59606F643E08CCC51A1CD93ECD5','B9BA55A1633440C4B8BAB5A66A569A10') ) and (e.active='Y' and ( ('169' in ('800051', '800052', '800096') and e.product.production = true and e.stocked = false) or ('169' in ('800053', 'FF808181323E504701323E57E08D0017') and e.product.production = true) or ('169' in ('170') and e.product.stocked = true) or ('169' in ('800092') and e.product.purchase = true) or ('169' in ('169') and (e.warehouse.id is null or e.warehouse.id in (select ow.warehouse.id from OrganizationWarehouse ow where ow.organization.id = 'BF67B59606F643E08CCC51A1CD93ECD5'))) or '169' not in ('800051', '800052', '800053', 'FF808181323E504701323E57E08D0017', '800096','170','800092','169')) and e.storageBin.warehouse.id = 'F7E634AE3D904FE6B8503D604ED2C5B5' and e.stocked = true and e.quantityOnHand = >0) ) and e.client.id in (:_dal_readableClients_dal_) and e.active='Y' order by join_0.name,join_0.id
    at org.openbravo.dal.service.OBQuery.createQuery(OBQuery.java:266)


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker