Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0006885Openbravo ERP02. Master data managementpublic2009-01-14 15:242009-02-27 06:19
AinhoaPagola 
alostale 
normalminorhave not tried
closedfixed 
20Ubuntu 8.4
pi 
2.50beta 
Core
No
0006885: Location selector sets the whole address to null if no Region is choosen in Pgsql
In the Location selector if a region is not selected the whole location/address is set to null although there can be data in the other fields.
Go to Master Data Management || Business Partner
Go to Location/Address tab.

Click in the icon of the location/address to enter a location.
In the pop-up fill all the fields except for the Region.
You wont be able to do that with Spain as country.
A country with no regions available must be choosen, for example Saint Lucia.
Click Ok and verify that the address is set to null.

Please notice that if you save it you can see it

This does not happen with Oracle.
 


No tags attached.
depends on backport 0006976 closed alostale Location selector sets the whole address to null if no Region is choosen in Pgsql 
has duplicate defect 0007598 closed rafaroda Location field do not show the address if Region is set blank 
Issue History
2009-01-14 15:24AinhoaPagolaNew Issue
2009-01-14 15:24AinhoaPagolaAssigned To => AinhoaPagola
2009-01-14 15:24AinhoaPagolasf_bug_id0 => 2507131
2009-01-14 15:24AinhoaPagolaRegression testing => No
2009-01-19 10:59psarobeProposed Solution updated
2009-01-19 10:59psarobeStatusnew => scheduled
2009-01-19 10:59psarobefix_in_branch => trunk
2009-01-28 17:07AinhoaPagolaAssigned ToAinhoaPagola => gmauleon
2009-02-10 13:21AinhoaPagolaNote Added: 0013304
2009-02-10 13:21AinhoaPagolafix_in_branchtrunk =>
2009-02-10 13:21AinhoaPagolaSteps to Reproduce Updated
2009-02-10 13:22AinhoaPagolaAssigned Togmauleon => alostale
2009-02-20 11:42svnbotCheckin
2009-02-20 11:42svnbotNote Added: 0013815
2009-02-20 11:42svnbotStatusscheduled => resolved
2009-02-20 11:42svnbotResolutionopen => fixed
2009-02-20 11:42svnbotsvn_revision => 13448
2009-02-24 12:53psarobeRelationship addedhas duplicate 0007598
2009-02-27 06:19sureshbabuStatusresolved => closed
2009-02-27 06:19sureshbabuNote Added: 0014121
2009-02-27 06:19sureshbabuFixed in Version => trunk

Notes
(0013304)
AinhoaPagola   
2009-02-10 13:21   
The problem is that the sql_record_identifier created for c_location table is not correct.

select tablename, sql_record_identifier from ad_table where tablename = 'C_Location';

It is actually:

"SELECT TO_CHAR(COALESCE(TO_CHAR(T.Address1),''))||' - '||
TO_CHAR(COALESCE(TO_CHAR(T.Address2),''))||' - '||
TO_CHAR(COALESCE(TO_CHAR(T.Postal),''))||' - '||
TO_CHAR(COALESCE(TO_CHAR(T.City),''))||' - '||
(SELECT TO_CHAR(COALESCE(TO_CHAR(TT.Name),'')) FROM C_Region TT WHERE TT.C_Region_ID=T.C_Region_ID) ||' - '||
(SELECT (SELECT COALESCE(TO_CHAR(MAX(TTT.Name)), TO_CHAR(TT.Name)) FROM C_Country_Trl TTT WHERE TTT.C_Country_ID=TT.C_Country_ID AND TTT.AD_LANGUAGE=L.AD_LANGUAGE) FROM C_Country TT WHERE TT.C_Country_ID=T.C_Country_ID) AS COLUMN_IDENTIFIER FROM (SELECT AD_LANGUAGE FROM AD_LANGUAGE WHERE AD_LANGUAGE=:c_language) L, C_Location T WHERE C_Location_ID=':c_ID'"


The region "part" should be something like this:


||' - '||
(SELECT COALESCE((SELECT TO_CHAR(COALESCE(TO_CHAR(TT.Name),'')) FROM C_Region TT WHERE TT.C_Region_ID=T.C_Region_ID),''))
||' - '||
(0013815)
svnbot   
2009-02-20 11:42   
Repository: openbravo
Revision: 13448
Author: alostale
Date: 2009-02-20 11:42:23 +0100 (Fri, 20 Feb 2009)

fixed bug 0006885: Location selector sets the whole address to null if no Region is choosen in Pgsql

---
U trunk/src-db/database/model/functions/AD_COLUMN_IDENTIFIER_REF_SQL.xml
U trunk/src-db/database/model/functions/C_CHK_OPEN_PERIOD.xml
U trunk/src-db/database/sourcedata/AD_MESSAGE.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=13448&sc=1 [^]
(0014121)
sureshbabu   
2009-02-27 06:19   
Retested in context 79.125.56.185/openbravotrunk