Openbravo Issue Tracking System - Openbravo ERP | |||||||||||||||||||
View Issue Details | |||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||
0004864 | Openbravo ERP | 00. Application dictionary | public | 2008-09-09 09:12 | 2008-12-16 13:10 | ||||||||||||||
Reporter | rafaroda | ||||||||||||||||||
Assigned To | rafaroda | ||||||||||||||||||
Priority | high | Severity | minor | Reproducibility | always | ||||||||||||||
Status | closed | Resolution | fixed | ||||||||||||||||
Platform | OS | 20 | OS Version | Ubuntu 7.10 | |||||||||||||||
Product Version | pi | ||||||||||||||||||
Target Version | Fixed in Version | ||||||||||||||||||
Merge Request Status | |||||||||||||||||||
Review Assigned To | |||||||||||||||||||
OBNetwork customer | No | ||||||||||||||||||
Web browser | |||||||||||||||||||
Modules | Core | ||||||||||||||||||
Support ticket | |||||||||||||||||||
Regression level | |||||||||||||||||||
Regression date | |||||||||||||||||||
Regression introduced in release | |||||||||||||||||||
Regression introduced by commit | |||||||||||||||||||
Triggers an Emergency Pack | No | ||||||||||||||||||
Summary | 0004864: AD_COLUMN_IDENTIFIER does not work correctly for 'M_Product' table | ||||||||||||||||||
Description | In some files [1] [2] [3], AD_COLUMN_IDENTIFIER is used, for instance, as: AD_COLUMN_IDENTIFIER(TO_CHAR('M_Product'), TO_CHAR(T.M_PRODUCT_ID), TO_CHAR('es_ES')) in order to get the name of a product in Spanish, if this product has a translation to Spanish. [1] https://dev.openbravo.com/websvn/openbravo/trunk/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java [^] [2] https://dev.openbravo.com/websvn/openbravo/trunk/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesJR.java [^] [3] https://dev.openbravo.com/websvn/openbravo/trunk/src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java [^] | ||||||||||||||||||
Steps To Reproduce | 1) Set a Spanish translation for the product with M_Product_Id = 1000001 (Telephone) inside 'Master Data Management || Product || Product >> Translation' 2) Execute (being 1000001 the ID of the product - M_Product_Id): select AD_COLUMN_IDENTIFIER('M_Product', '1000001', 'es_ES') from dual; You still get the name 'Telephone' in 'en_US'. | ||||||||||||||||||
Proposed Solution | If you inspect AD_COLUMN_IDENTIFIER function, you find: SELECT REPLACE(REPLACE(SQL_RECORD_IDENTIFIER, ':c_language', '''' || p_Language || ''''), ':c_ID', p_Record_ID) INTO v_SQL FROM AD_TABLE WHERE UPPER(TABLENAME)=UPPER(p_TableName) ; If you execute: SELECT REPLACE(REPLACE(SQL_RECORD_IDENTIFIER, ':c_language', '''' || 'es_ES' || ''''), ':c_ID', '1000001') FROM AD_TABLE WHERE UPPER(TABLENAME)=UPPER('M_Product') ; You get the SQL: SELECT TO_CHAR(COALESCE(TO_CHAR(T.Name),'')) AS COLUMN_IDENTIFIER FROM (SELECT AD_LANGUAGE FROM AD_LANGUAGE WHERE AD_LANGUAGE='es_ES') L, M_Product T WHERE M_Product_ID='1000001' Then, inside AD_COLUMN_IDENTIFIER function, this SQL sentence is executed. You can notice that there is no reference to M_Product_Trl table so you will never get the Spanish translation of the product. | ||||||||||||||||||
Additional Information | |||||||||||||||||||
Tags | No tags attached. | ||||||||||||||||||
Relationships |
| ||||||||||||||||||
Attached Files | |||||||||||||||||||
Issue History | |||||||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||||||
2008-09-09 09:12 | rafaroda | New Issue | |||||||||||||||||
2008-09-09 09:12 | rafaroda | Assigned To | => cromero | ||||||||||||||||
2008-09-09 09:12 | rafaroda | sf_bug_id | 0 => 2101536 | ||||||||||||||||
2008-09-09 09:12 | rafaroda | OBNetwork customer | => No | ||||||||||||||||
2008-09-09 09:12 | rafaroda | Regression testing | => No | ||||||||||||||||
2008-09-09 09:23 | rafaroda | Relationship added | blocks 0004865 | ||||||||||||||||
2008-09-09 09:38 | rafaroda | Assigned To | cromero => alostale | ||||||||||||||||
2008-09-09 17:07 | rafaroda | Note Added: 0008950 | |||||||||||||||||
2008-09-09 17:16 | rafaroda | Assigned To | alostale => rafaroda | ||||||||||||||||
2008-09-09 17:16 | rafaroda | Severity | major => minor | ||||||||||||||||
2008-09-09 17:16 | rafaroda | Summary | AD_COLUMN_IDENTIFIER does not work => AD_COLUMN_IDENTIFIER does not work correctly for 'M_Product' table | ||||||||||||||||
2008-09-09 17:16 | rafaroda | Status | new => scheduled | ||||||||||||||||
2008-09-09 17:16 | rafaroda | fix_in_branch | => trunk | ||||||||||||||||
2008-09-10 09:45 | svnbot | Checkin | |||||||||||||||||
2008-09-10 09:45 | svnbot | Note Added: 0008966 | |||||||||||||||||
2008-09-10 09:45 | svnbot | Status | scheduled => resolved | ||||||||||||||||
2008-09-10 09:45 | svnbot | Resolution | open => fixed | ||||||||||||||||
2008-09-10 09:45 | svnbot | svn_revision | => 7139 | ||||||||||||||||
2008-12-16 13:10 | psarobe | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|