Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005625Openbravo ERP01. General setuppublic2008-10-23 11:392009-03-02 07:46
rafaroda 
shuehner 
immediatemajoralways
closedfixed 
20Ubuntu 7.10
pi 
2.50beta 
Core
No
0005625: Improve messaging where there is no conversion rate
When there is no conversion rate a message is displayed. It has to be fixed in two ways:
1) Only display the message, not additional error message.
2) Display the currency symbol instead of the currency ID.
3) Parse it well in PostgreSQL.
SELECT C_Currency_rate('100', '133', TO_DATE('01-01-2008'), null, '1000000', '1000000') FROM DUAL;
No tags attached.
related to defect 0005564 closed rafaroda Multi currency issues in some processes and tables 
related to defect 0007618 closed shuehner AD_MESSAGE with the search key that matches constraint name doesn't work in Postgres 
related to feature request 0004601 closed shuehner Provide way for translated db-error messages without need for hundres mostly-identical translation entries 
depends on backport 0007577 closed shuehner Improve messaging where there is no conversion rate 
related to feature request 00021812.50 closed rafaroda Currency in reports - non accounting reports 
png PurchaseOrderReportPG.png (11,290) 2009-02-20 08:37
https://issues.openbravo.com/file_download.php?file_id=883&type=bug
png

png PurchaseOrderReportORA.png (13,345) 2009-02-20 08:38
https://issues.openbravo.com/file_download.php?file_id=884&type=bug
png
Issue History
2008-10-23 11:39rafarodaNew Issue
2008-10-23 11:39rafarodaAssigned To => rafaroda
2008-10-23 11:39rafarodasf_bug_id0 => 2188971
2008-10-23 11:39rafarodaRegression testing => No
2008-10-23 11:39rafarodaRelationship addedrelated to 0005564
2008-10-26 10:54rafarodaRelationship addedrelated to 0002181
2008-10-27 10:06psarobeStatusnew => scheduled
2008-10-27 10:06psarobefix_in_branch => trunk
2008-12-17 10:08rafarodaAssigned Torafaroda => gorkaion
2009-02-13 16:52rafarodaNote Added: 0013481
2009-02-16 13:02shuehnerAssigned Togorkaion => shuehner
2009-02-16 13:03shuehnerNote Added: 0013522
2009-02-16 13:03shuehnerPrioritynormal => urgent
2009-02-16 13:03shuehnerSeverityminor => major
2009-02-16 13:03shuehnerfix_in_branchtrunk =>
2009-02-16 13:39rafarodaIssue cloned0007577
2009-02-16 13:39rafarodaRelationship addeddepends on 0007577
2009-02-18 18:25shuehnerRelationship addedrelated to 0007618
2009-02-18 18:25shuehnerRelationship addedrelated to 0004601
2009-02-19 12:35shuehnerPriorityurgent => immediate
2009-02-19 16:45svnbotCheckin
2009-02-19 16:45svnbotNote Added: 0013751
2009-02-19 16:45svnbotsvn_revision => 13409
2009-02-19 19:55svnbotCheckin
2009-02-19 19:55svnbotNote Added: 0013766
2009-02-19 19:55svnbotStatusscheduled => resolved
2009-02-19 19:55svnbotResolutionopen => fixed
2009-02-19 19:55svnbotsvn_revision13409 => 13429
2009-02-20 08:37rafarodaStatusresolved => new
2009-02-20 08:37rafarodaResolutionfixed => open
2009-02-20 08:37rafarodaNote Added: 0013782
2009-02-20 08:37rafarodaFile Added: PurchaseOrderReportPG.png
2009-02-20 08:38rafarodaFile Added: PurchaseOrderReportORA.png
2009-02-20 13:04shuehnerNote Added: 0013835
2009-02-20 14:12svnbotCheckin
2009-02-20 14:12svnbotNote Added: 0013840
2009-02-20 14:12svnbotStatusnew => resolved
2009-02-20 14:12svnbotResolutionopen => fixed
2009-02-20 14:12svnbotsvn_revision13429 => 13469
2009-02-20 19:36shuehnerStatusresolved => new
2009-02-20 19:36shuehnerResolutionfixed => open
2009-02-20 19:36shuehnerNote Added: 0013872
2009-02-22 14:25svnbotCheckin
2009-02-22 14:25svnbotNote Added: 0013884
2009-02-22 14:25svnbotStatusnew => resolved
2009-02-22 14:25svnbotResolutionopen => fixed
2009-02-22 14:25svnbotsvn_revision13469 => 13494
2009-03-02 07:41sureshbabuNote Added: 0014190
2009-03-02 07:46sureshbabuStatusresolved => closed
2009-03-02 07:46sureshbabuNote Added: 0014191
2009-03-02 07:46sureshbabuFixed in Version => trunk

