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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0015065
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 00. Application dictionarymajoralways2010-10-28 12:532010-12-16 22:16
ReporternetworkbView Statuspublic 
Assigned Toalostale 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisiond40391416375
ProjectionnoneETAnoneTarget Version2.50MP25
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.50MP22SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0015065: A column with a reference (TABLE) that have a Display Column doesn't work

DescriptionA column with a reference (TABLE) that have a Display Column with this characteristics doesn't work:
1.- Column Name not equal TableName_ID
2.- Reference: Search

This error appears in the log:


ERROR org.openbravo.erpCommon.utility.ComboTableData - Error of SQL in query: SELECT td0.C_Invoice_ID AS ID, , '' AS DESCRIPTION
FROM C_Invoice td0
left join EM_Mo_Sea td1 on td0.EM_Mo_Search = td1.EM_Mo_Search
AND td1.AD_Client_ID IN ('0','1000000')
AND td1.AD_Org_ID IN ('1000000','1000002','1000003','1000004','1000005','1000006','1000008','1000009','1000007','0')
WHERE td0.AD_Client_ID IN ('0','1000000')
AND td0.AD_Org_ID IN ('1000000','1000002','1000003','1000004','1000005','1000006','1000008','1000009','1000007','0')
AND (td0.isActive = 'Y' OR td0.C_Invoice_ID = (?) )


Reported by XME
Ticket: 9762

Steps To Reproduce- As System Administrator go to Application Dictionary || Module
- Create a module:
      - DB Prefix: MO

- Create a new column in C_order
      - alter table c_order add EM_MO_column varchar(25)
      - alter table c_invoice add EM_MO_search varchar(25)

- As System Administrator go to Application Dictionary || Tables and Columns
- select c_invoice and go to the new column (EM_MO_search)
      - Reference: Search
      - Reference Search Key: Location

- As System administrator go to Application Dictionary || Reference || Reference
- Create a new reference:
      - Name: new reference
      - Parent Reference: table
- Go to Table reference:
      - Table: C_Invoice
      - key column: C_Invoice_Id
      - Display column: EM_MO_search

- As System Administrator go to Application Dictionary || Tables and Columns
- Select c_order and go to the new column.
      - reference: table
      - Reference Search Key: new reference

- Go to Application Dictionary || Windows, Tabs, and Fields
- Create a new field in Sales Order
      - Column: EM_MO_Column

- compile and restart tomcat
- As Openbravo Admin go to Sales Order
- realize that the window does not work
TagsNo tags attached.
Attached Files? file icon org.test-1.0.0.obx [^] (6,586 bytes) 2010-11-22 10:20

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0032300)
rafademiguel (developer)
2010-10-28 13:16

I think the problem is....

When comboTableData are going to get the identifier value for the combo use the method "setTableDirQuery"

  private void identifier(String tableName, FieldProvider field) throws Exception {....

case 30: // Search
      setTableDirQuery(tableName, ((field == null) ? "" : field.getField("name")),
          ((field == null) ? "" : field.getField("name")));
......
......


this methods is suppose to be used only when the name of the column are TableName_ID because to get the identifier/s execute:

  private void setTableDirQuery(String tableName, String fieldName, String parentFieldName)
      throws Exception {
.......
tableDirName = name.substring(0, name.length() - 3);
.......
ComboTableQueryData trd[] = ComboTableQueryData.identifierColumns(getPool(), tableDirName);
......
......

because the name of the column is not TableName_ID this query returns nothing and the combo can't be constructed
(0032738)
alostale (manager)
2010-11-19 13:37

attached test obx file to reproduce the issue
(0032776)
hgbot (developer)
2010-11-22 10:22

Repository: erp/devel/pi
Changeset: d403914163758c9116a53a65cc3c7d9cbbf04990
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Nov 22 10:22:01 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d403914163758c9116a53a65cc3c7d9cbbf04990 [^]

fixed bug 15065: not possible to use column wihtou followin tableDir convention
            for a table reference

---
M src/org/openbravo/reference/ui/UITableDir.java
---
(0032929)
hudsonbot (developer)
2010-11-30 17:51

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/d40391416375 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/7c27b4b566df [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.19017.obx [^]
(0033152)
marvintm (developer)
2010-12-14 11:03

The provided example works fine.

- Issue History
Date Modified Username Field Change
2010-10-28 12:53 networkb New Issue
2010-10-28 12:53 networkb Assigned To => alostale
2010-10-28 13:16 rafademiguel Note Added: 0032300
2010-10-28 13:18 rafademiguel Issue Monitored: rafademiguel
2010-11-02 07:54 alostale Target Version 2.50MP24 => 2.50MP25
2010-11-02 07:56 alostale Status new => scheduled
2010-11-19 13:37 alostale File Added: org.test-1.0.0.obx
2010-11-19 13:37 alostale Note Added: 0032738
2010-11-22 10:20 alostale File Deleted: org.test-1.0.0.obx
2010-11-22 10:20 alostale File Added: org.test-1.0.0.obx
2010-11-22 10:22 hgbot Checkin
2010-11-22 10:22 hgbot Note Added: 0032776
2010-11-22 10:22 hgbot Status scheduled => resolved
2010-11-22 10:22 hgbot Resolution open => fixed
2010-11-22 10:22 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d403914163758c9116a53a65cc3c7d9cbbf04990 [^]
2010-11-30 17:51 hudsonbot Checkin
2010-11-30 17:51 hudsonbot Note Added: 0032929
2010-12-14 11:03 marvintm Note Added: 0033152
2010-12-14 11:03 marvintm Status resolved => closed
2010-12-16 22:16 anonymous sf_bug_id 0 => 3138790


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker