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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027253
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2014-07-31 19:372014-08-04 08:58
ReportercaristuView Statuspublic 
Assigned Toshankarb 
PriorityhighResolutionunable to reproduceFixed in Version
StatusclosedFix in branchpiFixed in SCM revision
ProjectionnoneETAnoneTarget Version3.0PR14Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toshankarb
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0027253: @additional_filters@ is not working as expected in HQL query selectors

DescriptionThe @additional_filters@ appends automatically the implicit filter by Client and accessible Organizations[1]. This is not applied properly under some circumstances.


[1] http://wiki.openbravo.com/wiki/Selector_Example [^]
Steps To Reproduce1) Log-in as F&B International Group Admin, create a new sales price list for F&B International Group. Set it as default.
2) Add one product from F&B España and another one from F&B US to the price list
3) Log-in as F&B España Admin, Go to the [Sales Invoice] window and create a new record for F&B España
4) Go to the [Lines] tab and click on the product selector. Notice that it is possible to select the product from F&B US.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00272523.0PR14Q4 closedvmromanos Invoice lines with products that doesn't belong to the natural tree of the organization in the header 

-  Notes
(0069057)
shankarb (reporter)
2014-08-04 08:58

The @additional_filters@ are applied correctly. They are applied on the base table of the hql query.

Here is the selector query and the second one is the query at runtime. if you check, the additional org filters are applied properly, but it is being applied on the base table PricingProductPrice pp and not on product e.

Selector Query:
select e.searchKey as searchKey, e.id as id, plv as priceListVersion, plv.name as priceListVersionName, c.id as currency, pp.priceLimit as priceLimit, e.name as productName, e.uOM as uOM, pp.standardPrice as standardPrice, pp.listPrice as netListPrice, pl.salesPriceList as salesPriceList, e.characteristicDescription as chDescription, gp.name as genericProduct
from PricingProductPrice pp
join pp.product e
join pp.priceListVersion plv
join plv.priceList pl
left join pl.currency c
left join e.genericProduct gp
where e.isGeneric = 'N'
and plv.active = 'Y'
  and @additional_filters@

Runtime Query:
QueryImpl(select e.searchKey as searchKey, e.id as id, plv as priceListVersion, plv.name as priceListVersionName, c.id as currency, pp.priceLimit as priceLimit, e.name as productName, e.uOM as uOM, pp.standardPrice as standardPrice, pp.listPrice as netListPrice, pl.salesPriceList as salesPriceList, e.characteristicDescription as chDescription, gp.name as genericProduct
from PricingProductPrice pp
join pp.product e
join pp.priceListVersion plv
join plv.priceList pl
left join pl.currency c
left join e.genericProduct gp
where e.isGeneric = 'N'
and plv.active = 'Y'
  and pp.client.id in ('0', '23C59575B9CF467C9620760EB255B389')
 AND pp.organization in ('E443A31992CB4635AFCAEABE7183CE85','0','19404EAD144C49A0AF37D54377CF452D','B843C30461EA4501935CB1D125C9C25A')
 AND ( pl.salesPriceList = true AND c.id = '102')
 AND lower(plv.name) LIKE '%04-08-2014%'
 ORDER BY 7)

Updated the wiki, http://wiki.openbravo.com/wiki/Selector_Example [^] to reflect where the additional filters will be applied.

- Issue History
Date Modified Username Field Change
2014-07-31 19:37 caristu New Issue
2014-07-31 19:37 caristu Assigned To => AugustoMauch
2014-07-31 19:37 caristu Modules => Core
2014-07-31 19:37 caristu Resolution time => 1407967200
2014-07-31 19:37 caristu Triggers an Emergency Pack => No
2014-07-31 19:37 caristu Issue Monitored: networkb
2014-07-31 19:37 caristu Relationship added related to 0027252
2014-07-31 19:39 caristu Steps to Reproduce Updated View Revisions
2014-07-31 19:42 caristu Resolution time 1407967200 => 1408658400
2014-07-31 19:43 caristu Target Version => 3.0PR14Q4
2014-08-04 06:16 shankarb Assigned To AugustoMauch => shankarb
2014-08-04 06:16 shankarb Status new => scheduled
2014-08-04 06:16 shankarb fix_in_branch => pi
2014-08-04 08:58 shankarb Review Assigned To => shankarb
2014-08-04 08:58 shankarb Note Added: 0069057
2014-08-04 08:58 shankarb Status scheduled => closed
2014-08-04 08:58 shankarb Resolution open => unable to reproduce


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker