"Applied fix from trunk for revision: 1310731  " '(conflict handled by hand)
------------------------------------------------------------------------
r1310731 | jleroux | 2012-04-07 13:01:49 +0200 (sam., 07 avr. 2012) | 18 lines

A patch from Tom Burns for "SFA Postal Address Broken" https://issues.apache.org/jira/browse/OFBIZ-4786

SFA does not store countryGeoId or stateProvinceGeoId in PostalAddress entity when creating a new account causing postal address display to break in SFA and Party Manager profile screens.

Demo data for "sfa100" does not have values for countryGeoId or stateProvinceGeoId

Values countryGeoId or stateProvinceGeoId are needed to display party profile.

To reproduce:
1. In Party Manager search for Party Id "sfa100"
Open "sfa100" from search results
See error message under "General Correspondence Address"

2. Similar in SFA Account Lookup
3. A New Account created in SFA will produce the same error.

Adding address to an existing account works. For example the demo accounts created by other components.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/branches/release10.04@1310733 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/applications/marketing/data/sfaDemoData.xml b/applications/marketing/data/sfaDemoData.xml
index ed7dfad..f5b9136 100644
--- a/applications/marketing/data/sfaDemoData.xml
+++ b/applications/marketing/data/sfaDemoData.xml
@@ -27,7 +27,7 @@
     <ContactMech contactMechId="sfa100" contactMechTypeId="POSTAL_ADDRESS"/>

     <ContactMech contactMechId="sfa101" contactMechTypeId="TELECOM_NUMBER"/>

     <ContactMech contactMechId="sfa102" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@yahoo.com"/>

-    <PostalAddress contactMechId="sfa100" address1="151 Madison street." city="Edison" postalCode="32451" lastUpdatedStamp="2008-05-23 11:57:40.936" lastUpdatedTxStamp="2008-05-23 11:57:39.476" createdStamp="2008-05-23 11:57:40.936" createdTxStamp="2008-05-23 11:57:39.476"/>

+    <PostalAddress contactMechId="sfa100" address1="151 Madison street." city="Edison" postalCode="32451" countryGeoId="USA" stateProvinceGeoId="CA" lastUpdatedStamp="2008-05-23 11:57:40.936" lastUpdatedTxStamp="2008-05-23 11:57:39.476" createdStamp="2008-05-23 11:57:40.936" createdTxStamp="2008-05-23 11:57:39.476"/>
     <TelecomNumber contactMechId="sfa101" countryCode="1" areaCode="33" contactNumber="12456" lastUpdatedStamp="2008-05-23 11:57:41.179" lastUpdatedTxStamp="2008-05-23 11:57:39.476" createdStamp="2008-05-23 11:57:41.179" createdTxStamp="2008-05-23 11:57:39.476"/>

     <PartyContactMech partyId="sfa100" contactMechId="sfa100" fromDate="2000-01-01 00:00:00.000"/>

     <PartyContactMech partyId="sfa100" contactMechId="sfa101" fromDate="2000-01-01 00:00:00.000"/>

diff --git a/applications/marketing/widget/sfa/forms/AccountForms.xml b/applications/marketing/widget/sfa/forms/AccountForms.xml
index 2fbb750..f8d03b2 100644
--- a/applications/marketing/widget/sfa/forms/AccountForms.xml
+++ b/applications/marketing/widget/sfa/forms/AccountForms.xml
@@ -38,7 +38,7 @@
         <field name="city" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
             <text size="30" maxlength="60"/>
         </field>
-        <field name="state" title="${uiLabelMap.CommonState}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
+        <field name="stateProvinceGeoId" title="${uiLabelMap.CommonState}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
             <drop-down allow-empty="true">
                 <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName} - ${geoId}">
                     <entity-constraint name="geoTypeId" operator="in" value="STATE,PROVINCE"/>
@@ -49,7 +49,7 @@
         <field name="postalCode" title="${uiLabelMap.CommonZipPostalCode}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
             <text size="10" maxlength="30"/>
         </field>
-        <field name="country" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
+        <field name="countryGeoId" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
             <drop-down allow-empty="false" no-current-selected-key="${defaultCountryGeoId}">
                 <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName} - ${geoId}">
                     <entity-constraint name="geoTypeId" value="COUNTRY"/>