Skip to content

Commit dfb5063

Browse files
committed
IMP bank module
1 parent 847d3ad commit dfb5063

File tree

7 files changed

+101
-123
lines changed

7 files changed

+101
-123
lines changed

l10n_ar_bank/__openerp__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,15 @@
2121
{ 'active': False,
2222
'author': 'OpenERP - Team de Localizaci\xc3\xb3n Argentina',
2323
'category': 'Localization/Argentina',
24-
'demo_xml': [],
24+
'demo': [],
2525
'depends': ['base', 'l10n_ar_states'],
2626
'description': '\n\nBanks of Argentina\n\n==================\n\n\n\nSpanish\n\n-------\n\n\n\nListado de entidades financieras habilitadas por el BCRA.\n\n\n\nEste m\xc3\xb3dulo le permite tener a disposici\xc3\xb3n el listado actualizado de\n\nlas entidades bancarias de la Rep\xc3\xbablica Argentina.\n\n\n\nIncluye:\n\n - Entidades financieras (http://www.bcra.gov.ar/)\n\n - Asistente de actualizaci\xc3\xb3n de bancos.\n\n\n\nRequiere:\n\n\tBeautifulSoup\n\n\tgeopy\n\n\n\nPara que el asistente funcione debe tener instalada ambos m\xc3\xb3dulos de python.\n\n\n\nInstalaci\xc3\xb3n de los requerimientos:\n\n\n\n\t$ pip install BeautifulSoup\n\n\t$ pip install geopy\n\n\n\nejecutar desde la linea de comandos.\n\n\n\nEnglish\n\n-------\n\n\n\nIncludes:\n\n - Financial Entities (http://www.bcra.gov.ar/)\n\n - A wizard online updater.\n\n\n\nRequires:\n\n\tBeautifulSoup\n\n\tgeopy\n\n\n\nAttention, to run the wizard you need to have installed two libraries in python.\n\nWithout these two libraries the wizard will fail and will not update the information.\n\n\n\nInstall them using:\n\n\n\n\t$ pip install BeautifulSoup\n\n\t$ pip install geopy\n\n\n\nfrom the CLI.\n\n\n\n',
2727
'external_dependencies': { 'python': ['BeautifulSoup', 'geopy']},
28-
'init_xml': [],
2928
'installable': True,
3029
'license': 'AGPL-3',
3130
'name': 'Banks of Argentina',
3231
'test': ['test/l10n_ar_banks_wizard.yml'],
33-
'update_xml': [ 'data/res_bank.xml',
32+
'data': [ 'data/res_bank.xml',
3433
'l10n_ar_bank.xml',
3534
'l10n_ar_bank_menu.xml',
3635
'wizard/wiz_l10n_ar_bank.xml'],

l10n_ar_bank/data/res_bank.xml

+81-81
Large diffs are not rendered by default.

l10n_ar_bank/l10n_ar_bank.py

+5-26
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,14 @@
11
# -*- coding: utf-8 -*-
2-
##############################################################################
3-
#
4-
# Copyright (C) 2011-2014 OpenERP - Team de Localización Argentina.
5-
# https://launchpad.net/~openerp-l10n-ar-localization
6-
#
7-
# This program is free software: you can redistribute it and/or modify
8-
# it under the terms of the GNU General Public License as published by
9-
# the Free Software Foundation, either version 3 of the License, or
10-
# (at your option) any later version.
11-
#
12-
# This program is distributed in the hope that it will be useful,
13-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15-
# GNU General Public License for more details.
16-
#
17-
# You should have received a copy of the GNU General Public License
18-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19-
#
20-
#############################################################################
21-
222
from openerp.osv import fields,osv
233
from openerp.tools.translate import _
244
import time
255

266
class Bank(osv.osv):
277
_inherit = 'res.bank'
288
_columns = {
29-
'update' : fields.date(_('Update')),
30-
'vat': fields.char(_('VAT'),size=32 ,help="Value Added Tax number."),
31-
}
9+
'update_date' : fields.date('Update Date'),
10+
'vat': fields.char('VAT',size=32 ,help="Value Added Tax number."),
11+
}
3212
_defaults = {
33-
'update': lambda *a: time.strftime('%Y-%m-%d')
34-
}
35-
Bank()
13+
'update_date': lambda *a: time.strftime('%Y-%m-%d')
14+
}

l10n_ar_bank/l10n_ar_bank.xml

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
<data >
44

55
<record id="view_res_bank_form" model="ir.ui.view">
6-
<field name="model">res.bank</field>
7-
<field name="name">res.bank.form.date.inherit</field>
8-
<field name="inherit_id" ref="base.view_res_bank_form" />
9-
<field name="type">form</field>
10-
<field name="arch" type="xml">
11-
<field name="bic" position="after">
12-
<field name='update' readonly='1'/>
13-
<field name='vat'/>
14-
</field>
6+
<field name="model">res.bank</field>
7+
<field name="name">res.bank.form.date.inherit</field>
8+
<field name="inherit_id" ref="base.view_res_bank_form" />
9+
<field name="type">form</field>
10+
<field name="arch" type="xml">
11+
<field name="bic" position="after">
12+
<field name='update_date' readonly='1'/>
13+
<field name='vat'/>
1514
</field>
15+
</field>
1616
</record>
1717

1818
</data>

l10n_ar_bank/test/l10n_ar_banks_wizard.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
bid = banks_obj.search(cr, uid, [('name','=','Nuevo Banco De Entre Rios S.A.')])
88
bank = banks_obj.browse(cr, uid, bid)[0]
99
import datetime as dt
10-
if (bank.update != dt.date.today().isoformat()):
10+
if (bank.update_date != dt.date.today().isoformat()):
1111
raise RuntimeError('El banco no fue actualizado!')
1212

l10n_ar_bank/wizard/wiz_l10n_ar_bank.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def on_process (self, cr, uid, ids, context):
6767
state_translate[bank['state']]
6868
if bank['state'] in state_translate
6969
else bank['state'])])[0],
70-
'update' : time.strftime('%Y-%m-%d'),
70+
'update_date' : time.strftime('%Y-%m-%d'),
7171
})
7272
Bancos_ids = banks_obj.search(cr, uid, [('name', '=', bank.get('name')),('country', '=', idargentina),('active', '=', False)])
7373
if not(Bancos_ids):

l10n_ar_invoice/view/invoice_view.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<field name="partner_id" position="after">
1414
<field name="afip_document_class_id"/>
1515
</field>
16-
<filter string="Journal" position="after">
16+
<group string="Group By">
1717
<filter string="Document Type" icon="terp-folder-orange" domain="[]" context="{'group_by':'afip_document_class_id'}"/>
18-
</filter>
18+
</group>
1919
</field>
2020
</record>
2121

0 commit comments

Comments
 (0)