Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038877Retail ModulesWeb POSpublic2018-07-03 09:042018-07-04 17:38
caristu 
caristu 
urgentminorhave not tried
closedfixed 
5
 
 
migueldejuana
No
0038877: incorrect query in TaxZone model
The HQL query defined in the getQuery method of the TaxZone model has incorrect bracket balance.

Hibernate 3.6 allows it whereas it is not allowed in newer versions.
1. Using Hibernate 5.3 (https://code.openbravo.com/erp/devel/pi-hb53 [^])
2. Login in WebPOS
  -> ERROR:
     ....
     org.openbravo.mobile.core.process.ProcessHQLQuery - org.openbravo.retail.posterminal.master.TaxZone: Error when generating query: null (org.hibernate.hql.internal.ast.QuerySyntaxException: expecting EOF, found ')' near line 7, column 1330 [select financialMgmtTaxZone.id as id,
financialMgmtTaxZone.tax.id as tax,
financialMgmtTaxZone.fromCountry.id as fromCountry,
financialMgmtTaxZone.destinationCountry.id as destinationCountry,
financialMgmtTaxZone.fromRegion.id as fromRegion,
financialMgmtTaxZone.destinationRegion.id as destinationRegion,
financialMgmtTaxZone.active as active from FinancialMgmtTaxZone as financialMgmtTaxZone where ( (financialMgmtTaxZone.client.id in ('39363B0921BB4293B48383844325E84C', '0')) ) AND ( financialMgmtTaxZone.organization.id in (:valueEqArray0 )) AND ( financialMgmtTaxZone.updated> :valueDate1 ) and financialMgmtTaxZone.tax in (select financialMgmtTaxRate.id from FinancialMgmtTaxRate as financialMgmtTaxRate where financialMgmtTaxRate.salesPurchaseType in ('S', 'B') and (financialMgmtTaxRate.country.id = :fromCountryId or (financialMgmtTaxRate.country is null and (not exists (select z from FinancialMgmtTaxZone as z where z.tax = financialMgmtTaxRate)) or exists (select z from FinancialMgmtTaxZone as z where z.tax = financialMgmtTaxRate and z.fromCountry.id = :fromCountryId ) or exists (select z from FinancialMgmtTaxZone as z where z.tax = financialMgmtTaxRate and z.fromCountry is null)))and (financialMgmtTaxRate.region.id = :fromRegionId or (financialMgmtTaxRate.region is null and (not exists (select z from FinancialMgmtTaxZone as z where z.tax = financialMgmtTaxRate)) or exists (select z from FinancialMgmtTaxZone as z where z.tax = financialMgmtTaxRate and z.fromRegion.id = :fromRegionId ) or exists (select z from FinancialMgmtTaxZone as z where z.tax = financialMgmtTaxRate and z.fromRegion is null)))))and (financialMgmtTaxZone.fromCountry.id = :fromCountryId or financialMgmtTaxZone.fromCountry is null) and (financialMgmtTaxZone.fromRegion.id = :fromRegionId or financialMgmtTaxZone.fromRegion is null) order by financialMgmtTaxZone.id asc])
...
See attached file with the proposal
No tags attached.
blocks feature request 0037064 closed caristu Openbravo ERP upgrade hibernate to 5.3.2 
diff taxZone.diff (986) 2018-07-03 09:04
https://issues.openbravo.com/file_download.php?file_id=11926&type=bug
Issue History
2018-07-03 09:04caristuNew Issue
2018-07-03 09:04caristuAssigned To => platform
2018-07-03 09:04caristuFile Added: taxZone.diff
2018-07-03 09:04caristuModules => Core
2018-07-03 09:04caristuTriggers an Emergency Pack => No
2018-07-03 09:04caristuIssue generated from0038735
2018-07-03 09:04caristuProjectOpenbravo ERP => Retail Modules
2018-07-03 09:05caristuAssigned Toplatform => Retail
2018-07-03 09:05caristuCategoryA. Platform => Aging Balance Report
2018-07-03 09:05caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17366#r17366
2018-07-03 09:05caristuCategoryAging Balance Report => Web POS
2018-07-03 09:05caristuRelationship addedblocks 0037064
2018-07-03 09:06caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17367#r17367
2018-07-03 09:06caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17368#r17368
2018-07-03 10:05hgbotCheckin
2018-07-03 10:05hgbotNote Added: 0105539
2018-07-03 10:05hgbotStatusnew => resolved
2018-07-03 10:05hgbotResolutionopen => fixed
2018-07-03 10:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dbb1d539c50a9e731c6433f01d63d6baa70ed728 [^]
2018-07-03 10:06caristuReview Assigned To => migueldejuana
2018-07-03 10:06caristuAssigned ToRetail => caristu
2018-07-04 17:38migueldejuanaNote Added: 0105594
2018-07-04 17:38migueldejuanaStatusresolved => closed

Notes
(0105539)
hgbot   
2018-07-03 10:05   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: dbb1d539c50a9e731c6433f01d63d6baa70ed728
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Jul 03 10:03:18 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dbb1d539c50a9e731c6433f01d63d6baa70ed728 [^]

fixes issue 38877: query for the TaxZone model has incorrect bracket balance

---
M src/org/openbravo/retail/posterminal/master/TaxZone.java
---
(0105594)
migueldejuana   
2018-07-04 17:38   
Tested and reviewed