Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024388Openbravo ERPA. Platformpublic2013-07-22 10:222013-10-18 13:06
egoitz 
alostale 
urgentmajoralways
closedfixed 
5
 
3.0MP293.0MP29 
AugustoMauch
Core
No
0024388: Having two different propery fields for the same column cause a problem showing both on form view
Adding two property fields that refer to the same ad_column_id cause a problem showing one of them on form view.
Also cause a problem when updating the record.

invoiceAddress.locationAddress.country
-Define a new module
-Add a new propery field on the sales order window on header window.
The propery is: invoiceAddress.locationAddress.country

After logout and loging the field is properly shown

Then a new property field:

The property is:
partnerAddress.locationAddress.country

After logout and login again you will see that only the second property field is shown with value on form view. ON grid both are properly shown.
Try to update an existing record changing any value. You will get an error.
No tags attached.
diff 24388.diff (2,690) 2013-09-30 11:58
https://issues.openbravo.com/file_download.php?file_id=6433&type=bug
Issue History
2013-07-22 10:22egoitzNew Issue
2013-07-22 10:22egoitzAssigned To => AugustoMauch
2013-07-22 10:22egoitzModules => Core
2013-07-22 10:22egoitzResolution time => 1376085600
2013-07-22 10:22egoitzTriggers an Emergency Pack => No
2013-08-20 12:11AugustoMauchAssigned ToAugustoMauch => mtaal
2013-09-02 09:48AugustoMauchTarget Version3.0MP27 => 3.0MP28
2013-09-30 09:39alostaleAssigned Tomtaal => alostale
2013-09-30 11:54alostaleReview Assigned To => shankarb
2013-09-30 11:54alostaleStatusnew => scheduled
2013-09-30 11:54alostaleTarget Version3.0MP28 => 3.0MP29
2013-09-30 11:57alostaleNote Added: 0061473
2013-09-30 11:58alostaleFile Added: 24388.diff
2013-09-30 11:59alostaleNote Added: 0061474
2013-10-16 17:36shankarbReview Assigned Toshankarb => AugustoMauch
2013-10-16 17:36shankarbIssue Monitored: AugustoMauch
2013-10-16 17:38hgbotCheckin
2013-10-16 17:38hgbotNote Added: 0061719
2013-10-16 17:38hgbotStatusscheduled => resolved
2013-10-16 17:38hgbotResolutionopen => fixed
2013-10-16 17:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4ee0b6443c3a27bbeb96c334646bb10d00147b65 [^]
2013-10-17 18:21hudsonbotCheckin
2013-10-17 18:21hudsonbotNote Added: 0061776
2013-10-18 13:06AugustoMauchNote Added: 0061803
2013-10-18 13:06AugustoMauchStatusresolved => closed
2013-10-18 13:06AugustoMauchFixed in Version => 3.0MP29

Notes
(0061473)
alostale   
2013-09-30 11:57   
The problem appears when the are more than one property column that is a foreign key to the same entity (in the case explained in the issue description, both properties link to Country).

In this case FIC generates code for column values having the 2 fields the same column name which causes the problem.

The solution is to generate different column name for property fields.

Executed test cases:
-Following steps to reproduce check visualization and edition both in grid and form views work correctly
(0061474)
alostale   
2013-09-30 11:59   
Attached patch to solve this issue, to be pushed in pi for mp29
(0061719)
hgbot   
2013-10-16 17:38   
Repository: erp/devel/pi
Changeset: 4ee0b6443c3a27bbeb96c334646bb10d00147b65
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Sep 30 11:54:06 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4ee0b6443c3a27bbeb96c334646bb10d00147b65 [^]

fixed bug 24388: 2 property columns referencing same entity do not work

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java
---
(0061776)
hudsonbot   
2013-10-17 18:21   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/121b38a3673a [^]

Maturity status: Test
(0061803)
AugustoMauch   
2013-10-18 13:06   
Code reviewed and verified in pi@eb0f3ecbdae4