Notes
(0013481)
rafaroda   
2009-02-13 16:52   
We are having a problem with database functions errors handling that is preventing us to address an OBN issue.

What we need to do is to get an error message built inside a function in a similar way that we handle messages built within procedures. The message that we get making try and catch in Java to this database function is:

javax.servlet.ServletException: @CODE=0@ERROR: @NoConversionRate@ (EUR-€) @to@ (CNY-¥) @ForDate@ '07-08-2006', @Client@ 'BigBazaar' @And@ @ACCS_AD_ORG_ID_D@ 'Main'.

This is then passed to Utility.translateError function that does not parse it 100% correctly in Oracle and does not parse it at all in PostgreSQL.

Our concern is whether we have to change something in the database function when RAISE EXCEPTION the error or our platform (Utility.translateError) is not capable to parse error messages coming from functions (in the same way it does it from procedure errors).
(0013522)
shuehner   
2009-02-16 13:03   
Updating priority/severity as this issue kind of blocks the resolution of a obn issue,
(0013751)
svnbot   
2009-02-19 16:45   
Repository: openbravo
Revision: 13409
Author: rafaroda
Date: 2009-02-19 16:45:38 +0100 (Thu, 19 Feb 2009)

Bug 0005625 Small message change.

---
U trunk/src-db/database/model/functions/C_CURRENCY_RATE.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=13409&sc=1 [^]
(0013766)
svnbot   
2009-02-19 19:55   
Repository: openbravo
Revision: 13429
Author: huehner
Date: 2009-02-19 19:55:39 +0100 (Thu, 19 Feb 2009)

Fixed 5625
Fix showing translated error messages in pl-code which contain @template@ strings on postgresql

---
U trunk/src/org/openbravo/erpCommon/utility/ErrorTextParserPOSTGRE.java
---

https://dev.openbravo.com/websvn/openbravo/?rev=13429&sc=1 [^]
(0013782)
rafaroda   
2009-02-20 08:37   
The message is still badly parsed in 'Procurement Management > Analysis Tools > Purchase Order Report'. Go this report an select an exotic currency. See screenshots.
(0013835)
shuehner   
2009-02-20 13:04   
The fix will be commited into the problem even if the cause of note 13782 is independent of this fix (parsing of error messages containing templates was broken for all reports using renderJR).
(0013840)
svnbot   
2009-02-20 14:12   
Repository: openbravo
Revision: 13469
Author: huehner
Date: 2009-02-20 14:12:01 +0100 (Fri, 20 Feb 2009)

Fixed 5625
- Fix error reporting in main catch block for all servlets to work with the error translation code.
- Improve logging of the exception handled at that location by also log its stacktrace.

---
U trunk/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---

https://dev.openbravo.com/websvn/openbravo/?rev=13469&sc=1 [^]
(0013872)
shuehner   
2009-02-20 19:36   
The change did break parsing of error messages returned by running processes (through ad_pinstance) creating the regression reported in 7721.
(0013884)
svnbot   
2009-02-22 14:25   
Repository: openbravo
Revision: 13494
Author: huehner
Date: 2009-02-22 14:25:30 +0100 (Sun, 22 Feb 2009)

Fixed 5625
Adjust for second type of callers using different pattern in input string

---
U trunk/src/org/openbravo/erpCommon/utility/ErrorTextParserPOSTGRE.java
---

https://dev.openbravo.com/websvn/openbravo/?rev=13494&sc=1 [^]
(0014190)
sureshbabu   
2009-03-02 07:41   
Getting error message as "There is no conversion rate defined from (EUR-€) to (GWP-$) for date '25-02-2009', Client 'CTS' and Organization 'Pamplona'. "


Retested in context 79.125.56.185/openbravotrunk (postgres)
(0014191)
sureshbabu   
2009-03-02 07:46   
Retested in context 79.125.56.185/openbravotrunk