diff --git a/openerp/addons/base/res/res_country.py b/openerp/addons/base/res/res_country.py
index 8ad62f61699..cf7e8785914 100644
--- a/openerp/addons/base/res/res_country.py
+++ b/openerp/addons/base/res/res_country.py
@@ -43,7 +43,9 @@ addresses belonging to this country.\n\nYou can use the python-style string pate
\n%(country_code)s: the code of the country"""),
'currency_id': fields.many2one('res.currency', 'Currency'),
'image': fields.binary("Image"),
+ 'phone_prefix': fields.integer('Phone Prefix'),
'country_group_ids': fields.many2many('res.country.group', 'res_country_res_country_group_rel', 'res_country_id', 'res_country_group_id', string='Country Groups'),
+ 'state_ids': fields.one2many('res.country.state', 'country_id', string='States'),
}
_sql_constraints = [
('name_uniq', 'unique (name)',
diff --git a/openerp/addons/base/res/res_country_data.xml b/openerp/addons/base/res/res_country_data.xml
index b0f1863b2d3..ee5d281c38b 100644
--- a/openerp/addons/base/res/res_country_data.xml
+++ b/openerp/addons/base/res/res_country_data.xml
@@ -5,1520 +5,1768 @@
Andorra, Principality of
ad
-
-
+
+
+
United Arab Emirates
ae
-
-
+
+
+
Afghanistan, Islamic State of
af
-
-
+
+
+
Antigua and Barbuda
ag
-
-
+
+
+
Anguilla
ai
-
-
+
+
+
Albania
al
-
-
+
+
+
Armenia
am
-
-
+
+
+
Netherlands Antilles
an
-
-
+
+
+
Angola
ao
-
-
+
+
+
Antarctica
aq
-
+
+
Argentina
ar
-
-
+
+
+
American Samoa
as
-
-
+
+
+
Austria
at
-
-
+
+
+
Australia
au
-
-
-
+
+
+
+
Aruba
aw
-
-
+
+
+
Åland Islands
ax
-
-
+
+
+
Azerbaijan
az
-
-
+
+
+
Bosnia-Herzegovina
ba
-
-
+
+
+
Barbados
bb
-
-
+
+
+
Bangladesh
bd
-
-
+
+
+
Belgium
be
-
-
-
+
+
+
+
Burkina Faso
bf
-
-
+
+
+
Bulgaria
bg
-
-
+
+
+
Bahrain
bh
-
-
+
+
+
Burundi
bi
-
-
+
+
+
Benin
bj
-
-
+
+
+
Saint Barthélémy
bl
-
-
+
+
+
Bermuda
bm
-
-
+
+
+
Brunei Darussalam
bn
-
-
+
+
+
Bolivia
bo
-
-
+
+
+
Bonaire, Sint Eustatius and Saba
bq
-
+
+
Brazil
br
-
-
-
+
+
+
+
Bahamas
bs
-
-
+
+
+
Bhutan
bt
-
-
+
+
+
Bouvet Island
bv
-
+
+
Botswana
bw
-
-
+
+
+
Belarus
by
-
-
+
+
+
Belize
bz
-
-
+
+
+
Canada
ca
-
-
-
+
+
+
+
Cocos (Keeling) Islands
cc
-
-
+
+
+
Central African Republic
cf
-
-
+
+
+
Congo, Democratic Republic of the
cd
-
-
+
+
+
Congo
cg
-
-
+
+
+
Switzerland
ch
-
-
+
+
+
Ivory Coast (Cote D'Ivoire)
ci
-
-
+
+
+
Cook Islands
ck
-
-
+
+
+
Chile
cl
-
-
+
+
+
Cameroon
cm
-
-
+
+
+
China
cn
-
-
+
+
+
Colombia
co
-
-
+
+
+
Costa Rica
cr
-
-
+
+
+
Cuba
cu
-
-
+
+
+
Cape Verde
cv
-
-
+
+
+
Curaçao
cw
-
-
+
+
+
Christmas Island
cx
-
-
+
+
+
Cyprus
cy
-
-
+
+
+
Czech Republic
cz
-
-
+
+
+
Germany
de
-
-
-
+
+
+
+
Djibouti
dj
-
-
+
+
+
Denmark
dk
-
-
+
+
+
Dominica
dm
-
-
+
+
+
Dominican Republic
do
-
-
+
+
+
Algeria
dz
-
-
+
+
+
Ecuador
ec
-
-
+
+
+
Estonia
ee
-
-
+
+
+
Egypt
eg
-
-
+
+
+
Western Sahara
eh
-
+
+
Eritrea
er
-
-
+
+
+
Spain
es
-
-
-
+
+
+
+
Ethiopia
et
-
-
+
+
+
Finland
fi
-
-
+
+
+
Fiji
fj
-
-
+
+
+
Falkland Islands
fk
-
-
+
+
+
Micronesia
fm
-
-
+
+
+
Faroe Islands
fo
-
-
+
+
+
France
fr
-
-
-
+
+
+
+
Gabon
ga
-
-
+
+
+
Grenada
gd
-
-
+
+
+
Georgia
ge
-
-
+
+
+
French Guyana
gf
-
+
+
Ghana
gh
-
-
+
+
+
Gibraltar
gi
-
-
+
+
+
Guernsey
gg
-
-
+
+
+
Greenland
gl
-
-
+
+
+
Gambia
gm
-
-
+
+
+
Guinea
gn
-
-
+
+
+
Guadeloupe (French)
gp
-
+
+
Equatorial Guinea
gq
-
-
+
+
+
Greece
gr
-
-
+
+
+
South Georgia and the South Sandwich Islands
gs
-
-
+
+
+
Guatemala
gt
-
-
+
+
+
Guam (USA)
gu
-
-
+
+
+
Guinea Bissau
gw
-
-
+
+
+
Guyana
gy
-
-
+
+
+
Hong Kong
hk
-
-
+
+
+
Heard and McDonald Islands
hm
-
+
+
Honduras
hn
-
-
+
+
+
Croatia
hr
-
-
+
+
+
Haiti
ht
-
-
+
+
+
Hungary
hu
-
-
+
+
+
Indonesia
id
-
-
+
+
+
Ireland
ie
-
-
+
+
+
Israel
il
-
-
+
+
+
Isle of Man
im
-
-
+
+
+
India
in
-
-
-
+
+
+
+
British Indian Ocean Territory
io
-
-
+
+
+
Iraq
iq
-
-
+
+
+
Iran
ir
-
-
+
+
+
Iceland
is
-
-
+
+
+
Italy
it
-
-
+
+
+
Jersey
je
-
-
+
+
+
Jamaica
jm
-
-
+
+
+
Jordan
jo
-
-
+
+
+
Japan
jp
-
-
+
+
+
Kenya
ke
-
-
+
+
+
Kyrgyz Republic (Kyrgyzstan)
kg
-
-
+
+
+
Cambodia, Kingdom of
kh
-
-
+
+
+
Kiribati
ki
-
-
+
+
+
Comoros
km
-
-
+
+
+
Saint Kitts & Nevis Anguilla
kn
-
-
+
+
+
North Korea
kp
-
-
+
+
+
South Korea
kr
-
-
+
+
+
Kuwait
kw
-
-
+
+
+
Cayman Islands
ky
-
-
+
+
+
Kazakhstan
kz
-
-
+
+
+
Laos
la
-
-
+
+
+
Lebanon
lb
-
-
+
+
+
Saint Lucia
lc
-
-
+
+
+
Liechtenstein
li
-
-
+
+
+
Sri Lanka
lk
-
-
+
+
+
Liberia
lr
-
-
+
+
+
Lesotho
ls
-
-
+
+
+
Lithuania
lt
-
-
+
+
+
Luxembourg
lu
-
-
+
+
+
Latvia
lv
-
-
+
+
+
Libya
ly
-
-
+
+
+
Morocco
ma
-
-
+
+
+
Monaco
-
+
mc
-
+
+
Moldavia
md
-
-
+
+
+
Montenegro
me
-
-
+
+
+
Saint Martin (French part)
mf
-
+
+
Madagascar
mg
-
-
+
+
+
Marshall Islands
mh
-
-
+
+
+
Macedonia, the former Yugoslav Republic of
mk
-
-
+
+
+
Mali
ml
-
-
+
+
+
Myanmar
mm
-
-
+
+
+
Mongolia
mn
-
-
+
+
+
Macau
mo
-
-
+
+
+
Northern Mariana Islands
mp
-
-
+
+
+
Martinique (French)
mq
-
-
+
+
+
Mauritania
mr
-
-
+
+
+
Montserrat
ms
-
-
+
+
+
Malta
mt
-
-
+
+
+
Mauritius
mu
-
-
+
+
+
Maldives
mv
-
-
+
+
+
Malawi
mw
-
-
+
+
+
Mexico
mx
-
-
+
+
+
Malaysia
my
-
-
+
+
+
Mozambique
mz
-
-
+
+
+
Namibia
na
-
-
+
+
+
New Caledonia (French)
nc
-
-
+
+
+
Niger
ne
-
-
+
+
+
Norfolk Island
nf
-
-
+
+
+
Nigeria
ng
-
-
+
+
+
Nicaragua
ni
-
-
+
+
+
Netherlands
nl
-
-
-
+
+
+
+
Norway
no
-
-
+
+
+
Nepal
np
-
-
+
+
+
Nauru
nr
-
-
+
+
+
Neutral Zone
nt
-
+
+
Niue
nu
-
-
+
+
+
New Zealand
nz
-
-
+
+
+
Oman
om
-
-
+
+
+
Panama
pa
-
-
+
+
+
Peru
pe
-
-
+
+
+
Polynesia (French)
pf
-
-
+
+
+
Papua New Guinea
pg
-
-
+
+
+
Philippines
ph
-
-
+
+
+
Pakistan
pk
-
-
+
+
+
Poland
pl
-
-
+
+
+
Saint Pierre and Miquelon
pm
-
-
+
+
+
Pitcairn Island
pn
-
-
+
+
+
Puerto Rico
pr
-
-
+
+
+
Palestinian Territory, Occupied
ps
-
+
+
Portugal
pt
-
-
+
+
+
Palau
pw
-
-
+
+
+
Paraguay
py
-
-
+
+
+
Qatar
qa
-
-
+
+
+
Reunion (French)
re
-
+
+
Romania
ro
-
-
+
+
+
Serbia
rs
-
-
+
+
+
Russian Federation
ru
-
-
+
+
+
Rwanda
rw
-
-
+
+
+
Saudi Arabia
sa
-
-
+
+
+
Solomon Islands
sb
-
-
+
+
+
Seychelles
sc
-
-
+
+
+
Sudan
sd
-
-
+
+
+
Sweden
se
-
-
+
+
+
Singapore
sg
-
-
+
+
+
Saint Helena
sh
-
-
+
+
+
Slovenia
si
-
-
+
+
+
Svalbard and Jan Mayen Islands
sj
-
+
+
Slovakia
sk
-
-
+
+
+
Sierra Leone
sl
-
-
+
+
+
San Marino
sm
-
-
+
+
+
Senegal
sn
-
-
+
+
+
Somalia
so
-
-
+
+
+
Suriname
sr
-
-
+
+
+
South Sudan
ss
-
-
+
+
+
Saint Tome (Sao Tome) and Principe
st
-
-
+
+
+
El Salvador
sv
-
-
+
+
+
Sint Maarten (Dutch part)
sx
-
-
+
+
+
Syria
sy
-
-
+
+
+
Swaziland
sz
-
-
+
+
+
Turks and Caicos Islands
tc
-
-
+
+
+
Chad
td
-
-
+
+
+
French Southern Territories
tf
-
-
+
+
+
Togo
tg
-
-
+
+
+
Thailand
th
-
-
+
+
+
Tajikistan
tj
-
-
+
+
+
Tokelau
tk
-
-
+
+
+
Turkmenistan
tm
-
-
+
+
+
Tunisia
tn
-
-
+
+
+
Tonga
to
-
-
+
+
+
East Timor
tp
-
-
+
+
+
Turkey
tr
-
-
+
+
+
Trinidad and Tobago
tt
-
-
+
+
+
Tuvalu
tv
-
-
+
+
+
Taiwan
tw
-
+
+
Tanzania
tz
-
-
+
+
+
Ukraine
ua
-
-
+
+
+
-
Uganda
ug
-
-
+
+
+
United Kingdom
-
+
gb
-
-
+
+
+
USA Minor Outlying Islands
um
-
+
+
United States
us
-
-
-
+
+
+
+
Uruguay
uy
-
-
+
+
+
Uzbekistan
uz
-
-
+
+
+
Holy See (Vatican City State)
va
-
-
+
+
+
Saint Vincent & Grenadines
vc
-
-
+
+
+
Venezuela
ve
-
-
+
+
+
Virgin Islands (British)
vg
-
-
+
+
+
Virgin Islands (USA)
vi
-
-
+
+
+
Vietnam
vn
-
-
+
+
+
Vanuatu
vu
-
-
+
+
+
Wallis and Futuna Islands
wf
-
+
+
Samoa
ws
-
-
+
+
+
Yemen
ye
-
-
+
+
+
Mayotte
yt
-
+
+
Yugoslavia
yu
-
+
+
South Africa
za
-
-
+
+
+
Zambia
zm
-
-
+
+
+
-
-
Zaire
zr
-
+
+
Zimbabwe
zw
-
-
+
+
+
-
-
Europe
-
-
+
+
+
+
-
-
+
+
+