diff --git a/debian/control b/debian/control index ce0d3df55e1..f5d425c5586 100644 --- a/debian/control +++ b/debian/control @@ -16,6 +16,7 @@ Depends: python, postgresql-client, python-dateutil, + python-docutils, python-feedparser, python-gdata, python-ldap, diff --git a/openerp/addons/base/__openerp__.py b/openerp/addons/base/__openerp__.py index 02ba93166f6..937c9cbd20b 100644 --- a/openerp/addons/base/__openerp__.py +++ b/openerp/addons/base/__openerp__.py @@ -35,6 +35,8 @@ The kernel of OpenERP, needed for all installation. 'depends': [], 'data': [ 'base_data.xml', + 'currency_data.xml', + 'country_data.xml', 'security/base_security.xml', 'base_menu.xml', 'res/res_security.xml', diff --git a/openerp/addons/base/base_data.xml b/openerp/addons/base/base_data.xml index 6f4af968ec0..37c360b5cd8 100644 --- a/openerp/addons/base/base_data.xml +++ b/openerp/addons/base/base_data.xml @@ -1110,644 +1110,9 @@ - - - - USD - $ - 0.01 - 4 - - - - 1.2834 - - - - - - - VEF - Bs.F - 0.0001 - 4 - - - - 5.864 - - - - - - CAD - $ - 0.01 - 4 - - - - 1.3388 - - - - - - - CHF - CHF - 0.01 - 4 - - - - 1.3086 - - - - - - BRL - R$ - 0.01 - 4 - - - - 2.2344 - - - - - - CNY - ¥ - 0.01 - 4 - - - - 8.7556 - - - - - - - COP - $ - 0.01 - 4 - - - - 2933.8378 - - - - - - CZK - Kč - 0.01 - 4 - - - - 26.5634 - - - - - - DKK - kr - 0.01 - 4 - - - - 7.4445 - - - - - - - HUF - Ft - 0.01 - 4 - - - - 271.5621 - - - - - - IDR - Rp - 0.01 - 4 - - - - 14352.00 - - - - - 11796.39 - - - - - - LVL - Ls - 0.01 - 4 - - - - 0.7086 - - - - - - - NOK - kr - 0.01 - 4 - - - - 7.8668 - - - - - - XPF - XPF - 1.00 - 4 - - - - 119.331742 - - - - - - PAB - B/. - 0.01 - 4 - - - - 1.2676 - - - - - - PLN - zł - 0.01 - 4 - - - - 4.1005 - - - - - - SEK - kr - 0.01 - 4 - - - - 10.3004 - - - - - - GBP - £ - 0.01 - 4 - - - - 0.8333 - - - - - - ARS - $ - 0.01 - 4 - - - - 5.0881 - - - - - - INR - ₹ - 0.01 - 4 - - - - 59.9739 - - - - - - AUD - $ - 0.01 - 4 - - - - 1.4070 - - - - - - UAH - ₴ - 0.01 - 4 - - - - 10.1969 - - - - - - VND - ₫ - 0.01 - 4 - - - - 26330.01 - - - - - - HKD - $ - 0.01 - 4 - - - - 11.1608 - - - - - - JPY - ¥ - 0.01 - 4 - - - - 133.62 - - - - - - BGN - лв - 0.01 - 4 - - - - 1.9558 - - - - - - LTL - Lt - 0.01 - 4 - - - - 3.4528 - - - - - - RON - lei - 0.01 - 4 - - - - 4.2253 - - - - - - HRK - kn - 0.01 - 4 - - - - 7.2936 - - - - - - RUB - руб - 0.01 - 4 - - - - 43.16 - - - - - - TRY - TL - 0.01 - 4 - - - - 2.1411 - - - - - - KRW - ₩ - 0.01 - 4 - - - - 1662.37 - - - - - - MXN - $ - 0.01 - 4 - - - - 18.6664 - - - - - - MYR - RM - 0.01 - 4 - - - - 4.8887 - - - - - - NZD - $ - 0.01 - 4 - - - - 1.9764 - - - - - - PHP - Php - 0.01 - 4 - - - - 66.1 - - - - - - SGD - $ - 0.01 - 4 - - - - 2.0126 - - - - - - THB - ฿ - 0.01 - 4 - - - - 47.779 - - - - - - ZAR - R - 0.01 - 4 - - - - 10.5618 - - - - - - International Bank - - - - CRC - 0.01 - 4 - ¢ - - - - 691.3153 - - - - - - localhost - localhost - - - - - - MUR - Rs - 0.01 - 4 - - - - 40.28 - - - - - - XOF - CFA - 1 - 4 - - - - 655.957 - - - - - - XAF - FCFA - 1 - 4 - - - - 655.957 - - - - - - UGX - USh - 1 - 4 - - - - 3401.91388 - - - - - - HNL - L - 0.01 - 4 - - - - 25 - - - - - - - CLP - $ - 0.01 - 4 - - - - 710 - - - - - - - UYU - $ - 0.01 - 4 - - - - - - 28.36 - - + diff --git a/openerp/addons/base/country_data.xml b/openerp/addons/base/country_data.xml new file mode 100644 index 00000000000..5731b37f382 --- /dev/null +++ b/openerp/addons/base/country_data.xml @@ -0,0 +1,1284 @@ + + + + + + + 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 + + + + diff --git a/openerp/addons/base/currency_data.xml b/openerp/addons/base/currency_data.xml new file mode 100644 index 00000000000..11a83404b02 --- /dev/null +++ b/openerp/addons/base/currency_data.xml @@ -0,0 +1,2299 @@ + + + + + + + USD + $ + 0.01 + 4 + + + + 1.2834 + + + + + + + VEF + Bs.F + 0.0001 + 4 + + + + 5.864 + + + + + + CAD + $ + 0.01 + 4 + + + + 1.3388 + + + + + + + CHF + CHF + 0.01 + 4 + + + + 1.3086 + + + + + + BRL + R$ + 0.01 + 4 + + + + 2.2344 + + + + + + CNY + ¥ + 0.01 + 4 + + + + 8.7556 + + + + + + + COP + $ + 0.01 + 4 + + + + 2933.8378 + + + + + + CZK + Kč + 0.01 + 4 + + + + 26.5634 + + + + + + DKK + kr + 0.01 + 4 + + + + 7.4445 + + + + + + + HUF + Ft + 0.01 + 4 + + + + 271.5621 + + + + + + IDR + Rp + 0.01 + 4 + + + + 14352.00 + + + + + 11796.39 + + + + + + LVL + Ls + 0.01 + 4 + + + + 0.7086 + + + + + + NOK + kr + 0.01 + 4 + + + + 7.8668 + + + + + + XPF + XPF + 1.00 + 4 + + + + 119.331742 + + + + + + PAB + B/. + 0.01 + 4 + + + + 1.2676 + + + + + + PLN + zł + 0.01 + 4 + + + + 4.1005 + + + + + + SEK + kr + 0.01 + 4 + + + + 10.3004 + + + + + + ARS + $ + 0.01 + 4 + + + + 5.0881 + + + + + + INR + ₹ + 0.01 + 4 + + + + 59.9739 + + + + + + AUD + $ + 0.01 + 4 + + + + 1.4070 + + + + + + UAH + ₴ + 0.01 + 4 + + + + 10.1969 + + + + + + VND + ₫ + 0.01 + 4 + + + + 26330.01 + + + + + + HKD + $ + 0.01 + 4 + + + + 11.1608 + + + + + + JPY + ¥ + 0.01 + 4 + + + + 133.62 + + + + + + BGN + лв + 0.01 + 4 + + + + 1.9558 + + + + + + LTL + Lt + 0.01 + 4 + + + + 3.4528 + + + + + + RON + lei + 0.01 + 4 + + + + 4.2253 + + + + + + HRK + kn + 0.01 + 4 + + + + 7.2936 + + + + + + RUB + руб + 0.01 + 4 + + + + 43.16 + + + + + + TRY + TL + 0.01 + 4 + + + + 2.1411 + + + + + + KRW + ₩ + 0.01 + 4 + + + + 1662.37 + + + + + + MXN + $ + 0.01 + 4 + + + + 18.6664 + + + + + + MYR + RM + 0.01 + 4 + + + + 4.8887 + + + + + + NZD + $ + 0.01 + 4 + + + + 1.9764 + + + + + + PHP + Php + 0.01 + 4 + + + + 66.1 + + + + + + SGD + $ + 0.01 + 4 + + + + 2.0126 + + + + + + ZAR + R + 0.01 + 4 + + + + 10.5618 + + + + + + Reserve + + + + CRC + 0.01 + 4 + ¢ + + + + 691.3153 + + + + + + localhost + localhost + + + + + + MUR + Rs + 0.01 + 4 + + + + 40.28 + + + + + + XOF + CFA + 1 + 4 + + + + 655.957 + + + + + + XAF + FCFA + 1 + 4 + + + + 655.957 + + + + + + UGX + USh + 1 + 4 + + + + 3401.91388 + + + + + + HNL + L + 0.01 + 4 + + + + 25 + + + + + + CLP + $ + 0.01 + 4 + + + + 710 + + + + + + UYU + $ + 0.01 + 4 + + + + + + 28.36 + + + + AFN + Afs + 0.01 + 4 + + + + + + 59.33 + + + + AOA + Kz + 0.01 + 4 + + + + + + 117.080 + + + + XCD + $ + 0.01 + 4 + + + + + + 3.32 + + + + AMD + դր. + 0.01 + 4 + + + + + + 506.02 + + + + AWG + Afl. + 0.01 + 4 + + + + + + 0.45 + + + + AZN + m + 0.01 + 4 + + + + + + 0.96 + + + + BSD + B$ + 0.01 + 4 + + + + + + 1.23 + + + + BHD + BD + 0.01 + 4 + + + + + + 0.46 + + + + BDT + ৳ + 0.01 + 4 + + + + + + 100.59 + + + + BBD + Bds$ + 0.01 + 4 + + + + + + 2.46 + + + + BYR + BR + 0.01 + 4 + + + + + + 10228.19 + + + + BZD + BZ$ + 0.01 + 4 + + + + + + 2.33 + + + + BMD + BD$ + 0.01 + 4 + + + + + + 1.23 + + + + BTN + Nu. + 0.01 + 4 + + + + + + 67.81 + + + + BOB + Bs. + 0.01 + 4 + + + + + + 8.50 + + + + BAM + KM + 0.01 + 4 + + + + + + 1.96 + + + + BWP + P + 0.01 + 4 + + + + + + 9.45 + + + + BIF + FBu + 0.01 + 4 + + + + + + 1736.73 + + + + KHR + ៛ + 0.01 + 4 + + + + + + 5054.53 + + + + KYD + $ + 0.01 + 4 + + + + + + 1.007 + + + + KMF + CF + 0.01 + 4 + + + + + + 492.23 + + + + CDF + Fr + 0.01 + 4 + + + + + + 1112.80 + + + + CUP + $ + 0.01 + 4 + + + + + + 1.226 + + + + ANG + ƒ + 0.01 + 4 + + + + + + 2.11 + + + + CYP + £ + 0.01 + 4 + + + + + + 0.475 + + + + DJF + Fdj + 0.01 + 4 + + + + + + 222.22 + + + + DOP + RD$ + 0.01 + 4 + + + + + + 48.09 + + + + + TPE + 0.01 + 4 + + + + + + 1.2535 + + + + ECS + S/. + 0.01 + 4 + + + + + + 30707.5 + + + + EGP + E£ + 0.01 + 4 + + + + + + 7.46 + + + + SVC + ¢ + 0.01 + 4 + + + + + + 10.74 + + + + ERN + Nfk + 0.01 + 4 + + + + + + 18.89 + + + + EEK + kr + 0.01 + 4 + + + + + + 14.41 + + + + ETB + Br + 0.01 + 4 + + + + + + 21.94 + + + + FKP + £ + 0.01 + 4 + + + + + + 0.78 + + + + FJD + FJ$ + 0.01 + 4 + + + + + + 2.22 + + + + GEL + ლ + 0.01 + 4 + + + + + + 2.018 + + + + GIP + £ + 0.01 + 4 + + + + + + 0.786 + + + + QTQ + Q + 0.01 + 4 + + + + + + 9.8827 + + + + GNF + FG + 0.01 + 4 + + + + + + 8835.85 + + + + GWP + 0.01 + 4 + + + + + + 659.30 + + + + GYD + $ + 0.01 + 4 + + + + + + 247.31 + + + + HTG + G + 0.01 + 4 + + + + + + 51.69 + + + + ISK + kr + 0.01 + 4 + + + + + + 158.70 + + + + IRR + ﷼ + 0.01 + 4 + + + + + + 15059.97 + + + + IQD + ع.د + 0.01 + 4 + + + + + + 1432.27 + + + + ILS + ₪ + 0.01 + 4 + + + + + + 4.89 + + + + JMD + $ + 0.01 + 4 + + + + + + 108.94 + + + + JOD + د.ا + 0.01 + 4 + + + + + + 0.87 + + + + KZT + лв + 0.01 + 4 + + + + + + 184.09 + + + + KES + KSh + 0.01 + 4 + + + + + + 103.43 + + + + KWD + د.ك + 0.01 + 4 + + + + + + 0.35 + + + + KGS + лв + 0.01 + 4 + + + + + + 57.93 + + + + LAK + ₭ + 0.01 + 4 + + + + + + 9847.72 + + + + LBP + ل.ل + 0.01 + 4 + + + + + + 1853.94 + + + + LSL + L + 0.01 + 4 + + + + + + 10.06 + + + + LRD + L$ + 0.01 + 4 + + + + + + 90.28 + + + + LYD + ل.د + 0.01 + 4 + + + + + + 1.54 + + + + MOP + MOP$ + 0.01 + 4 + + + + + + 9.81 + + + + MKD + ден + 0.01 + 4 + + + + + + 60.29 + + + + MGA + Ar + 0.01 + 4 + + + + + + 2775.86 + + + + MWK + MK + 0.01 + 4 + + + + + + 329.79 + + + + MVR + .ރ + 0.01 + 4 + + + + + + 18.89 + + + + MRO + UM + 0.01 + 4 + + + + + + 362.23 + + + + MDL + L + 0.01 + 4 + + + + + + 15.27 + + + + MNT + ₮ + 0.01 + 4 + + + + + + 1643.57 + + + + MAD + د.م. + 0.01 + 4 + + + + + + 10.9962499 + + + + BND + $ + 0.01 + 4 + + + + + + 1.54 + + + + DZD + DZ + 0.01 + 4 + + + + + + 99.65 + + + + GHS + GH¢ + 0.01 + 4 + + + + + + 2.39 + + + + GMD + D + 0.01 + 4 + + + + + + 38.89 + + + + ZRZ + Ƶ + 0.01 + 4 + + + + + + 1148948.76 + + + + MZN + MT + 0.01 + 4 + + + + + + 33.65 + + + + MMK + K + 0.01 + 4 + + + + + + 1080.82 + + + + NAD + $ + 0.01 + 4 + + + + + + 10.06 + + + + NPR + ₨ + 0.01 + 4 + + + + + + 108.33 + + + + ALL + L + 0.01 + 4 + + + + + + 138.00 + + + + NIO + C$ + 0.01 + 4 + + + + + + 28.97 + + + + NGN + ₦ + 0.01 + 4 + + + + + + 196.77 + + + + KPW + ₩ + 0.01 + 4 + + + + + + 1105.24376765 + + + + ZWD + Z$ + 0.01 + 4 + + + + + + 460.93 + + + + ZMK + ZK + 0.01 + 4 + + + + + + 6022.54902 + + + + YER + ﷼ + 0.01 + 4 + + + + + + 264.784483 + + + + VUB + Bs + 0.01 + 4 + + + + + + 5.3821 + + + + EUR + € + 0.01 + 4 + + + + + + 1.0 + + + + VUV + VT + 0.01 + 4 + + + + + + 114.024315363 + + + + UZS + лв + 0.01 + 4 + + + + + + 2331.3093 + + + + UYP + $U + 0.01 + 4 + + + + + + 26.91 + + + + AED + د.إ + 0.01 + 4 + + + + + + 4.51253195 + + + + UAG + ₴ + 0.01 + 4 + + + + + + 10.17 + + + + TMM + m + 0.01 + 4 + + + + + + 0.00313859649123 + + + + TRL + TL + 0.01 + 4 + + + + + + 2.255 + + + + TND + DT + 0.01 + 4 + + + + + + 34.0661408 + + + + TTD + $ + 0.01 + 4 + + + + + + 8.61926302 + + + + TOP + T$ + 0.01 + 4 + + + + + + 31.1217 + + + + THB + ฿ + 0.01 + 4 + + + + + + 38.4070124 + + + + TZS + x/y + 0.01 + 4 + + + + + + 1947.06815 + + + + TJR + 0.01 + 4 + + + + + + 5.95 + + + + TWD + NT$ + 0.01 + 4 + + + + + + 36.8329536 + + + + SYP + £ + 0.01 + 4 + + + + + + 78.8338 + + + + SZL + E + 0.01 + 4 + + + + + + 10.07 + + + + SRG + $ + 0.01 + 4 + + + + + + 3980.29 + + + + SDD + £Sd + 0.01 + 4 + + + + + + 544.44 + + + + LKR + Rs + 0.01 + 4 + + + + + + 163.552526 + + + + SSP + £ + 0.01 + 4 + + + + + + 5.528 + + + + GBP + £ + 0.01 + 4 + + + + + + 0.784221994 + + + + SOD + Sh. + 0.01 + 4 + + + + + + 1993.71 + + + + SBD + SI$ + 0.01 + 4 + + + + + + 8.6605 + + + + SLL + Le + 0.01 + 4 + + + + + + 5320.43478 + + + + SCR + SR + 0.01 + 4 + + + + + + 18.2587287 + + + + RSD + din. + 0.01 + 4 + + + + + + 117.381295 + + + + SAR + SR + 0.01 + 4 + + + + + + 4.58898972 + + + + STD + Db + 0.01 + 4 + + + + + + 24105.86 + + + + ITL + ₤ + 0.01 + 4 + + + + + + 1936.27 + + + + WST + WS$ + 0.01 + 4 + + + + + + 2.8628 + + + + SHP + £ + 0.01 + 4 + + + + + + 0.7856 + + + + RWF + RF + 0.01 + 4 + + + + + + 752.57 + + + + RUR + R + 0.01 + 4 + + + + + + 39.6622695 + + + + ROL + L + 0.01 + 4 + + + + + + 45638.59 + + + + QAR + QR + 0.01 + 4 + + + + + + 4.45500218 + + + + PLZ + zł + 0.01 + 4 + + + + + + 4.17281888 + + + + PEN + S/. + 0.01 + 4 + + + + + + 3.20731573 + + + + PYG + ₲ + 0.01 + 4 + + + + + + 5343.66812 + + + + PGK + K + 0.01 + 4 + + + + + + 2.5903895 + + + + PKR + Rs. + 0.01 + 4 + + + + + + 115.97432 + + + + OMR + ر.ع. + 0.01 + 4 + + + + + + 0.472921728 + + + + CVE + $ + 0.01 + 4 + + + + + + 0.61 + + + + SKK + Sk + 0.01 + 4 + + + + + + 30.1263029 + + + + SIT + 0.01 + 4 + + + + + + 239.64 + + + + YUM + дин. + 0.01 + 4 + + + + + + 1.96 + + + + diff --git a/openerp/addons/base/i18n/es_MX.po b/openerp/addons/base/i18n/es_MX.po index dbc674d754a..cc9d519e705 100644 --- a/openerp/addons/base/i18n/es_MX.po +++ b/openerp/addons/base/i18n/es_MX.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-09-07 04:55+0000\n" +"X-Launchpad-Export-Date: 2012-09-08 04:54+0000\n" "X-Generator: Launchpad (build 15914)\n" #. module: base diff --git a/openerp/addons/base/res/res_company.py b/openerp/addons/base/res/res_company.py index f6f0d1808e4..c4c9ba585db 100644 --- a/openerp/addons/base/res/res_company.py +++ b/openerp/addons/base/res/res_company.py @@ -146,7 +146,12 @@ class res_company(osv.osv): if vat: val.append(_('TIN: ')+vat) if reg: val.append(_('Reg: ')+reg) return {'value': {'rml_footer1':' | '.join(val)}} - + + def on_change_country(self, cr, uid, ids, country_id, context=None): + currency_id = self._get_euro(cr, uid, context=context) + if country_id: + currency_id = self.pool.get('res.country').browse(cr, uid, country_id, context=context).currency_id.id + return {'value': {'currency_id': currency_id}} def _search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False, access_rights_uid=None): @@ -228,10 +233,9 @@ class res_company(osv.osv): return super(res_company, self).write(cr, *args, **argv) def _get_euro(self, cr, uid, context=None): - try: - return self.pool.get('res.currency').search(cr, uid, [])[0] - except: - return False + rate_obj = self.pool.get('res.currency.rate') + rate_id = rate_obj.search(cr, uid, [('rate', '=', 1)], context=context) + return rate_id and rate_obj.browse(cr, uid, rate_id[0], context=context).currency_id.id or False def _get_logo(self, cr, uid, ids): return open(os.path.join( tools.config['root_path'], 'addons', 'base', 'res', 'res_company_logo.png'), 'rb') .read().encode('base64') diff --git a/openerp/addons/base/res/res_company_view.xml b/openerp/addons/base/res/res_company_view.xml index 1cf32c03753..b0db4748974 100644 --- a/openerp/addons/base/res/res_company_view.xml +++ b/openerp/addons/base/res/res_company_view.xml @@ -53,7 +53,7 @@ - + diff --git a/openerp/addons/base/res/res_country.py b/openerp/addons/base/res/res_country.py index 32980428068..f1321605e5f 100644 --- a/openerp/addons/base/res/res_country.py +++ b/openerp/addons/base/res/res_country.py @@ -55,6 +55,7 @@ addresses belonging to this country.\n\nYou can use the python-style string pate \n%(state_code)s: the code of the state \n%(country_name)s: the name of the country \n%(country_code)s: the code of the country"""), + 'currency_id': fields.many2one('res.currency', 'Currency'), } _sql_constraints = [ ('name_uniq', 'unique (name)', diff --git a/openerp/addons/base/res/res_country_view.xml b/openerp/addons/base/res/res_country_view.xml index 3bead7a506c..c8046d34eb2 100644 --- a/openerp/addons/base/res/res_country_view.xml +++ b/openerp/addons/base/res/res_country_view.xml @@ -22,11 +22,17 @@ res.country
- - - - + + + + + + + + +