openerp-l10n-ar-localization team mailing list archive
-
openerp-l10n-ar-localization team
-
Mailing list archive
-
Message #00027
[Merge] lp:~lopezignacio/openerp-l10n-ar-localization/6.0 into lp:openerp-l10n-ar-localization/6.0
Lopez Ignacio has proposed merging lp:~lopezignacio/openerp-l10n-ar-localization/6.0 into lp:openerp-l10n-ar-localization/6.0.
Requested reviews:
OpenERP - Team de Localización Argentina (openerp-l10n-ar-localization)
For more details, see:
https://code.launchpad.net/~lopezignacio/openerp-l10n-ar-localization/6.0/+merge/125597
Cree un modulo a partir de unos scripts para descargar los bancos desde BCRA.
Agregue CABA a provincias.
--
https://code.launchpad.net/~lopezignacio/openerp-l10n-ar-localization/6.0/+merge/125597
Your team OpenERP - Team de Localización Argentina is requested to review the proposed merge of lp:~lopezignacio/openerp-l10n-ar-localization/6.0 into lp:openerp-l10n-ar-localization/6.0.
=== modified file 'l10n_ar_bank/README'
--- l10n_ar_bank/README 2011-09-14 22:51:17 +0000
+++ l10n_ar_bank/README 2012-09-20 22:35:24 +0000
@@ -1,6 +1,7 @@
Módulo de localización Argentina
Autores:
+ Ignacio Martín López - www.dinamotion.com.ar <ignacio@xxxxxxxxxxxxxxxxx>
Luis Falcon <lfalcon@xxxxxxxxxxx>
Cristian S. Rocha <cristian.rocha@xxxxxxxxxxxxxxxxxxxxxxxx>
Bruno M. Villasanti <bvillasanti@xxxxxxxxxxx>
=== modified file 'l10n_ar_bank/__init__.py'
--- l10n_ar_bank/__init__.py 2011-09-14 22:51:17 +0000
+++ l10n_ar_bank/__init__.py 2012-09-20 22:35:24 +0000
@@ -1,19 +1,25 @@
# -*- coding: utf-8 -*-
##############################################################################
#
-# Copyright (C) 2008-2011 Luis Falcon
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
+# Copyright (C) 2011-2014 OpenERP - Team de Localización Argentina.
+# https://launchpad.net/~openerp-l10n-ar-localization
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#############################################################################
+
+__author__ = "López Ignacio M. (www.dinamotion.com.ar) - lopezignacio@xxxxxxxxx"
+
+import l10n_ar_bank
+import wizard
=== modified file 'l10n_ar_bank/__openerp__.py'
--- l10n_ar_bank/__openerp__.py 2012-02-02 01:27:47 +0000
+++ l10n_ar_bank/__openerp__.py 2012-09-20 22:35:24 +0000
@@ -1,45 +1,63 @@
# -*- coding: utf-8 -*-
##############################################################################
#
-# Copyright (C) 2008-2011 Luis Falcon
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
+# Copyright (C) 2011-2014 OpenERP - Team de Localización Argentina.
+# https://launchpad.net/~openerp-l10n-ar-localization
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#############################################################################
{
'name': 'Banks of Argentina',
- 'version': '2.0',
- 'author': 'Thymbra - Torre de Hanoi',
- 'category': 'Localisation/Argentina',
- 'website': 'http://www.thymbra.com/',
+ 'version': '4.1',
+ 'author': 'DINAmotion',
+ 'category': 'Localization/Argentina',
+ 'website': 'http://www.dinamotion.com.ar/',
'license': 'GPL-3',
'description': """
-Localization Model for Argentina
-Includes:
- - Financial Entities (http://www.bcra.gov.ar/)
-
+Part of localization Model for Argentina - Banks of Argentina
+
+Includes:
+ - Banks declared official at the Central Bank of Argentina (http://www.bcra.gov.ar/) at 08.18.2012
+ - Online updater wizard.
+
+Attention: To run the wizard you need to have installed two libraries in python: BeautifulSoup, geopy. Without these two libraries the wizard will fail and will not update the information.
+
+--------------------------
+(SPANISH)
+
+includes:
+
+ - Banks declared official at the Central Bank of Argentina (http://www.bcra.gov.ar/) day 18/08/2012
+ - A wizard online updater.
+
+Attention: To run this wizard you need to have installed two libraries in python: BeautifulSoup, geopy. Without these two libraries the wizard will fail and will not update the information.
+
""",
'depends': [
- 'base',
- 'l10n_ar_states',
- ],
+ 'base',
+ 'l10n_ar_states',
+ ],
'init_xml': [],
'demo_xml': [],
'update_xml': [
- 'data/res_bank.xml',
- ],
+ 'data/res_bank.xml',
+ 'l10n_ar_bank.xml',
+ 'l10n_ar_bank_menu.xml',
+ 'wizard/wiz_l10n_ar_bank.xml',
+ ],
'active': False,
'installable': True,
}
=== added file 'l10n_ar_bank/data/.directory'
--- l10n_ar_bank/data/.directory 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/data/.directory 2012-09-20 22:35:24 +0000
@@ -0,0 +1,3 @@
+[Dolphin]
+Timestamp=2012,9,19,16,0,56
+ViewMode=1
=== modified file 'l10n_ar_bank/data/res_bank.xml'
--- l10n_ar_bank/data/res_bank.xml 2011-09-14 22:51:17 +0000
+++ l10n_ar_bank/data/res_bank.xml 2012-09-20 22:35:24 +0000
@@ -14,6 +14,7 @@
<field name='phone'>011-4320-0600</field>
<field name='fax'>011-4322-0603</field>
<field name='email'>consultas.por.la.web@xxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00295'>
<field name='name'>American Express Bank Ltd. Sociedad Anon</field>
@@ -28,6 +29,7 @@
<field name='phone'>011-4310-3000</field>
<field name='fax'>011-4315-9922</field>
<field name='email'>amex.bank.argentina@xxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00340'>
<field name='name'>Bacs Banco De Credito Y Securitizacion S</field>
@@ -42,6 +44,7 @@
<field name='phone'>011-4347-1010</field>
<field name='fax'>011-4347-1020</field>
<field name='email'>bacs@xxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00147'>
<field name='name'>Banco B.I. Creditanstalt Sociedad Anonim</field>
@@ -56,6 +59,7 @@
<field name='phone'>011-4319-8400</field>
<field name='fax'>011-4319-8230</field>
<field name='email'>info@xxxxxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00336'>
<field name='name'>Banco Bradesco Argentina S.A.</field>
@@ -70,6 +74,7 @@
<field name='phone'>01-4114-6111</field>
<field name='fax'>01-4114-6199</field>
<field name='email'>bradesco@xxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00331'>
<field name='name'>Banco Cetelem Argentina S.A.</field>
@@ -84,6 +89,7 @@
<field name='phone'>011-4796-8600</field>
<field name='fax'>011-4796-8641</field>
<field name='email'>comercial@xxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00319'>
<field name='name'>Banco Cmf S.A.</field>
@@ -98,6 +104,7 @@
<field name='phone'>011-4318-6800</field>
<field name='fax'>011-4318-6844</field>
<field name='email'>cmfb@xxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00389'>
<field name='name'>Banco Columbia S.A.</field>
@@ -111,6 +118,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-43490300</field>
<field name='email'>info@xxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00299'>
<field name='name'>Banco Comafi Sociedad Anonima</field>
@@ -125,6 +133,7 @@
<field name='phone'>011-4328-5555</field>
<field name='fax'>011-4328-9068</field>
<field name='email'>contactenos@xxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00191'>
<field name='name'>Banco Credicoop Cooperativo Limitado</field>
@@ -139,6 +148,7 @@
<field name='phone'>011-4320-5000</field>
<field name='fax'>011-4320-5257</field>
<field name='email'>credicoop@xxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00094'>
<field name='name'>Banco De Corrientes S.A.</field>
@@ -153,6 +163,7 @@
<field name='phone'>03783-479300</field>
<field name='fax'>03783-479300</field>
<field name='email'>bcteservicios@xxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00315'>
<field name='name'>Banco De Formosa S.A.</field>
@@ -166,6 +177,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>03717-429200</field>
<field name='fax'>03717-429844</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00007'>
<field name='name'>Banco De Galicia Y Buenos Aires S.A.</field>
@@ -180,6 +192,7 @@
<field name='phone'>011-6329-0000</field>
<field name='fax'>011-4329-6100</field>
<field name='email'>asuntosinstitucionales@xxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00300'>
<field name='name'>Banco De Inversion Y Comercio Exterior S</field>
@@ -194,6 +207,7 @@
<field name='phone'>011-4313-9546</field>
<field name='fax'>011-4311-5596</field>
<field name='email'>comercial@xxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00029'>
<field name='name'>Banco De La Ciudad De Buenos Aires</field>
@@ -208,6 +222,7 @@
<field name='phone'>011-4329-8600</field>
<field name='fax'>011-4329-8700</field>
<field name='email'>servicioalcliente@xxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00011'>
<field name='name'>Banco De La Nacion Argentina</field>
@@ -222,6 +237,7 @@
<field name='phone'>011-4347-6000</field>
<field name='fax'>011-4342-2991</field>
<field name='email'>telemarketing@xxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00093'>
<field name='name'>Banco De La Pampa Sociedad De Economмa M</field>
@@ -235,6 +251,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>02954-451000</field>
<field name='email'>infoweb@xxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00014'>
<field name='name'>Banco De La Provincia De Buenos Aires</field>
@@ -248,6 +265,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-4347-0000</field>
<field name='email'>atencionalclienteBPBA@xxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00020'>
<field name='name'>Banco De La Provincia De Cordoba S.A.</field>
@@ -262,6 +280,7 @@
<field name='phone'>0351-4207200</field>
<field name='fax'>0351-4207407</field>
<field name='email'>contgral@xxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00269'>
<field name='name'>Banco De La Republica Oriental Del Urugu</field>
@@ -276,6 +295,7 @@
<field name='phone'>011-4132-2000</field>
<field name='fax'>011-4132-2092</field>
<field name='email'>brou@xxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00045'>
<field name='name'>Banco De San Juan S.A.</field>
@@ -290,6 +310,7 @@
<field name='phone'>0264-4291000</field>
<field name='fax'>0264-4214126</field>
<field name='email'>sdirectorio@xxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00086'>
<field name='name'>Banco De Santa Cruz S.A.</field>
@@ -304,6 +325,7 @@
<field name='phone'>02966-441200</field>
<field name='fax'>02966-422395</field>
<field name='email'>sdirectorio@xxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00321'>
<field name='name'>Banco De Santiago Del Estero S.A.</field>
@@ -318,6 +340,7 @@
<field name='phone'>0385-450-2300</field>
<field name='fax'>0385-450-2319</field>
<field name='email'>bsegerencia@xxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00332'>
<field name='name'>Banco De Servicios Financieros S.A.</field>
@@ -332,6 +355,7 @@
<field name='phone'>-4003-7275</field>
<field name='fax'>-4003-6923</field>
<field name='email'>comercial@xxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00338'>
<field name='name'>Banco De Servicios Y Transacciones S.A.</field>
@@ -346,6 +370,7 @@
<field name='phone'>011-5235-2300</field>
<field name='fax'>011-5235-2305</field>
<field name='email'>info@xxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00198'>
<field name='name'>Banco De Valores S.A.</field>
@@ -360,6 +385,7 @@
<field name='phone'>011-4323-6900</field>
<field name='fax'>011-4334-1731</field>
<field name='email'>info@xxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00083'>
<field name='name'>Banco Del Chubut S.A.</field>
@@ -374,6 +400,7 @@
<field name='phone'>02965-482505</field>
<field name='fax'>02965-482513</field>
<field name='email'>contacto@xxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00310'>
<field name='name'>Banco Del Sol S.A.</field>
@@ -388,6 +415,7 @@
<field name='phone'>0221-4232403</field>
<field name='fax'>0221-422-9111</field>
<field name='email'>buzon@xxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00060'>
<field name='name'>Banco Del Tucuman S.A.</field>
@@ -402,6 +430,7 @@
<field name='phone'>0381-4503300</field>
<field name='fax'>0381-4311957</field>
<field name='email'>bancodeltucuman@xxxxxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00046'>
<field name='name'>Banco Do Brasil S.A.</field>
@@ -416,6 +445,7 @@
<field name='phone'>-4000-2700</field>
<field name='fax'>-4000-2770</field>
<field name='email'>buenosaires@xxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00303'>
<field name='name'>Banco Finansur S.A.</field>
@@ -430,6 +460,7 @@
<field name='phone'>011-43243400</field>
<field name='fax'>011-43224687</field>
<field name='email'>marketing@xxxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00044'>
<field name='name'>Banco Hipotecario S.A.</field>
@@ -443,6 +474,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-4347-5000</field>
<field name='email'>info@xxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00322'>
<field name='name'>Banco Industrial S.A.</field>
@@ -456,6 +488,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-5238-0200</field>
<field name='email'>info@xxxxxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00259'>
<field name='name'>Banco Itau Argentina S.A.</field>
@@ -468,6 +501,7 @@
<field name='state' ref='l10n_ar_states.C'/>
<field name='country' ref='base.ar'/>
<field name='email'>consultasysugerenciasclientes@xxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00305'>
<field name='name'>Banco Julio Sociedad Anonima</field>
@@ -482,6 +516,7 @@
<field name='phone'>0351-4213007</field>
<field name='fax'>0351-4213007</field>
<field name='email'>gcia.administracion@xxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00285'>
<field name='name'>Banco Macro S.A.</field>
@@ -495,6 +530,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-5222-6500</field>
<field name='email'>serviciosalcliente@xxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00254'>
<field name='name'>Banco Mariva S.A.</field>
@@ -509,6 +545,7 @@
<field name='phone'>011-4321-2200</field>
<field name='fax'>011-4321-2222</field>
<field name='email'>tecnol@xxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00341'>
<field name='name'>Banco Masventas S.A.</field>
@@ -523,6 +560,7 @@
<field name='phone'>0387-4310298</field>
<field name='fax'>0387-4310914</field>
<field name='email'>masventas@xxxxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00281'>
<field name='name'>Banco Meridian S.A.</field>
@@ -536,6 +574,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-4130-8500</field>
<field name='email'>info@xxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00065'>
<field name='name'>Banco Municipal De Rosario</field>
@@ -550,6 +589,7 @@
<field name='phone'>0341-4256162</field>
<field name='fax'>0341-4256182</field>
<field name='email'>cliente@xxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00034'>
<field name='name'>Banco Patagonia S.A.</field>
@@ -564,6 +604,7 @@
<field name='phone'>011-4132-6300</field>
<field name='fax'>011-4331-2793</field>
<field name='email'>bancopatagonia@xxxxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00301'>
<field name='name'>Banco Piano S.A.</field>
@@ -578,6 +619,7 @@
<field name='phone'>011-4394-2463</field>
<field name='fax'>011-4325-4942</field>
<field name='email'>info@xxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00306'>
<field name='name'>Banco Privado De Inversiones Sociedad An</field>
@@ -592,6 +634,7 @@
<field name='phone'>011-4318-7300</field>
<field name='fax'>011-4318-7301</field>
<field name='email'>info@xxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00268'>
<field name='name'>Banco Provincia De Tierra Del Fuego</field>
@@ -606,6 +649,7 @@
<field name='phone'>02901-441600</field>
<field name='fax'>02901-441671</field>
<field name='email'>info@xxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00097'>
<field name='name'>Banco Provincia Del Neuquén Sociedad Anс</field>
@@ -620,6 +664,7 @@
<field name='phone'>0299-4496600</field>
<field name='fax'>0299-4480439</field>
<field name='email'>institucional@xxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00079'>
<field name='name'>Banco Regional De Cuyo S.A.</field>
@@ -634,6 +679,7 @@
<field name='phone'>0261-4498800</field>
<field name='fax'>0261-4235999</field>
<field name='email'>brc@xxxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00247'>
<field name='name'>Banco Roela S.A.</field>
@@ -648,6 +694,7 @@
<field name='phone'>0351-4241777</field>
<field name='fax'>0351-4230824</field>
<field name='email'>servicioalcliente@xxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00277'>
<field name='name'>Banco Saenz S.A.</field>
@@ -662,6 +709,7 @@
<field name='phone'>011-4342-6969</field>
<field name='fax'>011-4331-2214</field>
<field name='email'>contaduria@xxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00072'>
<field name='name'>Banco Santander Rio S.A.</field>
@@ -676,6 +724,7 @@
<field name='phone'>011-4341-1000</field>
<field name='fax'>011-4342-8962</field>
<field name='email'>info@xxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00027'>
<field name='name'>Banco Supervielle S.A.</field>
@@ -690,6 +739,7 @@
<field name='phone'>011-4324-8000</field>
<field name='fax'>011-4324-8080</field>
<field name='email'>Eduardo.Hospital@xxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00262'>
<field name='name'>Bank Of America, National Association</field>
@@ -703,6 +753,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-4317-3500</field>
<field name='email'>alberto.filippini@xxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00017'>
<field name='name'>Bbva Banco Frances S.A.</field>
@@ -716,6 +767,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-4346-4000</field>
<field name='email'>mensajes@xxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00266'>
<field name='name'>Bnp Paribas</field>
@@ -729,6 +781,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-4318-0318</field>
<field name='email'>info@xxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='65203'>
<field name='name'>Caja De Credito "Cuenca" Cooperativa Lim</field>
@@ -743,6 +796,7 @@
<field name='phone'>011-4512-6000</field>
<field name='fax'>011-4754-9399</field>
<field name='email'>cuenca@xxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='64085'>
<field name='name'>Caja De Credito Cooperativa La Capital D</field>
@@ -756,6 +810,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-5252-0100</field>
<field name='email'>correo@xxxxxxxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00016'>
<field name='name'>Citibank N.A.</field>
@@ -768,6 +823,7 @@
<field name='state' ref='l10n_ar_states.C'/>
<field name='country' ref='base.ar'/>
<field name='phone'>011-4329-1000</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44077'>
<field name='name'>Compañía Financiera Argentina S.A.</field>
@@ -781,6 +837,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-4348-9999</field>
<field name='email'>sac@xxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00325'>
<field name='name'>Deutsche Bank S.A.</field>
@@ -795,6 +852,7 @@
<field name='phone'>011-4590-2800</field>
<field name='fax'>011-4590-2882</field>
<field name='email'>monica.mestre@xxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44092'>
<field name='name'>Fiat Credito Compañía Financiera S.A.</field>
@@ -809,6 +867,7 @@
<field name='phone'>01-4344-5700</field>
<field name='fax'>01-4344-5874</field>
<field name='email'>gabriela.bruno@xxxxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44059'>
<field name='name'>Ford Credit Compañía Financiera S.A.</field>
@@ -823,6 +882,7 @@
<field name='phone'>-4510-8325</field>
<field name='fax'>-4510-8004</field>
<field name='email'>fordcredit@xxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44090'>
<field name='name'>Ge Compañía Financiera S.A.</field>
@@ -836,6 +896,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-4104-9600</field>
<field name='email'>gemoney_ar@xxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44093'>
<field name='name'>Gmac Compañía Financiera S.A.</field>
@@ -850,6 +911,7 @@
<field name='phone'>01-4317-1900</field>
<field name='fax'>01-4317-1931</field>
<field name='email'>contactenos@xxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00150'>
<field name='name'>Hsbc Bank Argentina S.A.</field>
@@ -864,6 +926,7 @@
<field name='phone'>011-4320-2800</field>
<field name='fax'>011-4324-3988</field>
<field name='email'>contactenos@xxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44096'>
<field name='name'>John Deere Credit Compañía Financiera S.</field>
@@ -878,6 +941,7 @@
<field name='phone'>0341-410-5331</field>
<field name='fax'>0341-410-5310</field>
<field name='email'>jdca@xxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00165'>
<field name='name'>Jpmorgan Chase Bank, National Associatio</field>
@@ -892,6 +956,7 @@
<field name='phone'>011-4325-8046</field>
<field name='fax'>011-4348-7254</field>
<field name='email'>gayoso_paola@xxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00312'>
<field name='name'>Mba Lazard Banco De Inversiones S. A.</field>
@@ -906,6 +971,7 @@
<field name='phone'>011-4319-5800</field>
<field name='fax'>011-4312-6460</field>
<field name='email'>mba@xxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44094'>
<field name='name'>Mercedes-Benz Compañía Financiera Argent</field>
@@ -920,6 +986,7 @@
<field name='phone'>-4808-8900</field>
<field name='fax'>-4808-8977</field>
<field name='email'>maria_fernanda.pellegrino@xxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44068'>
<field name='name'>Metropolis Compañía Financiera S.A.</field>
@@ -934,6 +1001,7 @@
<field name='phone'>011-5554-5800</field>
<field name='fax'>011-5554-5802</field>
<field name='email'>mensajes@xxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='45056'>
<field name='name'>Montemar Compañía Financiera S.A.</field>
@@ -948,6 +1016,7 @@
<field name='phone'>0261-4494500</field>
<field name='fax'>0261-4494540</field>
<field name='email'>informes@xxxxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='45072'>
<field name='name'>Multifinanzas Compañía Financiera S.A.</field>
@@ -962,6 +1031,7 @@
<field name='phone'>011-4393-3953</field>
<field name='fax'>011-4394-1244</field>
<field name='email'>multifin@xxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00386'>
<field name='name'>Nuevo Banco De Entre Rмos S.A.</field>
@@ -976,6 +1046,7 @@
<field name='phone'>0343-4201200</field>
<field name='fax'>0343-4313869</field>
<field name='email'>info@xxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00309'>
<field name='name'>Nuevo Banco De La Rioja Sociedad Anonima</field>
@@ -990,6 +1061,7 @@
<field name='phone'>03822-430575</field>
<field name='fax'>03822-430618</field>
<field name='email'>nblrsa@xxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00330'>
<field name='name'>Nuevo Banco De Santa Fe Sociedad Anonima</field>
@@ -1004,6 +1076,7 @@
<field name='phone'>0341-4294200</field>
<field name='fax'>0341-440150</field>
<field name='email'>contactobc@xxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00311'>
<field name='name'>Nuevo Banco Del Chaco S. A.</field>
@@ -1018,6 +1091,7 @@
<field name='phone'>03722-447400</field>
<field name='fax'>03722-447401</field>
<field name='email'>nbchdir@xxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44098'>
<field name='name'>Psa Finance Argentina Compañía Financiera</field>
@@ -1031,6 +1105,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-4131-6313</field>
<field name='fax'>011-4131-6301</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00339'>
<field name='name'>Rci Banque</field>
@@ -1044,6 +1119,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-4779-6068</field>
<field name='fax'>011-4778-2337</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44095'>
<field name='name'>Rombo Compañía Financiera S.A.</field>
@@ -1057,6 +1133,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-4779-6065</field>
<field name='fax'>011-4779-6072</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00015'>
<field name='name'>Standard Bank Argentina S.A.</field>
@@ -1070,6 +1147,7 @@
<field name='country' ref='base.ar'/>
<field name='phone'>011-48202000</field>
<field name='email'>lavozdelcliente@xxxxxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='00018'>
<field name='name'>The Bank Of Tokyo-Mitsubishi Ufj, Ltd.</field>
@@ -1084,6 +1162,7 @@
<field name='phone'>011-4348-2000</field>
<field name='fax'>011-4348-2051</field>
<field name='email'>btmu@xxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44099'>
<field name='name'>Toyota Compañía Financiera De Argentina</field>
@@ -1098,6 +1177,7 @@
<field name='phone'>011-4341-7900</field>
<field name='fax'>011-4341-7966</field>
<field name='email'>info@xxxxxxxxxxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
<record model='res.bank' id='44088'>
<field name='name'>Volkswagen Credit Compañia Financiera S.</field>
@@ -1112,6 +1192,7 @@
<field name='phone'>011-4317-9000</field>
<field name='fax'>011-4317-9001</field>
<field name='email'>mariana.rodriguez@xxxxxxxx</field>
+ <field name='update'>2012-08-18</field>
</record>
</data>
</openerp>
=== modified file 'l10n_ar_bank/i18n/es_AR.po'
--- l10n_ar_bank/i18n/es_AR.po 2012-01-09 14:08:45 +0000
+++ l10n_ar_bank/i18n/es_AR.po 2012-09-20 22:35:24 +0000
@@ -0,0 +1,152 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * l10n_ar_bank
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.4\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2012-09-19 22:32+0000\n"
+"PO-Revision-Date: 2012-09-19 22:32+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: l10n_ar_bank
+#: code:addons/l10n_ar_bank/wizard/wiz_l10n_ar_bank.py:136
+#: field:l10nar.banks.wizard.result,bancos_procesados:0
+#, python-format
+msgid "Banks total processed"
+msgstr "Total de Bancos procesados"
+
+#. module: l10n_ar_bank
+#: view:l10nar.banks.wizard:0
+msgid "Take data and Update"
+msgstr "Tomar datos y Actualizar"
+
+#. module: l10n_ar_bank
+#: code:addons/l10n_ar_bank/wizard/wiz_l10n_ar_bank.py:135
+#: field:l10nar.banks.wizard.result,bancos_desahabilitados:0
+#, python-format
+msgid "Desactivated Banks"
+msgstr "Bancos desactivados"
+
+#. module: l10n_ar_bank
+#: view:l10nar.banks.wizard.result:0
+msgid "Close"
+msgstr "Cerrar"
+
+#. module: l10n_ar_bank
+#: model:ir.module.module,shortdesc:l10n_ar_bank.module_meta_information
+msgid "Banks of Argentina"
+msgstr "Bancos de Argentina"
+
+#. module: l10n_ar_bank
+#: model:ir.actions.act_window,name:l10n_ar_bank.action_l10n_ar_banks_wizard
+msgid "Update Banks from BCRA"
+msgstr "Actualizador de Bancos desde BCRA"
+
+#. module: l10n_ar_bank
+#: view:l10nar.banks.wizard:0
+#: view:l10nar.banks.wizard.result:0
+msgid "Updater Banks from Central Bank of Argentina"
+msgstr "Actualizador de Bancos desde el Banco Central de la Rep. Argentina"
+
+#. module: l10n_ar_bank
+#: view:l10nar.banks.wizard:0
+msgid "ATTENTION!"
+msgstr "ATENCION!"
+
+#. module: l10n_ar_bank
+#: code:addons/l10n_ar_bank/wizard/wiz_l10n_ar_bank.py:133
+#: field:l10nar.banks.wizard.result,bancos_actualizados:0
+#, python-format
+msgid "Banks Upgraded"
+msgstr "Bancos Actualizados"
+
+#. module: l10n_ar_bank
+#: code:addons/l10n_ar_bank/l10n_ar_bank.py:29
+#: field:res.bank,update:0
+#, python-format
+msgid "Update"
+msgstr "Actualizado"
+
+#. module: l10n_ar_bank
+#: view:l10nar.banks.wizard.result:0
+msgid "Results of Updates:"
+msgstr "Resultado de la Actualización:"
+
+#. module: l10n_ar_bank
+#: help:res.bank,vat:0
+msgid "Value Added Tax number."
+msgstr "CUIT de la entidad."
+
+#. module: l10n_ar_bank
+#: code:addons/l10n_ar_bank/l10n_ar_bank.py:30
+#: field:res.bank,vat:0
+#, python-format
+msgid "VAT"
+msgstr "CUIT"
+
+#. module: l10n_ar_bank
+#: code:addons/l10n_ar_bank/wizard/wiz_l10n_ar_bank.py:134
+#: field:l10nar.banks.wizard.result,bancos_nuevos:0
+#, python-format
+msgid "New Banks"
+msgstr "Nuevos Bancos"
+
+#. module: l10n_ar_bank
+#: view:l10nar.banks.wizard:0
+msgid "In this update the Banks of Argentina"
+msgstr "Está a punto de actualizar los datos de los bancos de Argentina"
+
+#. module: l10n_ar_bank
+#: view:l10nar.banks.wizard:0
+msgid "Cancel"
+msgstr "Cancel"
+
+#. module: l10n_ar_bank
+#: view:l10nar.banks.wizard:0
+msgid "with On-Line data taken from Central Bank of Argentina."
+msgstr "con los datos publicados On-Line en el Banco Central de la Rep. Argentina."
+
+#. module: l10n_ar_bank
+#: model:ir.model,name:l10n_ar_bank.model_l10nar_banks_wizard_result
+msgid "l10nar.banks.wizard.result"
+msgstr "l10nar.banks.wizard.result"
+
+#. module: l10n_ar_bank
+#: model:ir.module.module,description:l10n_ar_bank.module_meta_information
+msgid "\n"
+"Part of localization Model for Argentina - Banks of Argentina\n"
+"\n"
+"Includes: \n"
+" - Banks declared official at the Central Bank of Argentina (http://www.bcra.gov.ar/) at 08.18.2012 \n"
+" - Online updater wizard.\n"
+"\n"
+"Attention: To run the wizard you need to have installed two libraries in python: BeautifulSoup, geopy. Without these two libraries the wizard will fail and will not update the information.\n"
+msgstr "\n"
+"Parte del Model de localización para Argentina - Bancos de Argentina\n"
+"\n"
+"incluye:\n"
+"\n"
+" - Bancos declarados oficialmente en el banco central de la Republica Argentina (http://www.bcra.gov.ar/) a la fecha 18/08/2012\n"
+" - A wizard para actualizar los datos online desde el BCRA.\n"
+"\n"
+"Atención: Para ejecutar el wizard debe primero tener instalados dos librerias de python: BeautifulSoup, geopy. Sin estas librerías el wizard fallará y no actualizará los datos de los bancos.\n"
+"\n"
+""
+
+#. module: l10n_ar_bank
+#: model:ir.model,name:l10n_ar_bank.model_res_bank
+msgid "Bank"
+msgstr "Banco"
+
+#. module: l10n_ar_bank
+#: model:ir.model,name:l10n_ar_bank.model_l10nar_banks_wizard
+msgid "l10nar.banks.wizard"
+msgstr "l10nar.banks.wizard"
+
=== added file 'l10n_ar_bank/l10n_ar_bank.py'
--- l10n_ar_bank/l10n_ar_bank.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/l10n_ar_bank.py 2012-09-20 22:35:24 +0000
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2011-2014 OpenERP - Team de Localización Argentina.
+# https://launchpad.net/~openerp-l10n-ar-localization
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#############################################################################
+
+from osv import fields,osv
+from tools.translate import _
+import time
+
+class Bank(osv.osv):
+ _inherit = 'res.bank'
+ _columns = {
+ 'update' : fields.date(_('Update')),
+ 'vat': fields.char(_('VAT'),size=32 ,help="Value Added Tax number."),
+ }
+ _defaults = {
+ 'update': lambda *a: time.strftime('%Y-%m-%d')
+ }
+Bank()
\ No newline at end of file
=== added file 'l10n_ar_bank/l10n_ar_bank.xml'
--- l10n_ar_bank/l10n_ar_bank.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/l10n_ar_bank.xml 2012-09-20 22:35:24 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data >
+
+ <record id="view_res_bank_form" model="ir.ui.view">
+ <field name="model">res.bank</field>
+ <field name="name">res.bank.form.date.inherit</field>
+ <field name="inherit_id" ref="base.view_res_bank_form" />
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <field name="bic" position="after">
+ <field name='update' readonly='1'/>
+ <field name='vat'/>
+ </field>
+ </field>
+ </record>
+
+ </data>
+</openerp>
=== added file 'l10n_ar_bank/l10n_ar_bank_menu.xml'
--- l10n_ar_bank/l10n_ar_bank_menu.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/l10n_ar_bank_menu.xml 2012-09-20 22:35:24 +0000
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data >
+
+ <act_window id="action_l10n_ar_banks_wizard"
+ name="Update Banks from BCRA"
+ src_model="res.bank"
+ res_model="l10nar.banks.wizard"
+ view_mode="form"
+ view_type="form"
+ target="new"
+ key2="client_action_multi"
+ />
+
+ </data>
+</openerp>
=== removed directory 'l10n_ar_bank/scripts'
=== removed file 'l10n_ar_bank/scripts/bank_loader.py'
--- l10n_ar_bank/scripts/bank_loader.py 2011-11-07 13:50:12 +0000
+++ l10n_ar_bank/scripts/bank_loader.py 1970-01-01 00:00:00 +0000
@@ -1,161 +0,0 @@
-#!/usr/bin/python
-
-try:
- import geopy
-except ImportError:
- print "Please, intall geopy using 'pip install geopy'."
-
-import re, sys
-from BeautifulSoup import BeautifulSoup
-from geosearch import unify_geo_data, strip_accents
-from cache import urlopen
-
-encoding = 'ISO-8859-1'
-compiled_re = {
- # Common
- 'code' : re.compile(r'N... Banco:</span>\s*(\d+)'),
- # 'name': calculated,
- 'office' : re.compile(r'Direcci..n:</span> \s*(.{40})'),
- 'street' : re.compile(r'Direcci..n:</span> \s*.{40}([^-]*)-'),
- # 'street2': None
- 'city' : re.compile(r'Direcci..n:</span> \s*.{40}[^-]*-([^-]*)-'),
- 'state' : re.compile(r'Direcci..n:</span> \s*.{40}[^-]*-[^-]*-([^-]*)'),
- # 'country': 'Argentina',
- 'phone' : re.compile(r'Tel..fono:</span> ([\d-]+)\s* '),
- 'fax' : re.compile(r'Fax:</span> ([\d-]+)\s* '),
- 'email' : re.compile(r'Email:</span> <a href="mailto:([^"\s]+)\s*"'),
- # 'active' : True
- # Others
- 'address': re.compile(r'Direcci..n:</span> \s*(.*)\s*\r'),
- 'site' : re.compile(r'Sitio: </span><a href="([^"\s]+)\s*"'),
- 'gins' : re.compile(r'Grupo Institucional:</span> \s*(.*)\s*'),
- 'ghom' : re.compile(r'Grupo Homog..neo:</span> \s*(.*)\s*'),
- 'vat' : re.compile(r'CUIT:</span> ([\d-]+)\s* '),
- }
-
-postprocessor_keys = {
- 'code': lambda v, d: 'email' in d and [ s for s in
- d['email'].split('@')[1].split('.')
- if not s in ["ar", "com"]
- ][0].upper() or v,
- 'street': lambda v, d: "%(street)s %(number)s" % d,
- 'name': lambda v, d: d[v].title()
-}
-
-dictkeys = [
- 'code',
- 'name',
- 'bic',
- 'street',
- 'number',
- 'street2',
- 'zip',
- 'city',
- 'state',
- 'country',
- 'latitud',
- 'longitud',
- 'phone',
- 'fax',
- 'email',
- 'active',
- 'id',
- 'vat',
- 'office',
- 'site',
- 'gins',
- 'ghom',
- 'address',
-]
-
-bankfields = [
- 'name',
- 'code',
- 'active',
- 'bic',
- 'street',
- 'street2',
- 'zip',
- 'city',
- 'state',
- 'country',
- 'phone',
- 'fax',
- 'email',
-]
-
-def ar_banks_iterator(
- url_bank_list='http://www.bcra.gov.ar/sisfin/sf010100.asp',
- url_bank_info='http://www.bcra.gov.ar/sisfin/sf010100.asp?bco=%s',
- country='Argentina'):
- """
- Argentinian Banks list iterator.
-
- >>> banks = ar_banks_iterator()
- >>> banks.next().keys() == ['latitud', 'ghom', 'fax', 'code', 'office', \
- 'street2', 'site', 'number', 'phone', \
- 'street', 'address', 'active', 'gins', 'id', \
- 'longitud', 'city', 'name', 'zip', 'country', \
- 'state', 'email', 'vat']
- True
- """
- page_list = urlopen(url_bank_list)
- soup_list = BeautifulSoup(page_list)
-
- for bank in soup_list('option'):
- if 'value' in dict(bank.attrs):
- id, name = bank['value'].strip(), bank.string.strip()
- page_bank = urlopen(url_bank_info % id)
- soup_bank = BeautifulSoup(page_bank)
-
- data = {
- 'id': id,
- 'name': name,
- 'country': country,
- 'active': '1',
- }
- for line in soup_bank('div')[5]('table')[0]('tr'):
- sline = line.td.renderContents()
- for key in compiled_re.keys():
- search = compiled_re[key].search(sline)
- if search:
- data[key] = unicode(search.group(1).strip(), encoding)
- searchaddress = u"%(street)s, %(city)s, %(state)s, %(country)s" % data
- geodata = unify_geo_data(strip_accents(searchaddress))
- data.update(geodata)
- for key in postprocessor_keys.keys():
- if key in data:
- data[key] = postprocessor_keys[key](key, data)
- yield data
-
-def xml_banks():
- print """
-<?xml version="1.0" encoding="UTF-8"?>
-<openerp>
-\t<data noupdate="True">
-"""
- for bank in ar_banks_iterator():
- print "\t\t<record model='res.bank' id='%(id)s'>" % bank
- for key in bankfields:
- if key in bank:
- try:
- print "\t\t\t<field name='%s'>%s</field>" % (key,
- bank[key].encode('utf-8'))
- except:
- print "\t\t\t<field name='%s'>ERROR</field>" % key
- print "\t\t</record>"
- print """
-\t</data>
-</openerp>
-"""
-
-def test_suite():
- import doctest
- return doctest.DocTestSuite()
-
-if __name__ == "__main__":
- xml_banks()
- #import unittest
- #runner = unittest.TextTestRunner()
- #runner.run(test_suite())
-
=== removed file 'l10n_ar_bank/scripts/cache.py'
--- l10n_ar_bank/scripts/cache.py 2011-11-07 13:50:12 +0000
+++ l10n_ar_bank/scripts/cache.py 1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
-import sys, urllib, hashlib, os, os.path, pickle
-from geopy import geocoders
-from types import GeneratorType
-
-gc = geocoders.Google('ABQIAAAAMWm7ddpoRV3HO0u7NtA_IhRTfPMBNX3pvExQyYBKj7aZZJK5lxQYw0LDgWXedvepzKpGxQKf-kmN3A')
-
-def urlopen(url):
- print >> sys.stderr, "Urlopen reading:", url
- basedir = os.path.join(os.getcwd(), 'cache')
- m = hashlib.new('ripemd160')
- m.update(url)
- if not os.path.exists(basedir):
- os.makedirs(basedir)
- tmpfilename = os.path.join(basedir, "urlopen_%s" % m.hexdigest())
- if not os.path.exists(tmpfilename):
- filename, header = urllib.urlretrieve(url, tmpfilename)
- return open(tmpfilename)
-
-def geocode(input_string, **args):
- m = hashlib.new('ripemd160')
- m.update(input_string)
- m.update(pickle.dumps(args))
- tmpfilename = "cache/geocode_%s" % m.hexdigest()
- if not os.path.exists(tmpfilename):
- geocode_out = gc.geocode(input_string, **args)
- if isinstance(geocode_out, GeneratorType):
- geocode_out = list(geocode_out)
- pickle.dump(geocode_out, open(tmpfilename, 'w'))
- else:
- geocode_out = pickle.load(open(tmpfilename))
-
- return geocode_out
-
=== removed file 'l10n_ar_bank/scripts/geosearch.py'
--- l10n_ar_bank/scripts/geosearch.py 2011-11-07 13:50:12 +0000
+++ l10n_ar_bank/scripts/geosearch.py 1970-01-01 00:00:00 +0000
@@ -1,214 +0,0 @@
-#!/usr/bin/python
-
-import re, sys
-from BeautifulSoup import BeautifulSoup
-from strcmp import mostequivalent
-from cache import urlopen, geocode
-import unicodedata
-
-codprov_dict = {
- 'argentina': {
- 'buenos aires': 'B',
- 'buenos aires province': 'B',
- 'catamarca':'K',
- 'chaco':'H',
- 'chubut':'U',
- 'cordoba':'X',
- 'corrientes':'W',
- 'entre rios':'E',
- 'formosa':'P',
- 'jujuy':'Y',
- 'la pampa':'L',
- 'la rioja':'F',
- 'mendoza':'M',
- 'misiones':'N',
- 'neuquen':'Q',
- 'rio negro':'R',
- 'salta':'A',
- 'san juan':'J',
- 'san luis':'D',
- 'santa cruz':'Z',
- 'santa fe':'S',
- 'santiago del estero':'G',
- 'tierra del fuego':'V',
- 'tucuman':'T',
- }
-}
-
-street2_searcher = {
- 'argentina': [
- re.compile('(piso\s+\w+)'),
- ]
-}
-
-def strip_accents(s):
- return ''.join((c for c in unicodedata.normalize('NFD', s) if unicodedata.category(c) != 'Mn'))
-
-def _st(i, s=' ', m='+'):
- i = i.lower()
- i = m.join(i.split(s))
- i = i.encode('ascii', 'xmlcharrefreplace')
- return i
-
-def search_zip(street, number, city, state, country, unique=True):
- """
- Return zipcode. Only works with argentina.
-
- >>> search_zip("rivadavia", "9800", "buenos aires", "capital federal", "argentina")
- u'C1407DZT'
- >>> search_zip("jose clemente paz", "1200", "jose clemente paz", "buenos aires", "argentina")
- u'B1665BBB'
- >>> search_zip("general paz", "5445", "general san martin", "buenos aires", "argentina")
- u'1650'
- """
- street = strip_accents(street.lower())
- city = strip_accents(city.lower())
- state = strip_accents(state.lower())
- country = strip_accents(country.lower())
-
- codpos = None
-
- if country in ['argentina', 'ar']:
-
- # Elimina titulos de calles y avidas
- street = re.sub('\s*av\s+', '', street)
-
- re_cpa = re.compile('>(\w{8})<')
-
- if state in ['capital federal']:
- codloca=['5001',]
- codpos=['',]
- else:
- url="http://www3.correoargentino.com.ar/scriptsN/cpa/cpa_loca.idc?codprov=%s&pnl=%s"
- inpage = urlopen(url % (codprov_dict[country][state], _st(city)))
- soup = BeautifulSoup(inpage)
- options = soup.findAll('option')
- if len(options) == 0:
- raise RuntimeError('No locations for "%s"' % ','.join([street, number, city, state,
- country]))
-
- loca = map(lambda opt: re.search('(.*)\s*\(\d+\)',
- opt.string.lower()).groups()[0].strip(), options)
- codloca = map(lambda opt: opt['value'], options)
- codpos = map(lambda opt: re.search('\((\d+)\)', opt.string).groups()[0], options)
-
- for i in xrange(len(codloca)):
- url="http://www3.correoargentino.com.ar/scriptsN/cpa/cpa_calle.idc?codloca=%s&pnc=%s&alt=%s"
- inpage = urlopen(url % (codloca[i], _st(street), number))
- soup = BeautifulSoup(inpage)
- output = soup.body.div.table.tr.td.renderContents()
- match = re_cpa.search(output)
- if match: codpos[i] = match.group(1)
-
- if len(codloca) > 1 and unique:
- i = mostequivalent(loca, city)
- return codpos[i]
- else:
- return unicode(codpos[0])
- else:
- raise NotImplementedError
-
-
-def unify_geo_data(input_string):
- """
- Return unified geographic data
-
- >>> data = unify_geo_data("Av. rivadavia 9858, buenos aires, argentina")
- >>> data == {'latitud': -34.637979199999997, 'city': u'Buenos Aires',\
- 'country': u'Argentina', 'number': u'9858',\
- 'state': u'Capital Federal',\
- 'street': u'Av Rivadavia', 'street2': '',\
- 'longitud': -58.503058099999997, 'zip': 'C1407DZU'}
- True
- >>> data = unify_geo_data("gral paz 9858, general san martin, buenos aires, argentina")
- >>> data == {'latitud': -34.581238599999999, 'city': '', 'zip': '',\
- 'country': u'Argentina', 'number': u'9858',\
- 'state': u'Buenos Aires', 'street': u'Gral. Paz',\
- 'street2': '', 'longitud': -58.513873400000001}
- True
- >>> data = unify_geo_data("VICTORIA OCAMPO 360 PISO PB,CAPITAL FEDERAL,CAPITAL FEDERAL,Argentina")
- >>> data == {'latitud': -34.601967000000002, 'city': u'Buenos Aires',\
- 'zip': '', 'country': u'Argentina', 'street2': 'piso pb',\
- 'number': u'360', 'state': u'Capital Federal',\
- 'street': u'Victoria Ocampo', 'longitud': -58.364093699999998}
- True
- >>> data = unify_geo_data("AV. DEL LIBERTADOR 767 PISO 1,VICENTE LOPEZ,BUENOS AIRES,Argentina")
- >>> data == {'latitud': -34.527026800000002, 'city': u'Vicente L\xf3pez',\
- 'zip': u'1638', 'country': u'Argentina', 'street2': 'piso 1',\
- 'number': u'767', 'state': u'Buenos Aires Province',\
- 'street': u'Av Del Libertador Gral. San Martin',\
- 'longitud': -58.471314999999997}
- True
- >>> data = unify_geo_data("PELLEGRINI 255,,,SANTA ROSA,LA PAMPA,Argentina")
- >>> data == {'latitud': -36.619441799999997, 'city': u'Santa Rosa',\
- 'zip': u'L6300DRE', 'country': u'Argentina', 'street2': '',\
- 'number': u'255', 'state': u'La Pampa', 'street': u'Pellegrini',\
- 'longitud': -64.292496499999999}
- True
- """
- print >> sys.stderr, "Unifying:", input_string
- input_string = input_string.lower()
- # Remove sporius data for search and store it in street2
- street2 = []
- for country in street2_searcher.keys():
- if country in input_string:
- for rexp in street2_searcher[country]:
- match = rexp.search(input_string)
- if match:
- street2.append(','.join(match.groups()))
- input_string = rexp.sub('', input_string)
- street2 = ','.join(street2)
- input_string = input_string.encode('ascii', 'ignore')
-
- # Search data in geographics database
- try:
- place, (lat, lng) = geocode(_st(input_string, " ", " "))
- except ValueError:
- places = list(geocode(input_string, exactly_one=False))
- i = mostequivalent(map(lambda (a,b): a, places), input_string)
- place, (lat, lng) = places[i]
- data = {}
- result = map(lambda s: s.strip(), place.split(','))
- # Ordering data
- if len(result) == 4:
- address, data['city'], data['state'], data['country'] = result
- else:
- address, data['state'], data['country'] = result
- data['city'] = ''
- data['latitud'] = lat
- data['longitud'] = lng
- # Split address data
- if data['country'] in ['Argentina',]:
- s = re.search(r'^\s*(.*)\s+(\d+)\s*$', address)
- if s != None:
- street, number = s.groups()
- else:
- street = input_string.split(',')[0]
- s = re.search(r'(.*)\s+(\d+)', street)
- if s != None:
- street, number = s.groups()
- else:
- number = ''
- data['city'] = address
- else:
- number, street = re.search(r'(\d*)\s+(.*)', address).groups()
- data['street'] = street.strip()
- data['street2'] = street2.strip()
- data['number'] = number.strip()
- # Load zip data
- try:
- data['zip'] = search_zip(data['street'], data['number'], data['city'],
- data['state'], data['country'])
- except:
- data['zip'] = ''
- return data
-
-def test_suite():
- import doctest
- return doctest.DocTestSuite()
-
-if __name__ == "__main__":
- import unittest
- runner = unittest.TextTestRunner()
- runner.run(test_suite())
-
=== removed file 'l10n_ar_bank/scripts/strcmp.py'
--- l10n_ar_bank/scripts/strcmp.py 2011-11-07 13:50:12 +0000
+++ l10n_ar_bank/scripts/strcmp.py 1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
-def shist(s, chars="abcdefghijklmnopqrstuvwxyz .01234567"):
- """
- Generate a histogram for s
-
- >>> shist('hola mundo')
- [1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- """
- h = [0] * len(chars)
- _i = dict(zip(chars, range(len(chars))))
- for c in s:
- try:
- h[_i[c]] = h[_i[c]] + 1
- except:
- pass
- return h
-
-def mostequivalent(strings, S):
- """
- Return the index of the most equivalent string in strings to S using a
- histogram.
-
- >>> mostequivalent(['el perro esta en la casa', 'mundo nuevo'], 'hola mundo')
- 1
- """
- Sshist = shist(S)
- stringshist = map(shist, strings)
- md = -1
- for i in xrange(len(stringshist)):
- d = sum(map(lambda (a,b): abs(a-b), zip(stringshist[i], Sshist)))
- if i == 0 or d < md:
- mi, md = i, d
- return mi
-
-def test_suite():
- import doctest
- return doctest.DocTestSuite()
-
-if __name__ == "__main__":
- import unittest
- runner = unittest.TextTestRunner()
- runner.run(test_suite())
-
=== added directory 'l10n_ar_bank/security'
=== added file 'l10n_ar_bank/security/groups.xml'
--- l10n_ar_bank/security/groups.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/security/groups.xml 2012-09-20 22:35:24 +0000
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+ <data>
+##############################################################################
+#
+# account_fiscal_position_name module for OpenERP, Show name instead of description
+# Copyright (C) 2011 SYLEAM Info Services ([http://www.Syleam.fr/])
+# Sebastien LANGE [sebastien.lange@xxxxxxxxx]
+#
+# This file is a part of account_fiscal_position_name
+#
+# account_fiscal_position_name is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# account_fiscal_position_name is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see [http://www.gnu.org/licenses/].
+#
+##############################################################################
+
+
+ </data>
+</openerp>
\ No newline at end of file
=== added file 'l10n_ar_bank/security/ir.model.access.csv'
--- l10n_ar_bank/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/security/ir.model.access.csv 2012-09-20 22:35:24 +0000
@@ -0,0 +1,1 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
=== added directory 'l10n_ar_bank/wizard'
=== added file 'l10n_ar_bank/wizard/.directory'
--- l10n_ar_bank/wizard/.directory 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/wizard/.directory 2012-09-20 22:35:24 +0000
@@ -0,0 +1,5 @@
+[Dolphin]
+AdditionalInfo=35
+Sorting=6
+Timestamp=2012,9,5,17,18,45
+ViewMode=1
=== added file 'l10n_ar_bank/wizard/__init__.py'
--- l10n_ar_bank/wizard/__init__.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/wizard/__init__.py 2012-09-20 22:35:24 +0000
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+"""
+Import operations model 347 engine wizards
+"""
+__author__ = "López Ignacio M. (www.dinamotion.com.ar) - lopezignacio@xxxxxxxxx"
+
+import wiz_l10n_ar_bank
\ No newline at end of file
=== added file 'l10n_ar_bank/wizard/banks_def.py'
--- l10n_ar_bank/wizard/banks_def.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/wizard/banks_def.py 2012-09-20 22:35:24 +0000
@@ -0,0 +1,160 @@
+# -*- coding: utf-8 -*-
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2011-2014 OpenERP - Team de Localización Argentina.
+# https://launchpad.net/~openerp-l10n-ar-localization
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#############################################################################
+"""
+Import from BCRA banks of Argentina
+"""
+
+try:
+ import geopy
+except ImportError:
+ print "Please, intall geopy using 'pip install geopy'."
+
+from BeautifulSoup import BeautifulSoup
+import re
+from geosearch import unify_geo_data, strip_accents
+from cache import urlopen
+
+encoding = 'ISO-8859-1'
+compiled_re = {
+ # Common
+ 'code' : re.compile(r'N... Banco:</span>\s*(\d+)'),
+ # 'name': calculated,
+ 'office' : re.compile(r'Direcci..n:</span> \s*(.{40})'),
+ 'street' : re.compile(r'Direcci..n:</span> \s*.{40}([^-]*)-'),
+ # 'street2': None
+ 'city' : re.compile(r'Direcci..n:</span> \s*.{40}[^-]*-([^-]*)-'),
+ 'state' : re.compile(r'Direcci..n:</span> \s*.{40}[^-]*-[^-]*-([^-]*)'),
+ # 'country': 'Argentina',
+ 'phone' : re.compile(r'Tel..fono:</span> ([\d-]+)\s* '),
+ 'fax' : re.compile(r'Fax:</span> ([\d-]+)\s* '),
+ 'email' : re.compile(r'Email:</span> <a href="mailto:([^"\s]+)\s*"'),
+ # 'active' : True
+ # Others
+ 'address': re.compile(r'Direcci..n:</span> \s*(.*)\s*\r'),
+ 'site' : re.compile(r'Sitio: </span><a href="([^"\s]+)\s*"'),
+ 'gins' : re.compile(r'Grupo Institucional:</span> \s*(.*)\s*'),
+ 'ghom' : re.compile(r'Grupo Homog..neo:</span> \s*(.*)\s*'),
+ 'vat' : re.compile(r'CUIT:</span> ([\d-]+)\s* '),
+ }
+
+
+postprocessor_keys = {
+ 'code': lambda v, d: 'email' in d and [ s for s in
+ d['email'].split('@')[1].split('.')
+ if not s in ["ar", "com"]
+ ][0].upper() or v,
+ 'street': lambda v, d: "%(street)s %(number)s" % d,
+ 'name': lambda v, d: d[v].title(),
+ 'state': lambda v, d: d[v].replace(" Province","")
+}
+
+dictkeys = [
+ 'code',
+ 'name',
+ 'bic',
+ 'street',
+ 'number',
+ 'street2',
+ 'zip',
+ 'city',
+ 'state',
+ 'country',
+ 'latitud',
+ 'longitud',
+ 'phone',
+ 'fax',
+ 'email',
+ 'active',
+ 'id',
+ 'vat',
+ 'office',
+ 'site',
+ 'gins',
+ 'ghom',
+ 'address',
+]
+
+bankfields = [
+ 'id',
+ 'name',
+ 'code',
+ 'active',
+ 'bic',
+ 'street',
+ 'street2',
+ 'zip',
+ 'city',
+ 'state',
+ 'country',
+ 'phone',
+ 'fax',
+ 'email',
+ 'vat',
+]
+
+def ar_banks_iterator(
+ url_bank_list='http://www.bcra.gov.ar/sisfin/sf010100.asp',
+ url_bank_info='http://www.bcra.gov.ar/sisfin/sf010100.asp?bco=%s',
+ country='Argentina'):
+ """
+ Argentinian Banks list iterator.
+
+ >>> banks = ar_banks_iterator()
+ >>> banks.next().keys() == ['latitud', 'ghom', 'fax', 'code', 'office', \
+ 'street2', 'site', 'number', 'phone', \
+ 'street', 'address', 'active', 'gins', 'id', \
+ 'longitud', 'city', 'name', 'zip', 'country', \
+ 'state', 'email', 'vat']
+ True
+ """
+ page_list = urlopen(url_bank_list)
+ soup_list = BeautifulSoup(page_list)
+
+ for bank in soup_list('option'):
+ if 'value' in dict(bank.attrs):
+ id, name = bank['value'].strip(), bank.string.strip()
+ page_bank = urlopen(url_bank_info % id)
+ soup_bank = BeautifulSoup(page_bank)
+
+ data = {
+ 'id': id,
+ 'name': name,
+ 'country': country,
+ 'active': '1',
+ }
+ for line in soup_bank('div')[5]('table')[0]('tr'):
+ sline = line.td.renderContents()
+ for key in compiled_re.keys():
+ search = compiled_re[key].search(sline)
+ if search:
+ data[key] = unicode(search.group(1).strip(), encoding)
+ searchaddress = u"%(street)s, %(city)s, %(state)s, %(country)s" % data
+ geodata = unify_geo_data(strip_accents(searchaddress))
+ data.update(geodata)
+ for key in postprocessor_keys.keys():
+ if key in data:
+ data[key] = postprocessor_keys[key](key, data)
+ data[key] = data[key].encode('utf-8')
+ yield data
+
+
+
=== added file 'l10n_ar_bank/wizard/cache.py'
--- l10n_ar_bank/wizard/cache.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/wizard/cache.py 2012-09-20 22:35:24 +0000
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+import sys, urllib, hashlib, os, os.path, pickle
+from geopy import geocoders
+from types import GeneratorType
+
+gc = geocoders.Google('ABQIAAAAMWm7ddpoRV3HO0u7NtA_IhRTfPMBNX3pvExQyYBKj7aZZJK5lxQYw0LDgWXedvepzKpGxQKf-kmN3A')
+
+def urlopen(url):
+ print >> sys.stderr, "Urlopen reading:", url
+ basedir = os.path.join(os.getcwd(), 'cache')
+ m = hashlib.new('ripemd160')
+ m.update(url)
+ if not os.path.exists(basedir):
+ os.makedirs(basedir)
+ tmpfilename = os.path.join(basedir, "urlopen_%s" % m.hexdigest())
+ if not os.path.exists(tmpfilename):
+ filename, header = urllib.urlretrieve(url, tmpfilename)
+ return open(tmpfilename)
+
+def geocode(input_string, **args):
+ m = hashlib.new('ripemd160')
+ m.update(input_string)
+ m.update(pickle.dumps(args))
+ tmpfilename = "cache/geocode_%s" % m.hexdigest()
+ if not os.path.exists(tmpfilename):
+ geocode_out = gc.geocode(input_string, **args)
+ if isinstance(geocode_out, GeneratorType):
+ geocode_out = list(geocode_out)
+ pickle.dump(geocode_out, open(tmpfilename, 'w'))
+ else:
+ geocode_out = pickle.load(open(tmpfilename))
+
+ return geocode_out
+
=== added file 'l10n_ar_bank/wizard/geosearch.py'
--- l10n_ar_bank/wizard/geosearch.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/wizard/geosearch.py 2012-09-20 22:35:24 +0000
@@ -0,0 +1,215 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+import re, sys
+from BeautifulSoup import BeautifulSoup
+from strcmp import mostequivalent
+from cache import urlopen, geocode
+import unicodedata
+
+codprov_dict = {
+ 'argentina': {
+ 'buenos aires': 'B',
+ 'buenos aires province': 'B',
+ 'catamarca':'K',
+ 'chaco':'H',
+ 'chubut':'U',
+ 'cordoba':'X',
+ 'corrientes':'W',
+ 'entre rios':'E',
+ 'formosa':'P',
+ 'jujuy':'Y',
+ 'la pampa':'L',
+ 'la rioja':'F',
+ 'mendoza':'M',
+ 'misiones':'N',
+ 'neuquen':'Q',
+ 'rio negro':'R',
+ 'salta':'A',
+ 'san juan':'J',
+ 'san luis':'D',
+ 'santa cruz':'Z',
+ 'santa fe':'S',
+ 'santiago del estero':'G',
+ 'tierra del fuego':'V',
+ 'tucuman':'T',
+ }
+}
+
+street2_searcher = {
+ 'argentina': [
+ re.compile('(piso\s+\w+)'),
+ ]
+}
+
+def strip_accents(s):
+ return ''.join((c for c in unicodedata.normalize('NFD', s) if unicodedata.category(c) != 'Mn'))
+
+def _st(i, s=' ', m='+'):
+ i = i.lower()
+ i = m.join(i.split(s))
+ i = i.encode('ascii', 'xmlcharrefreplace')
+ return i
+
+#def search_zip(street, number, city, state, country, unique=True):
+ #"""
+ #Return zipcode. Only works with argentina.
+
+ #>>> search_zip("rivadavia", "9800", "buenos aires", "capital federal", "argentina")
+ #u'C1407DZT'
+ #>>> search_zip("jose clemente paz", "1200", "jose clemente paz", "buenos aires", "argentina")
+ #u'B1665BBB'
+ #>>> search_zip("general paz", "5445", "general san martin", "buenos aires", "argentina")
+ #u'1650'
+ #"""
+ #street = strip_accents(street.lower())
+ #city = strip_accents(city.lower())
+ #state = strip_accents(state.lower())
+ #country = strip_accents(country.lower())
+
+ #codpos = None
+
+ #if country in ['argentina', 'ar']:
+
+ ## Elimina titulos de calles y avidas
+ #street = re.sub('\s*av\s+', '', street)
+
+ #re_cpa = re.compile('>(\w{8})<')
+
+ #if state in ['capital federal']:
+ #codloca=['5001',]
+ #codpos=['',]
+ #else:
+ #url="http://www3.correoargentino.com.ar/scriptsN/cpa/cpa_loca.idc?codprov=%s&pnl=%s"
+ #inpage = urlopen(url % (codprov_dict[country][state], _st(city)))
+ #soup = BeautifulSoup(inpage)
+ #options = soup.findAll('option')
+ #if len(options) == 0:
+ #raise RuntimeError('No locations for "%s"' % ','.join([street, number, city, state,
+ #country]))
+
+ #loca = map(lambda opt: re.search('(.*)\s*\(\d+\)',
+ #opt.string.lower()).groups()[0].strip(), options)
+ #codloca = map(lambda opt: opt['value'], options)
+ #codpos = map(lambda opt: re.search('\((\d+)\)', opt.string).groups()[0], options)
+
+ #for i in xrange(len(codloca)):
+ #url="http://www3.correoargentino.com.ar/scriptsN/cpa/cpa_calle.idc?codloca=%s&pnc=%s&alt=%s"
+ #inpage = urlopen(url % (codloca[i], _st(street), number))
+ #soup = BeautifulSoup(inpage)
+ #output = soup.body.div.table.tr.td.renderContents()
+ #match = re_cpa.search(output)
+ #if match: codpos[i] = match.group(1)
+
+ #if len(codloca) > 1 and unique:
+ #i = mostequivalent(loca, city)
+ #return codpos[i]
+ #else:
+ #return unicode(codpos[0])
+ #else:
+ #raise NotImplementedError
+
+
+def unify_geo_data(input_string):
+ """
+ Return unified geographic data
+
+ >>> data = unify_geo_data("Av. rivadavia 9858, buenos aires, argentina")
+ >>> data == {'latitud': -34.637979199999997, 'city': u'Buenos Aires',\
+ 'country': u'Argentina', 'number': u'9858',\
+ 'state': u'Capital Federal',\
+ 'street': u'Av Rivadavia', 'street2': '',\
+ 'longitud': -58.503058099999997, 'zip': 'C1407DZU'}
+ True
+ >>> data = unify_geo_data("gral paz 9858, general san martin, buenos aires, argentina")
+ >>> data == {'latitud': -34.581238599999999, 'city': '', 'zip': '',\
+ 'country': u'Argentina', 'number': u'9858',\
+ 'state': u'Buenos Aires', 'street': u'Gral. Paz',\
+ 'street2': '', 'longitud': -58.513873400000001}
+ True
+ >>> data = unify_geo_data("VICTORIA OCAMPO 360 PISO PB,CAPITAL FEDERAL,CAPITAL FEDERAL,Argentina")
+ >>> data == {'latitud': -34.601967000000002, 'city': u'Buenos Aires',\
+ 'zip': '', 'country': u'Argentina', 'street2': 'piso pb',\
+ 'number': u'360', 'state': u'Capital Federal',\
+ 'street': u'Victoria Ocampo', 'longitud': -58.364093699999998}
+ True
+ >>> data = unify_geo_data("AV. DEL LIBERTADOR 767 PISO 1,VICENTE LOPEZ,BUENOS AIRES,Argentina")
+ >>> data == {'latitud': -34.527026800000002, 'city': u'Vicente L\xf3pez',\
+ 'zip': u'1638', 'country': u'Argentina', 'street2': 'piso 1',\
+ 'number': u'767', 'state': u'Buenos Aires Province',\
+ 'street': u'Av Del Libertador Gral. San Martin',\
+ 'longitud': -58.471314999999997}
+ True
+ >>> data = unify_geo_data("PELLEGRINI 255,,,SANTA ROSA,LA PAMPA,Argentina")
+ >>> data == {'latitud': -36.619441799999997, 'city': u'Santa Rosa',\
+ 'zip': u'L6300DRE', 'country': u'Argentina', 'street2': '',\
+ 'number': u'255', 'state': u'La Pampa', 'street': u'Pellegrini',\
+ 'longitud': -64.292496499999999}
+ True
+ """
+ #print >> sys.stderr, "Unifying:", input_string
+ input_string = input_string.lower()
+ # Remove sporius data for search and store it in street2
+ street2 = []
+ for country in street2_searcher.keys():
+ if country in input_string:
+ for rexp in street2_searcher[country]:
+ match = rexp.search(input_string)
+ if match:
+ street2.append(','.join(match.groups()))
+ input_string = rexp.sub('', input_string)
+ street2 = ','.join(street2)
+ input_string = input_string.encode('ascii', 'ignore')
+
+ # Search data in geographics database
+ try:
+ place, (lat, lng) = geocode(_st(input_string, " ", " "))
+ except ValueError:
+ places = list(geocode(input_string, exactly_one=False))
+ i = mostequivalent(map(lambda (a,b): a, places), input_string)
+ place, (lat, lng) = places[i]
+ data = {}
+ result = map(lambda s: s.strip(), place.split(','))
+ # Ordering data
+ if len(result) == 4:
+ address, data['city'], data['state'], data['country'] = result
+ else:
+ address, data['state'], data['country'] = result
+ data['city'] = ''
+ data['latitud'] = lat
+ data['longitud'] = lng
+ # Split address data
+ if data['country'] in ['Argentina',]:
+ s = re.search(r'^\s*(.*)\s+(\d+)\s*$', address)
+ if s != None:
+ street, number = s.groups()
+ else:
+ street = input_string.split(',')[0]
+ s = re.search(r'(.*)\s+(\d+)', street)
+ if s != None:
+ street, number = s.groups()
+ else:
+ number = ''
+ data['city'] = address
+ else:
+ number, street = re.search(r'(\d*)\s+(.*)', address).groups()
+ data['street'] = street.strip()
+ data['street2'] = street2.strip()
+ data['number'] = number.strip()
+ # Load zip data
+ #try:
+ #data['zip'] = search_zip(data['street'], data['number'], data['city'],
+ #data['state'], data['country'])
+ #except:
+ data['zip'] = ''
+ return data
+
+def test_suite():
+ import doctest
+ return doctest.DocTestSuite()
+
+if __name__ == "__main__":
+ import unittest
+ runner = unittest.TextTestRunner()
+ runner.run(test_suite())
+
=== added file 'l10n_ar_bank/wizard/strcmp.py'
--- l10n_ar_bank/wizard/strcmp.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/wizard/strcmp.py 2012-09-20 22:35:24 +0000
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+def shist(s, chars="abcdefghijklmnopqrstuvwxyz .01234567"):
+ """
+ Generate a histogram for s
+
+ >>> shist('hola mundo')
+ [1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
+ """
+ h = [0] * len(chars)
+ _i = dict(zip(chars, range(len(chars))))
+ for c in s:
+ try:
+ h[_i[c]] = h[_i[c]] + 1
+ except:
+ pass
+ return h
+
+def mostequivalent(strings, S):
+ """
+ Return the index of the most equivalent string in strings to S using a
+ histogram.
+
+ >>> mostequivalent(['el perro esta en la casa', 'mundo nuevo'], 'hola mundo')
+ 1
+ """
+ Sshist = shist(S)
+ stringshist = map(shist, strings)
+ md = -1
+ for i in xrange(len(stringshist)):
+ d = sum(map(lambda (a,b): abs(a-b), zip(stringshist[i], Sshist)))
+ if i == 0 or d < md:
+ mi, md = i, d
+ return mi
+
+def test_suite():
+ import doctest
+ return doctest.DocTestSuite()
+
+if __name__ == "__main__":
+ import unittest
+ runner = unittest.TextTestRunner()
+ runner.run(test_suite())
+
=== added file 'l10n_ar_bank/wizard/wiz_l10n_ar_bank.py'
--- l10n_ar_bank/wizard/wiz_l10n_ar_bank.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/wizard/wiz_l10n_ar_bank.py 2012-09-20 22:35:24 +0000
@@ -0,0 +1,147 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2011-2014 OpenERP - Team de Localización Argentina.
+# https://launchpad.net/~openerp-l10n-ar-localization
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#############################################################################
+
+from osv import fields,osv
+from tools.translate import _
+import time
+
+from banks_def import *
+
+class l10n_ar_banks_wizard(osv.osv_memory):
+ _name = 'l10nar.banks.wizard'
+
+ def on_cancel(self, cr, uid, ids, context):
+ return {}
+
+ def on_process (self, cr, uid, ids, context):
+ """
+ Tomo los datos de los banco de BCRA.
+ """
+ Resultados={}
+ bancos_procesados = 0
+ bancos_actualizados = 0
+ bancos_nuevos = 0
+ bancos_desahabilitados = 0
+
+ update_date = time.strftime('%Y-%m-%d')
+ idargentina = self.pool.get('res.country').search(cr, uid, [('name', '=', 'Argentina')])[0]
+ idbuenosaires = self.pool.get('res.country.state').search(cr, uid, [('name', '=', 'Buenos Aires')])[0]
+ idciudadbuenosaires = self.pool.get('res.country.state').search(cr, uid, [('name', '=', 'Ciudad Autónoma de Buenos Aires')])[0]
+ Bancos_obj = self.pool.get('res.bank')
+
+ TodosLosBancosArgentinos = Bancos_obj.search(cr, uid, [('country', '=', idargentina)])
+ self.pool.get('res.bank').write(cr, uid, TodosLosBancosArgentinos, {'active': False}, context=context)
+ bancos_desahabilitados = len(TodosLosBancosArgentinos)
+
+ for bank in ar_banks_iterator():
+ bancos_procesados += 1
+ vals={}
+ for key in bankfields:
+ if key in bank:
+ valor=bank[key]
+ if key == 'country' :
+ valor=idargentina
+ if key == 'state' :
+ if bank[key] == 'Buenos Aires':
+ valor = idbuenosaires
+ elif bank[key] == 'Autonomous City of Buenos Aires':
+ valor = idciudadbuenosaires
+ else:
+ valor = self.pool.get('res.country.state').search(cr, uid, [('name', '=', bank[key])])[0]
+ vals.update({key:valor})
+
+ vals.update({'update' : time.strftime('%Y-%m-%d')})
+
+ Bancos_ids = Bancos_obj.search(cr, uid, [('name', '=', bank.get('name')),('country', '=', idargentina),('active', '=', False)])
+ if not(Bancos_ids):
+ Bancos_ids = Bancos_obj.search(cr, uid, [('vat', '=', bank.get('vat')), ('country', '=', idargentina),('active', '=', False)])
+ if not(Bancos_ids):
+ Bancos_ids = Bancos_obj.search(cr, uid, [('street', '=', bank.get('street')), ('city', '=', bank.get('city')), ('country', '=', idargentina),('active', '=', False)])
+
+ if Bancos_ids:
+ bancos_desahabilitados -= 1
+ bancos_actualizados += 1
+ self.pool.get('res.bank').write(cr, uid, [Bancos_ids[0]], vals, context=context)
+ else:
+ bancos_nuevos += 1
+ self.pool.get('res.bank').create(cr, uid, vals, context=context)
+
+ Resultados.update({'bancos_procesados' : bancos_procesados})
+ Resultados.update({'bancos_actualizados' : bancos_actualizados})
+ Resultados.update({'bancos_nuevos' : bancos_nuevos})
+ Resultados.update({'bancos_desahabilitados' : bancos_desahabilitados})
+
+ return {
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'context': Resultados,
+ 'res_model': 'l10nar.banks.wizard.result',
+ 'type': 'ir.actions.act_window',
+ 'target': 'new'
+ }
+
+l10n_ar_banks_wizard()
+
+
+class l10n_ar_banks_wizard_result(osv.osv_memory):
+ _name = 'l10nar.banks.wizard.result'
+
+ def _get_bancos_actualizados(self, cr, uid, context=None):
+ if context is None:
+ context = {}
+ valor = context.get('bancos_actualizados')
+ return valor
+
+ def _get_bancos_nuevos(self, cr, uid, context=None):
+ if context is None:
+ context = {}
+ valor = context.get('bancos_nuevos')
+ return valor
+
+ def _get_bancos_desahabilitados(self, cr, uid, context=None):
+ if context is None:
+ context = {}
+ valor = context.get('bancos_desahabilitados')
+ return valor
+
+ def _get_bancos_procesados(self, cr, uid, context=None):
+ if context is None:
+ context = {}
+ valor = context.get('bancos_procesados')
+ return valor
+
+ _columns = {
+ 'bancos_actualizados' : fields.char(_('Banks Upgraded'), size=3),
+ 'bancos_nuevos' : fields.char(_('New Banks'), size=3),
+ 'bancos_desahabilitados' : fields.char(_('Desactivated Banks'), size=3),
+ 'bancos_procesados' : fields.char(_('Banks total processed'), size=3),
+ }
+ _defaults = {
+ 'bancos_actualizados' : _get_bancos_actualizados,
+ 'bancos_nuevos' : _get_bancos_nuevos,
+ 'bancos_desahabilitados' : _get_bancos_desahabilitados,
+ 'bancos_procesados' : _get_bancos_procesados,
+ }
+
+ def on_close(self, cr, uid, ids, context):
+ return {}
+
+l10n_ar_banks_wizard_result()
\ No newline at end of file
=== added file 'l10n_ar_bank/wizard/wiz_l10n_ar_bank.xml'
--- l10n_ar_bank/wizard/wiz_l10n_ar_bank.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_bank/wizard/wiz_l10n_ar_bank.xml 2012-09-20 22:35:24 +0000
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="l10n_ar_banks_wizard" model="ir.ui.view">
+ <field name="name">l10nar.banks.wizard.form</field>
+ <field name="model">l10nar.banks.wizard</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Updater Banks from Central Bank of Argentina">
+
+ <newline />
+ <label string="ATTENTION!" colspan="4" />
+ <newline />
+ <label string="In this update the Banks of Argentina" colspan="4" />
+ <label string="with On-Line data taken from Central Bank of Argentina." colspan="4" />
+ <newline />
+ <button string="Cancel" special="cancel" name="on_cancel" icon="gtk-cancel" colspan="2"/>
+ <button string="Take data and Update" name="on_process" type="object" icon="gtk-ok" colspan="2"/>
+
+ </form>
+ </field>
+ </record>
+
+ <record id="l10n_ar_banks_wizard_result" model="ir.ui.view">
+ <field name="name">l10nar.banks.wizard.result.form</field>
+ <field name="model">l10nar.banks.wizard.result</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+
+ <form string="Updater Banks from Central Bank of Argentina">
+ <label string="Results of Updates:" colspan="4" />
+ <newline />
+ <field name="bancos_procesados" readonly='1'/>
+ <field name="bancos_desahabilitados" readonly='1'/>
+ <field name="bancos_actualizados" readonly='1'/>
+ <field name="bancos_nuevos" readonly='1'/>
+ <newline />
+ <button string="Close" colspan="4" name="on_close" special="cancel" icon="gtk-ok" />
+
+ </form>
+ </field>
+ </record>
+
+ </data>
+</openerp>
=== modified file 'l10n_ar_states/README'
--- l10n_ar_states/README 2012-01-02 12:25:49 +0000
+++ l10n_ar_states/README 2012-09-20 22:35:24 +0000
@@ -1,7 +1,9 @@
Módulo de localización Argentina
Autores:
+ Ignacio Martín López - www.dinamotion.com.ar <ignacio@xxxxxxxxxxxxxxxxx>
Luis Falcon <lfalcon@xxxxxxxxxxx>
+ Cristian S. Rocha <cristian.rocha@xxxxxxxxxxxxxxxxxxxxxxxx>
Bruno M. Villasanti <bvillasanti@xxxxxxxxxxx>
Licencia: GPL-3
=== modified file 'l10n_ar_states/data/res_country_state.xml'
--- l10n_ar_states/data/res_country_state.xml 2012-01-02 12:25:49 +0000
+++ l10n_ar_states/data/res_country_state.xml 2012-09-20 22:35:24 +0000
@@ -2,6 +2,13 @@
<openerp>
<data noupdate="True">
+ <record model="res.country.state" id="CBA">
+ <field name="name">Ciudad Autónoma de Buenos Aires</field>
+ <field name="code">ABA</field>
+ <field name="country_id" ref="base.ar"/>
+ <field name="afip_code">0</field>
+ </record>
+
<record model="res.country.state" id="B">
<field name="name">Buenos Aires</field>
<field name="code">B</field>
Follow ups