Merge lp:~pexego/openerp-spain/pexego_bank_statements into lp:~openerp-spain-team/openerp-spain/6.0
- pexego_bank_statements
- Merge into 6.0
Status: | Rejected |
---|---|
Rejected by: | Pedro Manuel Baeza |
Proposed branch: | lp:~pexego/openerp-spain/pexego_bank_statements |
Merge into: | lp:~openerp-spain-team/openerp-spain/6.0 |
Diff against target: |
2742 lines (+1754/-680) (has conflicts) 15 files modified
l10n_es_bank_statement/__init__.py (+3/-1) l10n_es_bank_statement/__openerp__.py (+8/-5) l10n_es_bank_statement/account_bank_statement.py (+100/-17) l10n_es_bank_statement/data/extractos_conceptos.xml (+100/-0) l10n_es_bank_statement/extractos_conceptos.xml (+0/-100) l10n_es_bank_statement/extractos_view.xml (+7/-6) l10n_es_bank_statement/extractos_wizard.xml (+0/-12) l10n_es_bank_statement/i18n/es.po (+235/-206) l10n_es_bank_statement/i18n/l10n_es_bank_statement.pot (+343/-0) l10n_es_bank_statement/i18n/l10n_es_extractos_bancarios.pot (+0/-293) l10n_es_bank_statement/import_c43_file.py (+821/-0) l10n_es_bank_statement/import_c43_file_view.xml (+46/-0) l10n_es_bank_statement/import_conceptos.py (+77/-9) l10n_es_bank_statement/security/concepto_security.xml (+14/-0) l10n_es_bank_statement/wizard/__init__.py (+0/-31) Conflict: can't delete l10n_es_bank_statement/wizard because it is not empty. Not deleting. Conflict because l10n_es_bank_statement/wizard is not versioned, but has versioned children. Versioned directory. Contents conflict in l10n_es_bank_statement/wizard/wizard_import_c43_file.py |
To merge this branch: | bzr merge lp:~pexego/openerp-spain/pexego_bank_statements |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jordi Esteve (www.zikzakmedia.com) | Needs Fixing | ||
Review via email: mp+44335@code.launchpad.net |
Commit message
Description of the change
Se refactoriza el módulo 'l10n_es_
Queda pendiente la traducción a otros idiomas, estando obsoleta la que se encuentra ahora mismo en catalán.
Jordi Esteve (www.zikzakmedia.com) (jesteve-zikzakmedia) wrote : | # |
- 201. By alberto-pexego
-
[ADD/REM/FIX] l10n_es_
bank_statement: Se trasladan a esta rama los últimos cambios del módulo hechos en la rama de OpenERP de Pexego
Alberto Luengo Cabanillas (Pexego) (alberto-pexego) wrote : | # |
A fecha 09-03-2011 se realiza un nuevo merge-proposal sobre el módulo, en el que, a mayores de las correcciones propuestas el 30-12-2010, se añade gestión de multi-compañía mediante una regla de registro sobre el objeto "concepto de extracto bancario" y un campo "compañía" sobre el asistente de importación de conceptos. Asimismo, se incluye una mejora de usabilidad a la hora de intentar conciliar una línea del extracto bancario mediante el evento "onchange", informando al usuario de que existen varios movimientos para esa fecha y partner.
- 202. By alberto-pexego
-
[ADD]l10n_
es_bank_ statement: Se añaden ficheros que no se habían incluido en el anterior push
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
¿Qué ocurrió con esta propuesta? ¿Se llegó a poner en la 6.1?
Un saludo.
Unmerged revisions
- 202. By alberto-pexego
-
[ADD]l10n_
es_bank_ statement: Se añaden ficheros que no se habían incluido en el anterior push - 201. By alberto-pexego
-
[ADD/REM/FIX] l10n_es_
bank_statement: Se trasladan a esta rama los últimos cambios del módulo hechos en la rama de OpenERP de Pexego - 200. By alberto-pexego
-
[REF]l10n_
es_bank_ statement: Adaptado el modulo para la version 6.0
Preview Diff
1 | === modified file 'l10n_es_bank_statement/__init__.py' |
2 | --- l10n_es_bank_statement/__init__.py 2010-11-05 13:13:04 +0000 |
3 | +++ l10n_es_bank_statement/__init__.py 2011-03-11 07:55:12 +0000 |
4 | @@ -6,6 +6,8 @@ |
5 | # Jordi Esteve <jesteve@zikzakmedia.com> |
6 | # Copyright (c) 2010 Pexego Sistemas Informáticos. All Rights Reserved |
7 | # Borja López Soilán <borjals@pexego.es> |
8 | +# Copyright (c) 2011 Pexego Sistemas Informáticos. All Rights Reserved |
9 | +# Alberto Luengo Cabanillas <alberto@pexego.es> |
10 | # $Id$ |
11 | # |
12 | # This program is free software: you can redistribute it and/or modify |
13 | @@ -30,6 +32,6 @@ |
14 | import concepto |
15 | import account_bank_statement |
16 | import import_conceptos |
17 | -import wizard |
18 | +import import_c43_file |
19 | |
20 | |
21 | |
22 | === modified file 'l10n_es_bank_statement/__openerp__.py' |
23 | --- l10n_es_bank_statement/__openerp__.py 2010-11-12 12:51:14 +0000 |
24 | +++ l10n_es_bank_statement/__openerp__.py 2011-03-11 07:55:12 +0000 |
25 | @@ -6,6 +6,8 @@ |
26 | # Jordi Esteve <jesteve@zikzakmedia.com> |
27 | # Copyright (c) 2010 Pexego Sistemas Informáticos. All Rights Reserved |
28 | # Borja López Soilán <borjals@pexego.es> |
29 | +# Copyright (c) 2011 Pexego Sistemas Informáticos. All Rights Reserved |
30 | +# Alberto Luengo Cabanillas <alberto@pexego.es> |
31 | # $Id$ |
32 | # |
33 | # This program is free software: you can redistribute it and/or modify |
34 | @@ -25,10 +27,10 @@ |
35 | |
36 | { |
37 | "name" : "Spanish Bank Statements Importation", |
38 | - "version" : "1.0", |
39 | + "version" : "2.0", |
40 | "author" : "Zikzakmedia, Pexego", |
41 | "category" : "Localisation/Accounting", |
42 | - "description" : """NOTA: NO ADAPTADO TODAVÍA A LA VERSIÓN 6.0 |
43 | + "description" : """ |
44 | Module for the importation of Spanish bank statements following the C43 normative of the 'Asociación Española de la Banca'. |
45 | |
46 | Adds a wizard to the bank statements to perform the importation. The imported file gets attached to the given bank statement. |
47 | @@ -47,15 +49,16 @@ |
48 | |
49 | The module also adds a wizard in Financial Management/Configuration/C43 bank statements to import the default statement concepts, that must be run after creating the spanish chart of accounts (l10n_es module). |
50 | """, |
51 | - "website" : "www.zikzakmedia.com", |
52 | + "website" : "www.zikzakmedia.com / www.pexego.es", |
53 | "license" : "GPL-3", |
54 | - "depends" : ["base","account","l10n_es",], |
55 | + "depends" : ["base","account","l10n_es", "account_voucher"], |
56 | "init_xml" : [], |
57 | "demo_xml" : [], |
58 | "update_xml" : [ |
59 | "extractos_view.xml", |
60 | - "extractos_wizard.xml", |
61 | + "import_c43_file_view.xml", |
62 | "security/ir.model.access.csv", |
63 | + "security/concepto_security.xml" |
64 | ], |
65 | "installable" : True, |
66 | "active" : False, |
67 | |
68 | === modified file 'l10n_es_bank_statement/account_bank_statement.py' |
69 | --- l10n_es_bank_statement/account_bank_statement.py 2010-11-05 13:13:04 +0000 |
70 | +++ l10n_es_bank_statement/account_bank_statement.py 2011-03-11 07:55:12 +0000 |
71 | @@ -6,6 +6,8 @@ |
72 | # Jordi Esteve <jesteve@zikzakmedia.com> |
73 | # Copyright (c) 2010 Pexego Sistemas Informáticos. All Rights Reserved |
74 | # Borja López Soilán <borjals@pexego.es> |
75 | +# Copyright (c) 2011 Pexego Sistemas Informáticos. All Rights Reserved |
76 | +# Alberto Luengo Cabanillas <alberto@pexego.es> |
77 | # $Id$ |
78 | # |
79 | # This program is free software: you can redistribute it and/or modify |
80 | @@ -28,6 +30,7 @@ |
81 | """ |
82 | |
83 | from osv import osv |
84 | +from tools.translate import _ |
85 | |
86 | class account_bank_statement_line(osv.osv): |
87 | """ |
88 | @@ -35,32 +38,92 @@ |
89 | for lines edited by hand. |
90 | """ |
91 | |
92 | - _inherit = "account.bank.statement.line" |
93 | - |
94 | - def onchange_partner_id(self, cr, uid, line_id, partner_id, ptype, currency_id, amount, reconcile_id, context={}): |
95 | + def generate_voucher_from_import_wizard(self, cr, uid, statement_id, statement_line, line_ids, context): |
96 | + """ |
97 | + Generate a voucher when conciling lines from an AEB43 extract statement |
98 | + """ |
99 | + line_obj = self.pool.get('account.move.line') |
100 | + statement_obj = self.pool.get('account.bank.statement') |
101 | + currency_obj = self.pool.get('res.currency') |
102 | + voucher_obj = self.pool.get('account.voucher') |
103 | + voucher_line_obj = self.pool.get('account.voucher.line') |
104 | + statement = statement_obj.browse(cr, uid, statement_id, context=context) |
105 | + |
106 | + # for each selected move lines |
107 | + for line in line_obj.browse(cr, uid, line_ids, context=context): |
108 | + ctx = context.copy() |
109 | + # take the date for computation of currency => use payment date |
110 | + ctx['date'] = statement_line.date or line.date |
111 | + amount = 0.0 |
112 | + |
113 | + if line.debit > 0: |
114 | + amount = line.debit |
115 | + elif line.credit > 0: |
116 | + amount = -line.credit |
117 | + |
118 | + if line.amount_currency: |
119 | + amount = currency_obj.compute(cr, uid, line.currency_id.id, |
120 | + statement.currency.id, line.amount_currency, context=ctx) |
121 | + elif (line.invoice and line.invoice.currency_id.id <> statement.currency.id): |
122 | + amount = currency_obj.compute(cr, uid, line.invoice.currency_id.id, |
123 | + statement.currency.id, amount, context=ctx) |
124 | + |
125 | + context.update({'move_line_ids': [line.id]}) |
126 | + result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), date=line.date, context=context) |
127 | + voucher_res = { 'type':(amount < 0 and 'payment' or 'receipt'), |
128 | + 'name': line.name, |
129 | + 'partner_id': line.partner_id.id, |
130 | + 'journal_id': statement.journal_id.id, |
131 | + 'account_id': result.get('account_id', statement.journal_id.default_credit_account_id.id), # improve me: statement.journal_id.default_credit_account_id.id |
132 | + 'company_id':statement.company_id.id, |
133 | + 'currency_id':statement.currency.id, |
134 | + 'date':line.date, |
135 | + 'amount':abs(amount), |
136 | + 'period_id':statement.period_id.id} |
137 | + voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context) |
138 | + |
139 | + voucher_line_dict = {} |
140 | + if result['value']['line_ids']: |
141 | + for line_dict in result['value']['line_ids']: |
142 | + move_line = line_obj.browse(cr, uid, line_dict['move_line_id'], context) |
143 | + if line.move_id.id == move_line.move_id.id: |
144 | + voucher_line_dict = line_dict |
145 | + if voucher_line_dict: |
146 | + voucher_line_dict.update({'voucher_id': voucher_id}) |
147 | + voucher_line_obj.create(cr, uid, voucher_line_dict, context=context) |
148 | + |
149 | + return voucher_id |
150 | + |
151 | + |
152 | + def onchange_partner_id(self, cr, uid, line_ids, context, partner_id, ptype, amount, voucher_id, form_date): |
153 | """Elimina el precálculo del importe de la línea del extracto bancario |
154 | y propone una conciliación automática si encuentra una.""" |
155 | - statement_reconcile_obj = self.pool.get('account.bank.statement.reconcile') |
156 | + |
157 | move_line_obj = self.pool.get('account.move.line') |
158 | - res = super(account_bank_statement_line, self).onchange_partner_id(cr, uid, line_id, partner_id, ptype, currency_id, context=context) |
159 | - |
160 | + voucher_obj = self.pool.get('account.voucher') |
161 | + partner_obj = self.pool.get('res.partner') |
162 | + bank_st_line_obj = self.pool.get('account.bank.statement.line') |
163 | + current_st_line = bank_st_line_obj.browse(cr, uid, line_ids)[0] |
164 | + statement_id = current_st_line.statement_id.id |
165 | + res = super(account_bank_statement_line, self).onchange_type(cr, uid, line_ids, partner_id, ptype) |
166 | # devuelve res = {'value': {'amount': balance, 'account_id': account_id}} |
167 | if 'value' in res and 'amount' in res['value']: |
168 | del res['value']['amount'] |
169 | - |
170 | - # Eliminamos la propuesta de concilacion que hubiera |
171 | - if reconcile_id: |
172 | - statement_reconcile_obj.unlink(cr, uid, [reconcile_id]) |
173 | - if 'value' not in res: |
174 | - res['value'] = {} |
175 | - res['value']['reconcile_id'] = False |
176 | - |
177 | + |
178 | # Busqueda del apunte por importe con partner |
179 | if partner_id and amount: |
180 | + #Actualizamos la cuenta del partner... |
181 | + current_partner = partner_obj.browse(cr, uid, partner_id) |
182 | + if ptype == 'supplier': |
183 | + res['value']['account_id'] = current_partner.property_account_payable.id |
184 | + else: |
185 | + res['value']['account_id'] = current_partner.property_account_receivable.id |
186 | + |
187 | domain = [ |
188 | ('reconcile_id', '=', False), |
189 | ('account_id.type', 'in', ['receivable', 'payable']), |
190 | ('partner_id', '=', partner_id), |
191 | + ('date', '=', current_st_line.date) |
192 | ] |
193 | if amount >= 0: |
194 | domain.append( ('debit', '=', '%.2f' % amount) ) |
195 | @@ -70,11 +133,31 @@ |
196 | # Solamente crearemos la conciliacion automatica cuando exista un solo apunte |
197 | # que coincida. Si hay mas de uno el usuario tendra que conciliar manualmente y |
198 | # seleccionar cual de ellos es el correcto. |
199 | + res['value']['voucher_id'] = "" |
200 | if len(line_ids) == 1: |
201 | - res['value']['reconcile_id'] = statement_reconcile_obj.create(cr, uid, { |
202 | - 'line_ids': [(6, 0, line_ids)], |
203 | - }, context=context) |
204 | + #Miro si existe ya una propuesta de pago para esa fecha, cantidad, proveedor y estado... |
205 | + saved_voucher_id_list = voucher_obj.search(cr, uid, [('date','=',current_st_line.date), ('amount','=',current_st_line.amount), ('partner_id','=',partner_id), ('state','in', ['draft', 'proforma'])]) |
206 | + saved_voucher_id = saved_voucher_id_list and saved_voucher_id_list[0] or None |
207 | + if saved_voucher_id: |
208 | + voucher_id = saved_voucher_id |
209 | + form_voucher_id_list = voucher_obj.search(cr, uid, [('date','=', form_date), ('amount','=',amount), ('partner_id','=',partner_id), ('state','in', ['draft', 'proforma'])]) |
210 | + form_voucher_id = form_voucher_id_list and form_voucher_id_list[0] or None |
211 | + if form_voucher_id: |
212 | + voucher_id = form_voucher_id |
213 | + if not saved_voucher_id and not form_voucher_id: |
214 | + voucher_id = bank_st_line_obj.generate_voucher_from_import_wizard(cr, uid, statement_id, current_st_line, line_ids, context) |
215 | + res['value']['voucher_id'] = voucher_id |
216 | + elif len(line_ids) > 1: |
217 | + move_lines = move_line_obj.browse(cr, uid, line_ids) |
218 | + str_list = [] |
219 | + for line in move_lines: |
220 | + str_list.append("'%s'"%(line.ref or line.name)) |
221 | + raise osv.except_osv(_('Beware!'), _("%s moves (%s) found for this date and partner. You'll have to concile this line manually...") %(len(line_ids), ', '.join(str_list))) |
222 | return res |
223 | + |
224 | + |
225 | + _inherit = "account.bank.statement.line" |
226 | + |
227 | account_bank_statement_line() |
228 | |
229 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
230 | |
231 | === added directory 'l10n_es_bank_statement/data' |
232 | === added file 'l10n_es_bank_statement/data/extractos_conceptos.xml' |
233 | --- l10n_es_bank_statement/data/extractos_conceptos.xml 1970-01-01 00:00:00 +0000 |
234 | +++ l10n_es_bank_statement/data/extractos_conceptos.xml 2011-03-11 07:55:12 +0000 |
235 | @@ -0,0 +1,100 @@ |
236 | +<?xml version='1.0' encoding='UTF-8'?> |
237 | +<openerp> |
238 | + <data noupdate='1'> |
239 | + <record model='l10n.es.extractos.concepto' id='01'> |
240 | + <field name='code'>01</field> |
241 | + <field name='name'>Reintegro/Talón</field> |
242 | + <field search="[('code','like','4300%00')]" model='account.account' name='account_id'/> |
243 | + </record> |
244 | + <record model='l10n.es.extractos.concepto' id='02'> |
245 | + <field name='code'>02</field> |
246 | + <field name='name'>Ingreso/Abonaré</field> |
247 | + <field search="[('code','like','4100%00')]" model='account.account' name='account_id'/> |
248 | + </record> |
249 | + <record model='l10n.es.extractos.concepto' id='03'> |
250 | + <field name='code'>03</field> |
251 | + <field name='name'>Recibo/Letra domiciliado</field> |
252 | + <field search="[('code','like','4100%00')]" model='account.account' name='account_id'/> |
253 | + </record> |
254 | + <record model='l10n.es.extractos.concepto' id='04'> |
255 | + <field name='code'>04</field> |
256 | + <field name='name'>Transf./Giro/Cheque</field> |
257 | + <field search="[('code','like','4300%00')]" model='account.account' name='account_id'/> |
258 | + </record> |
259 | + <record model='l10n.es.extractos.concepto' id='05'> |
260 | + <field name='code'>05</field> |
261 | + <field name='name'>Amortización préstamo</field> |
262 | + <field search="[('code','like','6800%00')]" model='account.account' name='account_id'/> |
263 | + </record> |
264 | + <record model='l10n.es.extractos.concepto' id='06'> |
265 | + <field name='code'>06</field> |
266 | + <field name='name'>Remesa efectos</field> |
267 | + <field search="[('code','like','4010%00')]" model='account.account' name='account_id'/> |
268 | + </record> |
269 | + <record model='l10n.es.extractos.concepto' id='07'> |
270 | + <field name='code'>07</field> |
271 | + <field name='name'>Subscripción/Canje</field> |
272 | + <field search="[('code','like','5700%00')]" model='account.account' name='account_id'/> |
273 | + </record> |
274 | + <record model='l10n.es.extractos.concepto' id='08'> |
275 | + <field name='code'>08</field> |
276 | + <field name='name'>Amortización</field> |
277 | + <field search="[('code','like','6800%00')]" model='account.account' name='account_id'/> |
278 | + </record> |
279 | + <record model='l10n.es.extractos.concepto' id='09'> |
280 | + <field name='code'>09</field> |
281 | + <field name='name'>Compra/Venta valores</field> |
282 | + <field search="[('code','like','2510%00')]" model='account.account' name='account_id'/> |
283 | + </record> |
284 | + <record model='l10n.es.extractos.concepto' id='10'> |
285 | + <field name='code'>10</field> |
286 | + <field name='name'>Cheque gasolina</field> |
287 | + <field search="[('code','like','5700%00')]" model='account.account' name='account_id'/> |
288 | + </record> |
289 | + <record model='l10n.es.extractos.concepto' id='11'> |
290 | + <field name='code'>11</field> |
291 | + <field name='name'>Cajero automático</field> |
292 | + <field search="[('code','like','5700%00')]" model='account.account' name='account_id'/> |
293 | + </record> |
294 | + <record model='l10n.es.extractos.concepto' id='12'> |
295 | + <field name='code'>12</field> |
296 | + <field name='name'>Tarjeta crédito/débito</field> |
297 | + <field search="[('code','like','5700%00')]" model='account.account' name='account_id'/> |
298 | + </record> |
299 | + <record model='l10n.es.extractos.concepto' id='13'> |
300 | + <field name='code'>13</field> |
301 | + <field name='name'>Operaciones extranjero</field> |
302 | + <field search="[('code','like','5730%00')]" model='account.account' name='account_id'/> |
303 | + </record> |
304 | + <record model='l10n.es.extractos.concepto' id='14'> |
305 | + <field name='code'>14</field> |
306 | + <field name='name'>Devolución/Impagado</field> |
307 | + <field search="[('code','like','4300%00')]" model='account.account' name='account_id'/> |
308 | + </record> |
309 | + <record model='l10n.es.extractos.concepto' id='15'> |
310 | + <field name='code'>15</field> |
311 | + <field name='name'>Nómina/Seg. social</field> |
312 | + <field search="[('code','like','6400%00')]" model='account.account' name='account_id'/> |
313 | + </record> |
314 | + <record model='l10n.es.extractos.concepto' id='16'> |
315 | + <field name='code'>16</field> |
316 | + <field name='name'>Timbre/Corretaje/Póliza</field> |
317 | + <field search="[('code','like','6690%00')]" model='account.account' name='account_id'/> |
318 | + </record> |
319 | + <record model='l10n.es.extractos.concepto' id='17'> |
320 | + <field name='code'>17</field> |
321 | + <field name='name'>Intereses/Comisión/Gastos/Custodia</field> |
322 | + <field search="[('code','like','6690%00')]" model='account.account' name='account_id'/> |
323 | + </record> |
324 | + <record model='l10n.es.extractos.concepto' id='98'> |
325 | + <field name='code'>98</field> |
326 | + <field name='name'>Anulación/Corrección</field> |
327 | + <field search="[('code','like','5720%00')]" model='account.account' name='account_id'/> |
328 | + </record> |
329 | + <record model='l10n.es.extractos.concepto' id='99'> |
330 | + <field name='code'>99</field> |
331 | + <field name='name'>Varios</field> |
332 | + <field search="[('code','like','5720%00')]" model='account.account' name='account_id'/> |
333 | + </record> |
334 | + </data> |
335 | +</openerp> |
336 | |
337 | === removed file 'l10n_es_bank_statement/extractos_conceptos.xml' |
338 | --- l10n_es_bank_statement/extractos_conceptos.xml 2008-11-30 20:47:16 +0000 |
339 | +++ l10n_es_bank_statement/extractos_conceptos.xml 1970-01-01 00:00:00 +0000 |
340 | @@ -1,100 +0,0 @@ |
341 | -<?xml version='1.0' encoding='UTF-8'?> |
342 | -<openerp> |
343 | - <data noupdate='1'> |
344 | - <record model='l10n.es.extractos.concepto' id='01'> |
345 | - <field name='code'>01</field> |
346 | - <field name='name'>Reintegro/Talón</field> |
347 | - <field search="[('code','like','4300%00')]" model='account.account' name='account_id'/> |
348 | - </record> |
349 | - <record model='l10n.es.extractos.concepto' id='02'> |
350 | - <field name='code'>02</field> |
351 | - <field name='name'>Ingreso/Abonaré</field> |
352 | - <field search="[('code','like','4100%00')]" model='account.account' name='account_id'/> |
353 | - </record> |
354 | - <record model='l10n.es.extractos.concepto' id='03'> |
355 | - <field name='code'>03</field> |
356 | - <field name='name'>Recibo/Letra domiciliado</field> |
357 | - <field search="[('code','like','4100%00')]" model='account.account' name='account_id'/> |
358 | - </record> |
359 | - <record model='l10n.es.extractos.concepto' id='04'> |
360 | - <field name='code'>04</field> |
361 | - <field name='name'>Transf./Giro/Cheque</field> |
362 | - <field search="[('code','like','4300%00')]" model='account.account' name='account_id'/> |
363 | - </record> |
364 | - <record model='l10n.es.extractos.concepto' id='05'> |
365 | - <field name='code'>05</field> |
366 | - <field name='name'>Amortización préstamo</field> |
367 | - <field search="[('code','like','6800%00')]" model='account.account' name='account_id'/> |
368 | - </record> |
369 | - <record model='l10n.es.extractos.concepto' id='06'> |
370 | - <field name='code'>06</field> |
371 | - <field name='name'>Remesa efectos</field> |
372 | - <field search="[('code','like','4010%00')]" model='account.account' name='account_id'/> |
373 | - </record> |
374 | - <record model='l10n.es.extractos.concepto' id='07'> |
375 | - <field name='code'>07</field> |
376 | - <field name='name'>Subscripción/Canje</field> |
377 | - <field search="[('code','like','5700%00')]" model='account.account' name='account_id'/> |
378 | - </record> |
379 | - <record model='l10n.es.extractos.concepto' id='08'> |
380 | - <field name='code'>08</field> |
381 | - <field name='name'>Amortización</field> |
382 | - <field search="[('code','like','6800%00')]" model='account.account' name='account_id'/> |
383 | - </record> |
384 | - <record model='l10n.es.extractos.concepto' id='09'> |
385 | - <field name='code'>09</field> |
386 | - <field name='name'>Compra/Venta valores</field> |
387 | - <field search="[('code','like','2510%00')]" model='account.account' name='account_id'/> |
388 | - </record> |
389 | - <record model='l10n.es.extractos.concepto' id='10'> |
390 | - <field name='code'>10</field> |
391 | - <field name='name'>Cheque gasolina</field> |
392 | - <field search="[('code','like','5700%00')]" model='account.account' name='account_id'/> |
393 | - </record> |
394 | - <record model='l10n.es.extractos.concepto' id='11'> |
395 | - <field name='code'>11</field> |
396 | - <field name='name'>Cajero automático</field> |
397 | - <field search="[('code','like','5700%00')]" model='account.account' name='account_id'/> |
398 | - </record> |
399 | - <record model='l10n.es.extractos.concepto' id='12'> |
400 | - <field name='code'>12</field> |
401 | - <field name='name'>Tarjeta crédito/débito</field> |
402 | - <field search="[('code','like','5700%00')]" model='account.account' name='account_id'/> |
403 | - </record> |
404 | - <record model='l10n.es.extractos.concepto' id='13'> |
405 | - <field name='code'>13</field> |
406 | - <field name='name'>Operaciones extranjero</field> |
407 | - <field search="[('code','like','5730%00')]" model='account.account' name='account_id'/> |
408 | - </record> |
409 | - <record model='l10n.es.extractos.concepto' id='14'> |
410 | - <field name='code'>14</field> |
411 | - <field name='name'>Devolución/Impagado</field> |
412 | - <field search="[('code','like','4300%00')]" model='account.account' name='account_id'/> |
413 | - </record> |
414 | - <record model='l10n.es.extractos.concepto' id='15'> |
415 | - <field name='code'>15</field> |
416 | - <field name='name'>Nómina/Seg. social</field> |
417 | - <field search="[('code','like','6400%00')]" model='account.account' name='account_id'/> |
418 | - </record> |
419 | - <record model='l10n.es.extractos.concepto' id='16'> |
420 | - <field name='code'>16</field> |
421 | - <field name='name'>Timbre/Corretaje/Póliza</field> |
422 | - <field search="[('code','like','6690%00')]" model='account.account' name='account_id'/> |
423 | - </record> |
424 | - <record model='l10n.es.extractos.concepto' id='17'> |
425 | - <field name='code'>17</field> |
426 | - <field name='name'>Intereses/Comisión/Gastos/Custodia</field> |
427 | - <field search="[('code','like','6690%00')]" model='account.account' name='account_id'/> |
428 | - </record> |
429 | - <record model='l10n.es.extractos.concepto' id='98'> |
430 | - <field name='code'>98</field> |
431 | - <field name='name'>Anulación/Corrección</field> |
432 | - <field search="[('code','like','5720%00')]" model='account.account' name='account_id'/> |
433 | - </record> |
434 | - <record model='l10n.es.extractos.concepto' id='99'> |
435 | - <field name='code'>99</field> |
436 | - <field name='name'>Varios</field> |
437 | - <field search="[('code','like','5720%00')]" model='account.account' name='account_id'/> |
438 | - </record> |
439 | - </data> |
440 | -</openerp> |
441 | |
442 | === modified file 'l10n_es_bank_statement/extractos_view.xml' |
443 | --- l10n_es_bank_statement/extractos_view.xml 2010-03-25 18:27:29 +0000 |
444 | +++ l10n_es_bank_statement/extractos_view.xml 2011-03-11 07:55:12 +0000 |
445 | @@ -50,8 +50,8 @@ |
446 | <field name="type">form</field> |
447 | <field name="inherit_id" ref="account.view_bank_statement_form"/> |
448 | <field name="arch" type="xml"> |
449 | - <xpath expr="/form/notebook/page/field/tree/field[@name='partner_id']" position="replace"> |
450 | - <field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency, amount, reconcile_id)"/> |
451 | + <xpath expr="/form/notebook/page[@string='Transaction']/field/tree/field[@name='partner_id']" position="replace"> |
452 | + <field name="partner_id" on_change="onchange_partner_id(line_id, partner_id, type, amount, voucher_id, date)"/> |
453 | </xpath> |
454 | </field> |
455 | </record> |
456 | @@ -63,7 +63,7 @@ |
457 | <field name="inherit_id" ref="account.view_bank_statement_form"/> |
458 | <field name="arch" type="xml"> |
459 | <xpath expr="/form/notebook/page/field/form/field[@name='partner_id']" position="replace"> |
460 | - <field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency, amount, reconcile_id)"/> |
461 | + <field name="partner_id" on_change="onchange_partner_id(line_id, partner_id, type, amount, voucher_id, date)"/> |
462 | </xpath> |
463 | </field> |
464 | </record> |
465 | @@ -75,7 +75,7 @@ |
466 | <field name="inherit_id" ref="account.view_bank_statement_form"/> |
467 | <field name="arch" type="xml"> |
468 | <xpath expr="/form/notebook/page/field/tree/field[@name='amount']" position="replace"> |
469 | - <field name="amount" on_change="onchange_partner_id(partner_id, type, parent.currency, amount, reconcile_id)"/> |
470 | + <field name="amount" on_change="onchange_partner_id(line_id, partner_id, type, amount, voucher_id, date)"/> |
471 | </xpath> |
472 | </field> |
473 | </record> |
474 | @@ -87,7 +87,7 @@ |
475 | <field name="inherit_id" ref="account.view_bank_statement_form"/> |
476 | <field name="arch" type="xml"> |
477 | <xpath expr="/form/notebook/page/field/form/field[@name='amount']" position="replace"> |
478 | - <field name="amount" on_change="onchange_partner_id(partner_id, type, parent.currency, amount, reconcile_id)"/> |
479 | + <field name="amount" on_change="onchange_partner_id(line_id, partner_id, type, amount, voucher_id, date)"/> |
480 | </xpath> |
481 | </field> |
482 | </record> |
483 | @@ -101,6 +101,7 @@ |
484 | <field name="arch" type="xml"> |
485 | <form string="Import Wizard"> |
486 | <label colspan="4" string="This wizard will import default concepts related to standard accounts of spanish charts."/> |
487 | + <field name="company_id" colspan="4" widget="selection"/> |
488 | <button icon="gtk-cancel" special="cancel" string="Cancel" type="object"/> |
489 | <button icon="gtk-ok" name="action_import" string="Import" type="object"/> |
490 | </form> |
491 | @@ -116,7 +117,7 @@ |
492 | <field name="target">new</field> |
493 | </record> |
494 | |
495 | - <menuitem id="menu_import_wizard" parent="menu_extractos_bancarios" action="action_extractos_import_wizard"/> |
496 | + <menuitem id="menu_import_wizard" parent="menu_extractos_bancarios" action="action_extractos_import_wizard" groups="account.group_account_manager"/> |
497 | |
498 | </data> |
499 | </openerp> |
500 | |
501 | === removed file 'l10n_es_bank_statement/extractos_wizard.xml' |
502 | --- l10n_es_bank_statement/extractos_wizard.xml 2010-10-19 08:20:07 +0000 |
503 | +++ l10n_es_bank_statement/extractos_wizard.xml 1970-01-01 00:00:00 +0000 |
504 | @@ -1,12 +0,0 @@ |
505 | -<?xml version="1.0" encoding="utf-8"?> |
506 | -<openerp> |
507 | - <data> |
508 | - <wizard |
509 | - string="Import bank stat." |
510 | - model="account.bank.statement" |
511 | - name="l10n_es_bank_statement.importar" |
512 | - id="wizard_l10n_es_bank_statement_importar"/> |
513 | - <!--menu="False"--> |
514 | - |
515 | - </data> |
516 | -</openerp> |
517 | |
518 | === modified file 'l10n_es_bank_statement/i18n/es.po' |
519 | --- l10n_es_bank_statement/i18n/es.po 2010-11-05 13:13:04 +0000 |
520 | +++ l10n_es_bank_statement/i18n/es.po 2011-03-11 07:55:12 +0000 |
521 | @@ -1,78 +1,37 @@ |
522 | # Translation of OpenERP Server. |
523 | -# This file containt the translation of the following modules: |
524 | -# * l10n_es_bank_statement |
525 | +# This file contains the translation of the following modules: |
526 | +# * l10n_es_bank_statement |
527 | # |
528 | -# Albert Cervera i Areny <albert@nan-tic.com>, 2009, 2010. |
529 | msgid "" |
530 | msgstr "" |
531 | -"Project-Id-Version: OpenERP Server 5.0.0-rc1\n" |
532 | +"Project-Id-Version: OpenERP Server 6.1-dev\n" |
533 | "Report-Msgid-Bugs-To: support@openerp.com\n" |
534 | -"POT-Creation-Date: 2010-05-06 11:26:42+0000\n" |
535 | -"PO-Revision-Date: 2010-05-12 14:27+0100\n" |
536 | -"Last-Translator: Jordi Esteve (Zikzakmedia) <jesteve@zikzakmedia.com>\n" |
537 | -"Language-Team: Spanish\n" |
538 | +"POT-Creation-Date: 2011-03-09 13:02+0000\n" |
539 | +"PO-Revision-Date: 2011-03-09 14:05+0100\n" |
540 | +"Last-Translator: Alberto <alberto@pexego.es>\n" |
541 | +"Language-Team: \n" |
542 | "MIME-Version: 1.0\n" |
543 | "Content-Type: text/plain; charset=UTF-8\n" |
544 | "Content-Transfer-Encoding: 8bit\n" |
545 | "Plural-Forms: \n" |
546 | -"X-Generator: Lokalize 1.0\n" |
547 | - |
548 | -#. module: l10n_es_bank_statement |
549 | -#: model:ir.module.module,shortdesc:l10n_es_bank_statement.module_meta_information |
550 | -msgid "Spanish Bank Statements Importation" |
551 | -msgstr "Importación de Extractos Bancarios Españoles" |
552 | - |
553 | -#. module: l10n_es_bank_statement |
554 | -#: wizard_view:l10n_es_bank_statement.importar,init:0 |
555 | -msgid "Bank Statements File:" |
556 | -msgstr "Archivo extracto bancario:" |
557 | - |
558 | -#. module: l10n_es_bank_statement |
559 | -#: wizard_field:l10n_es_bank_statement.importar,init,reco_payment_order:0 |
560 | -msgid "Reconcile payment orders by total amount" |
561 | -msgstr "Conciliar ordenes de pago por total" |
562 | - |
563 | -#. module: l10n_es_bank_statement |
564 | -#: wizard_field:l10n_es_bank_statement.importar,init,reco_vat_and_amount:0 |
565 | -msgid "Reconcile by VAT number and amount" |
566 | -msgstr "Conciliar por NIF y cantidad" |
567 | - |
568 | -#. module: l10n_es_bank_statement |
569 | -#: wizard_field:l10n_es_bank_statement.importar,init,reco_reference_and_amount:0 |
570 | -msgid "Reconcile by reference and amount" |
571 | -msgstr "Conciliar por referencia y cantidad" |
572 | - |
573 | -#. module: l10n_es_bank_statement |
574 | -#: wizard_view:l10n_es_bank_statement.importar,init:0 |
575 | -msgid "Automatic reconciliation options" |
576 | -msgstr "Opciones de conciliación automática" |
577 | - |
578 | -#. module: l10n_es_bank_statement |
579 | -#: wizard_field:l10n_es_bank_statement.importar,init,reco_max_days:0 |
580 | -msgid "Max. days from statement date" |
581 | -msgstr "Días máx. desde fecha extracto" |
582 | - |
583 | -#. module: l10n_es_bank_statement |
584 | -#: help:l10n_es_bank_statement.importar,init,reco_max_days:0 |
585 | -msgid "Maximum difference in days, between the maturity date of the entry to reconcile and the bank statement entry" |
586 | -msgstr "Diferencia máxima en días, entre la fecha de vencimiento del asiento a conciliar y la línea del extracto bancario" |
587 | - |
588 | -#. module: l10n_es_bank_statement |
589 | -#: wizard_field:l10n_es_bank_statement.importar,init,reco_amount:0 |
590 | + |
591 | +#. module: l10n_es_bank_statement |
592 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:632 |
593 | +#, python-format |
594 | +msgid "The bank statement is alredy confirmed. It can not be imported from file." |
595 | +msgstr "El extracto bancario ya está confirmado. No se puede importar desde fichero." |
596 | + |
597 | +#. module: l10n_es_bank_statement |
598 | +#: model:ir.model,name:l10n_es_bank_statement.model_l10n_es_extractos_concepto |
599 | +msgid "C43 codes" |
600 | +msgstr "Códigos C43" |
601 | + |
602 | +#. module: l10n_es_bank_statement |
603 | +#: field:l10n.es.bank.statement.import.c43.wizard,reco_amount:0 |
604 | msgid "Reconcile by amount" |
605 | msgstr "Conciliar por cantidad" |
606 | |
607 | #. module: l10n_es_bank_statement |
608 | -#: constraint:ir.model:0 |
609 | -msgid "The Object name must start with x_ and not contain any special character !" |
610 | -msgstr "¡El nombre del objeto debe empezar con x_ y no contener ningún carácter especial!" |
611 | - |
612 | -#. module: l10n_es_bank_statement |
613 | -#: constraint:ir.actions.act_window:0 |
614 | -msgid "Invalid model name in the action definition." |
615 | -msgstr "Nombre de modelo inválido en la definición de la acción." |
616 | - |
617 | -#. module: l10n_es_bank_statement |
618 | #: model:ir.ui.menu,name:l10n_es_bank_statement.menu_extractos_bancarios |
619 | msgid "C43 bank statements" |
620 | msgstr "Extractos bancarios C43" |
621 | @@ -84,30 +43,42 @@ |
622 | |
623 | #. module: l10n_es_bank_statement |
624 | #: model:ir.module.module,shortdesc:l10n_es_bank_statement.module_meta_information |
625 | -msgid "Importación de extractos bancarios C43" |
626 | -msgstr "Importación de extractos bancarios C43" |
627 | +msgid "Spanish Bank Statements Importation" |
628 | +msgstr "Importación de Extractos Bancarios Españoles" |
629 | |
630 | #. module: l10n_es_bank_statement |
631 | -#: wizard_field:l10n_es_bank_statement.importar,init,file:0 |
632 | +#: field:l10n.es.bank.statement.import.c43.wizard,file:0 |
633 | +#: field:l10n.es.bank.statement.import.c43.wizard,file_name:0 |
634 | msgid "Bank Statements File" |
635 | -msgstr "Archivo extracto" |
636 | - |
637 | -#. module: l10n_es_bank_statement |
638 | +msgstr "Extracto bancario" |
639 | + |
640 | +#. module: l10n_es_bank_statement |
641 | +#: model:ir.actions.act_window,name:l10n_es_bank_statement.action_c43_file_import_wizard |
642 | +msgid "Import Bank Statement" |
643 | +msgstr "Importar Extracto Bancario" |
644 | + |
645 | +#. module: l10n_es_bank_statement |
646 | +#: view:l10n.es.bank.statement.import.c43.wizard:0 |
647 | #: view:l10n.es.extractos.import.wizard:0 |
648 | -#: wizard_button:l10n_es_bank_statement.importar,init,import:0 |
649 | msgid "Import" |
650 | msgstr "Importar" |
651 | |
652 | #. module: l10n_es_bank_statement |
653 | #: model:ir.model,name:l10n_es_bank_statement.model_l10n_es_extractos_import_wizard |
654 | msgid "l10n.es.extractos.import.wizard" |
655 | -msgstr "" |
656 | +msgstr "l10n.es.extractos.import.wizard" |
657 | |
658 | #. module: l10n_es_bank_statement |
659 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
660 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:195 |
661 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:197 |
662 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:199 |
663 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:201 |
664 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:207 |
665 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:231 |
666 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:319 |
667 | #, python-format |
668 | -msgid "Final balance amount = (initial balance + credit - debit) does not agree with the defined in the last record of account." |
669 | -msgstr "Importe saldo final = (saldo inicial + haber - debe) no coincide con el definido en el registro final de cuenta." |
670 | +msgid "Error in C43 file" |
671 | +msgstr "Error en fichero C43" |
672 | |
673 | #. module: l10n_es_bank_statement |
674 | #: help:l10n.es.extractos.concepto,account_id:0 |
675 | @@ -115,49 +86,53 @@ |
676 | msgstr "Cuenta contable por defecto que se asociará al concepto al importar el archivo de extractos bancarios C43" |
677 | |
678 | #. module: l10n_es_bank_statement |
679 | -#: wizard_view:l10n_es_bank_statement.importar,init:0 |
680 | +#: view:l10n.es.bank.statement.import.c43.wizard:0 |
681 | msgid "Bank statements import according to norm C43" |
682 | -msgstr "Importación extracto bancario según norma C43" |
683 | - |
684 | -#. module: l10n_es_bank_statement |
685 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
686 | -#, python-format |
687 | -msgid "Error !" |
688 | -msgstr "Error !" |
689 | - |
690 | -#. module: l10n_es_bank_statement |
691 | -#: model:ir.actions.act_window,name:l10n_es_bank_statement.action_extractos_concepto |
692 | -#: view:l10n.es.extractos.concepto:0 |
693 | -msgid "C43 default accounts" |
694 | -msgstr "Cuentas por defecto C43" |
695 | - |
696 | -#. module: l10n_es_bank_statement |
697 | -#: field:l10n.es.extractos.concepto,company_id:0 |
698 | -msgid "Company" |
699 | -msgstr "Compañía" |
700 | - |
701 | -#. module: l10n_es_bank_statement |
702 | -#: model:ir.model,name:l10n_es_bank_statement.model_l10n_es_extractos_concepto |
703 | -msgid "C43 codes" |
704 | -msgstr "Códigos C43" |
705 | - |
706 | -#. module: l10n_es_bank_statement |
707 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
708 | +msgstr "Importación de extractos bancarios de acuerdo a la norma C43" |
709 | + |
710 | +#. module: l10n_es_bank_statement |
711 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:195 |
712 | #, python-format |
713 | msgid "Number of debit records does not agree with the defined in the last record of account." |
714 | -msgstr "Número de registros debe no coincide con el definido en el registro final de cuenta." |
715 | - |
716 | -#. module: l10n_es_bank_statement |
717 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
718 | +msgstr "El número de registros de débito no coincide con los definidos en el último registro de la cuenta." |
719 | + |
720 | +#. module: l10n_es_bank_statement |
721 | +#: view:l10n.es.bank.statement.import.c43.wizard:0 |
722 | +msgid "Bank Statements File:" |
723 | +msgstr "Fichero de extracto bancario:" |
724 | + |
725 | +#. module: l10n_es_bank_statement |
726 | +#: view:l10n.es.bank.statement.import.c43.wizard:0 |
727 | +msgid "Automatic reconciliation options" |
728 | +msgstr "Opciones de conciliación automática" |
729 | + |
730 | +#. module: l10n_es_bank_statement |
731 | +#: code:addons/l10n_es_bank_statement/account_bank_statement.py:155 |
732 | +#, python-format |
733 | +msgid "%s moves (%s) found for this date and partner. You'll have to concile this line manually..." |
734 | +msgstr "%s movimientos (%s) encontrados para esta fecha y partner. Tendrá que conciliar esta línea manualmente..." |
735 | + |
736 | +#. module: l10n_es_bank_statement |
737 | +#: field:l10n.es.bank.statement.import.c43.wizard,reco_max_days:0 |
738 | +msgid "Max. days from statement date" |
739 | +msgstr "Tope de días desde la fecha del extracto" |
740 | + |
741 | +#. module: l10n_es_bank_statement |
742 | +#: help:l10n.es.bank.statement.import.c43.wizard,reco_max_days:0 |
743 | +msgid "Maximum difference in days, between the maturity date of the entry to reconcile and the bank statement entry" |
744 | +msgstr "Diferencia máxima en días, entre la fecha de vencimiento de la entrada a conciliar y la entrada del extracto bancario" |
745 | + |
746 | +#. module: l10n_es_bank_statement |
747 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:197 |
748 | #, python-format |
749 | msgid "Number of credit records does not agree with the defined in the last record of account." |
750 | -msgstr "Número de registros haber no coincide con el definido en el registro final de cuenta." |
751 | +msgstr "El número de registros de crédito no coincide con los definidos en el último registro de la cuenta." |
752 | |
753 | #. module: l10n_es_bank_statement |
754 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
755 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:207 |
756 | #, python-format |
757 | -msgid "Error in C43 file" |
758 | -msgstr "Error en el archivo C43" |
759 | +msgid "Final balance amount = (initial balance + credit - debit) does not agree with the defined in the last record of account." |
760 | +msgstr "La cantidad del balance final (=balance inicial + crédito - débito) no coincide con la definida en el último registro de la cuenta." |
761 | |
762 | #. module: l10n_es_bank_statement |
763 | #: model:ir.ui.menu,name:l10n_es_bank_statement.menu_extractos_bancarios_concepto |
764 | @@ -165,10 +140,100 @@ |
765 | msgstr "Cuentas por defecto asociadas a los códigos C43" |
766 | |
767 | #. module: l10n_es_bank_statement |
768 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
769 | -#, python-format |
770 | -msgid "Archivo a importar codificado en ISO-8859-1" |
771 | -msgstr "Archivo a importar codificado en ISO-8859-1" |
772 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:778 |
773 | +#, python-format |
774 | +msgid "A default account has not been defined for the C43 concept " |
775 | +msgstr "No ha sido definida una cuenta por defecto para el concepto C43 " |
776 | + |
777 | +#. module: l10n_es_bank_statement |
778 | +#: model:ir.model,name:l10n_es_bank_statement.model_l10n_es_bank_statement_import_c43_wizard |
779 | +msgid "l10n.es.bank.statement.import.c43.wizard" |
780 | +msgstr "l10n.es.bank.statement.import.c43.wizard" |
781 | + |
782 | +#. module: l10n_es_bank_statement |
783 | +#: code:addons/l10n_es_bank_statement/import_conceptos.py:60 |
784 | +#, python-format |
785 | +msgid "Concepts for this company already imported..." |
786 | +msgstr "Los conceptos para esta compañía ya han sido importados..." |
787 | + |
788 | +#. module: l10n_es_bank_statement |
789 | +#: help:l10n.es.extractos.concepto,code:0 |
790 | +msgid "2 digits code of the concept defined in the file of C43 bank statements" |
791 | +msgstr "Código de 2 dígitos del concepto definido en el archivo de extractos bancarios C43" |
792 | + |
793 | +#. module: l10n_es_bank_statement |
794 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:199 |
795 | +#, python-format |
796 | +msgid "Debit amount does not agree with the defined in the last record of account." |
797 | +msgstr "La cantidad del débito no coincide con lo definido en el último registro de la cuenta." |
798 | + |
799 | +#. module: l10n_es_bank_statement |
800 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:231 |
801 | +#, python-format |
802 | +msgid "Number of records does not agree with the defined in the last record." |
803 | +msgstr "El número de registros no coincide con lo definido en el último registro." |
804 | + |
805 | +#. module: l10n_es_bank_statement |
806 | +#: field:l10n.es.extractos.concepto,code:0 |
807 | +msgid "Concept code" |
808 | +msgstr "Código concepto C43" |
809 | + |
810 | +#. module: l10n_es_bank_statement |
811 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:319 |
812 | +#, python-format |
813 | +msgid "Not valid record type." |
814 | +msgstr "Tipo de registro no válido." |
815 | + |
816 | +#. module: l10n_es_bank_statement |
817 | +#: code:addons/l10n_es_bank_statement/account_bank_statement.py:155 |
818 | +#, python-format |
819 | +msgid "Beware!" |
820 | +msgstr "Atención!" |
821 | + |
822 | +#. module: l10n_es_bank_statement |
823 | +#: code:addons/l10n_es_bank_statement/import_conceptos.py:80 |
824 | +#: code:addons/l10n_es_bank_statement/import_conceptos.py:101 |
825 | +#, python-format |
826 | +msgid "C43 Created Concepts" |
827 | +msgstr "Conceptos C43 Creados" |
828 | + |
829 | +#. module: l10n_es_bank_statement |
830 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:632 |
831 | +#, python-format |
832 | +msgid "Error!" |
833 | +msgstr "Error!" |
834 | + |
835 | +#. module: l10n_es_bank_statement |
836 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:778 |
837 | +#, python-format |
838 | +msgid "Error" |
839 | +msgstr "Error" |
840 | + |
841 | +#. module: l10n_es_bank_statement |
842 | +#: field:l10n.es.extractos.concepto,name:0 |
843 | +msgid "Concept name" |
844 | +msgstr "Nombre concepto" |
845 | + |
846 | +#. module: l10n_es_bank_statement |
847 | +#: constraint:account.bank.statement.line:0 |
848 | +msgid "The amount of the voucher must be the same amount as the one on the statement line" |
849 | +msgstr "El importe del recibo debe ser el mismo importe que el de la línea del extracto" |
850 | + |
851 | +#. module: l10n_es_bank_statement |
852 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:201 |
853 | +#, python-format |
854 | +msgid "Credit amount does not agree with the defined in the last record of account." |
855 | +msgstr "La cantidad del crédito no coincide con lo definido en el último registro de la cuenta." |
856 | + |
857 | +#. module: l10n_es_bank_statement |
858 | +#: view:l10n.es.extractos.import.wizard:0 |
859 | +msgid "This wizard will import default concepts related to standard accounts of spanish charts." |
860 | +msgstr "Este asistente importará conceptos por defecto relacionados con las cuentas contables estándar del plan de cuentas español." |
861 | + |
862 | +#. module: l10n_es_bank_statement |
863 | +#: model:ir.model,name:l10n_es_bank_statement.model_account_bank_statement_line |
864 | +msgid "Bank Statement Line" |
865 | +msgstr "Línea de extracto bancario" |
866 | |
867 | #. module: l10n_es_bank_statement |
868 | #: model:ir.actions.act_window,name:l10n_es_bank_statement.action_extractos_import_wizard |
869 | @@ -177,8 +242,14 @@ |
870 | msgstr "Asistente de importación de conceptos de extractos" |
871 | |
872 | #. module: l10n_es_bank_statement |
873 | +#: field:l10n.es.bank.statement.import.c43.wizard,reco_payment_order:0 |
874 | +msgid "Reconcile payment orders by total amount" |
875 | +msgstr "Conciliar órdenes de pago por importe total" |
876 | + |
877 | +#. module: l10n_es_bank_statement |
878 | #: model:ir.module.module,description:l10n_es_bank_statement.module_meta_information |
879 | msgid "" |
880 | +"\n" |
881 | "Module for the importation of Spanish bank statements following the C43 normative of the 'Asociación Española de la Banca'.\n" |
882 | " \n" |
883 | " Adds a wizard to the bank statements to perform the importation. The imported file gets attached to the given bank statement.\n" |
884 | @@ -198,92 +269,47 @@ |
885 | " The module also adds a wizard in Financial Management/Configuration/C43 bank statements to import the default statement concepts, that must be run after creating the spanish chart of accounts (l10n_es module).\n" |
886 | " " |
887 | msgstr "" |
888 | -"Modulo para la importación de extractos bancarios españoles según la norma C43 de la 'Asociación Española de la Banca'.\n" |
889 | +"\n" |
890 | +"Módulo para la importación de extractos bancarios españoles de acuerdo a la norma C43 de la Asociación Española de la Banca.\n" |
891 | " \n" |
892 | -" Añade un asistente a los extractos bancarios para realizar la importación. El fichero importado se queda como fichero adjunto al extracto en cuestión.\n" |
893 | -" Permite definir cuentas contables por defecto para los conceptos definidos en el archivo de extracto C43.\n" |
894 | -"\n" |
895 | -" La búsqueda de los apuntes a conciliar (y empresa) se realiza de la siguiente forma:\n" |
896 | -" 1) Apuntes no conciliados con la referencia y cantidad dadas. La referencia se toma de los campos 'conceptos' o 'referencia2' del extracto.\n" |
897 | -" 2) Apuntes no conciliados con (una empresa con) el NIF y cantidad dados.\n" |
898 | -" Se comprueban estos campos para encontrar un NIF válido:\n" |
899 | -" - Los primeros 9 carácteres de 'referencia1' (Banc Sabadell)\n" |
900 | -" - Los primeros 9 carácteres de 'conceptos' (La Caixa)\n" |
901 | -" - Carácteres [21:30] de 'conceptos' (Caja Rural del Jalón)\n" |
902 | -" 3) Apuntes no conciliadas con la cantidad dada.\n" |
903 | -"\n" |
904 | -" Si no se encuentra la empresa, se usará la cuenta por defecto definida para el concepto.\n" |
905 | -"\n" |
906 | -" El modulo también añade un asistente en Gestión financiera/Configuración/Extractos bancarios C43 para importar los conceptos de extractos por defecto, que se debe ejecutar una vez creado el plan de cuentas español (módulo l10n_es).\n" |
907 | +" Añade un asistente a los extractos bancarios para realizar la importación. El fichero importado queda adjunto al extracto bancario activo.\n" |
908 | +" Permite definir códigos contables por defecto para los conceptos definidos en el fichero de extracto bancario C43.\n" |
909 | +"\n" |
910 | +" La búsqueda de entradas a conciliar se realiza de la siguiente forma:\n" |
911 | +" 1) Entradas sin conciliar con una cantidad y referencia especificadas. La referencia se obtiene de los campos 'concepto' o 'referencia2' del extracto.\n" |
912 | +" 2) Entradas sin conciliar en las que figure el CIF del partner y la cantidad.\n" |
913 | +" Para encontrar un CIF español válido se busca en los siguientes campos:\n" |
914 | +" - Los primeros 9 caracteres del campo 'referencia1' (Banc Sabadell)\n" |
915 | +" - Los primeros 9 caracteres del campo 'conceptos' (La Caixa)\n" |
916 | +" - Los caracteres [21:30] del campo 'conceptos' (Caja Rural del Jalón)\n" |
917 | +" 3) Entradas sin conciliar en las que figure la cantidad.\n" |
918 | +"\n" |
919 | +" Si no se encuentra ningún partner, se utiliza la cuenta por defecto definida para el concepto.\n" |
920 | +"\n" |
921 | +" El módulo también añade un asistente en 'Contabilidad/Configuración/Extractos bancarios C43' para importar los conceptos por defecto de los extractos; esto se debe ejecutar después de crear el plan español de cuentas (módulo 'l10n_es').\n" |
922 | " " |
923 | |
924 | #. module: l10n_es_bank_statement |
925 | -#: constraint:ir.ui.view:0 |
926 | -msgid "Invalid XML for View Architecture!" |
927 | -msgstr "¡XML inválido para la definición de la vista!" |
928 | - |
929 | -#. module: l10n_es_bank_statement |
930 | -#: help:l10n.es.extractos.concepto,code:0 |
931 | -msgid "2 digits code of the concept defined in the file of C43 bank statements" |
932 | -msgstr "Código de 2 dígitos del concepto definido en el archivo de extractos bancarios C43" |
933 | - |
934 | -#. module: l10n_es_bank_statement |
935 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
936 | -#, python-format |
937 | -msgid "Debit amount does not agree with the defined in the last record of account." |
938 | -msgstr "Importe debe no coincide con el definido en el registro final de cuenta." |
939 | - |
940 | -#. module: l10n_es_bank_statement |
941 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
942 | -#, python-format |
943 | -msgid "Number of records does not agree with the defined in the last record." |
944 | -msgstr "Número de registros no coincide con el definido en el registro fin de archivo." |
945 | - |
946 | -#. module: l10n_es_bank_statement |
947 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
948 | -#, python-format |
949 | -msgid "Not valid record type." |
950 | -msgstr "Tipo de registro no válido." |
951 | - |
952 | -#. module: l10n_es_bank_statement |
953 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
954 | -#, python-format |
955 | -msgid "A default account has not been defined for the C43 concept " |
956 | -msgstr "No se ha definido una cuenta contable por defecto para el concepto C43 " |
957 | - |
958 | -#. module: l10n_es_bank_statement |
959 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
960 | -#, python-format |
961 | -msgid "Error" |
962 | -msgstr "Error" |
963 | - |
964 | -#. module: l10n_es_bank_statement |
965 | -#: field:l10n.es.extractos.concepto,name:0 |
966 | -msgid "Concept name" |
967 | -msgstr "Nombre concepto" |
968 | - |
969 | -#. module: l10n_es_bank_statement |
970 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
971 | -#, python-format |
972 | -msgid "Credit amount does not agree with the defined in the last record of account." |
973 | -msgstr "Importe haber no coincide con el definido en el registro final de cuenta." |
974 | - |
975 | -#. module: l10n_es_bank_statement |
976 | -#: view:l10n.es.extractos.import.wizard:0 |
977 | -msgid "This wizard will import default concepts related to standard accounts of spanish charts." |
978 | -msgstr "Este asistente importará conceptos por defecto relacionados con las cuentas contables estándar del plan de cuentas español." |
979 | - |
980 | -#. module: l10n_es_bank_statement |
981 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
982 | -#, python-format |
983 | -msgid "The bank statement is alredy confirmed. It can not be imported from file." |
984 | -msgstr "El extracto bancario ya está confirmado. No se puede importar desde archivo." |
985 | - |
986 | -#. module: l10n_es_bank_statement |
987 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
988 | +#: field:l10n.es.bank.statement.import.c43.wizard,reco_vat_and_amount:0 |
989 | +msgid "Reconcile by VAT number and amount" |
990 | +msgstr "Conciliar por número de CIF y cantidad" |
991 | + |
992 | +#. module: l10n_es_bank_statement |
993 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:333 |
994 | #, python-format |
995 | msgid "Bank Statement" |
996 | -msgstr "Extracto Bancario" |
997 | +msgstr "Extracto bancario" |
998 | + |
999 | +#. module: l10n_es_bank_statement |
1000 | +#: code:addons/l10n_es_bank_statement/import_conceptos.py:60 |
1001 | +#, python-format |
1002 | +msgid "Info:" |
1003 | +msgstr "Info:" |
1004 | + |
1005 | +#. module: l10n_es_bank_statement |
1006 | +#: field:l10n.es.bank.statement.import.c43.wizard,reco_reference_and_amount:0 |
1007 | +msgid "Reconcile by reference and amount" |
1008 | +msgstr "Conciliar por referencia y cantidad" |
1009 | |
1010 | #. module: l10n_es_bank_statement |
1011 | #: view:l10n.es.extractos.import.wizard:0 |
1012 | @@ -291,24 +317,27 @@ |
1013 | msgstr "Asistente de importación" |
1014 | |
1015 | #. module: l10n_es_bank_statement |
1016 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1017 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:352 |
1018 | #, python-format |
1019 | msgid "bank-statement.txt" |
1020 | -msgstr "extracto-bancario.txt" |
1021 | - |
1022 | -#. module: l10n_es_bank_statement |
1023 | -#: field:l10n.es.extractos.concepto,code:0 |
1024 | -msgid "Concept code" |
1025 | -msgstr "Código concepto C43" |
1026 | - |
1027 | -#. module: l10n_es_bank_statement |
1028 | +msgstr "bank-statement.txt" |
1029 | + |
1030 | +#. module: l10n_es_bank_statement |
1031 | +#: model:ir.actions.act_window,name:l10n_es_bank_statement.action_extractos_concepto |
1032 | +#: view:l10n.es.extractos.concepto:0 |
1033 | +msgid "C43 default accounts" |
1034 | +msgstr "Cuentas por defecto C43" |
1035 | + |
1036 | +#. module: l10n_es_bank_statement |
1037 | +#: view:l10n.es.bank.statement.import.c43.wizard:0 |
1038 | #: view:l10n.es.extractos.import.wizard:0 |
1039 | -#: wizard_button:l10n_es_bank_statement.importar,init,end:0 |
1040 | msgid "Cancel" |
1041 | msgstr "Cancelar" |
1042 | |
1043 | #. module: l10n_es_bank_statement |
1044 | -#: model:ir.actions.wizard,name:l10n_es_bank_statement.wizard_l10n_es_bank_statement_importar |
1045 | -msgid "Import bank stat." |
1046 | -msgstr "Importar ext. bancario" |
1047 | - |
1048 | +#: code:addons/l10n_es_bank_statement/import_conceptos.py:113 |
1049 | +#: field:l10n.es.extractos.concepto,company_id:0 |
1050 | +#: field:l10n.es.extractos.import.wizard,company_id:0 |
1051 | +#, python-format |
1052 | +msgid "Company" |
1053 | +msgstr "Compañía" |
1054 | |
1055 | === added file 'l10n_es_bank_statement/i18n/l10n_es_bank_statement.pot' |
1056 | --- l10n_es_bank_statement/i18n/l10n_es_bank_statement.pot 1970-01-01 00:00:00 +0000 |
1057 | +++ l10n_es_bank_statement/i18n/l10n_es_bank_statement.pot 2011-03-11 07:55:12 +0000 |
1058 | @@ -0,0 +1,343 @@ |
1059 | +# Translation of OpenERP Server. |
1060 | +# This file contains the translation of the following modules: |
1061 | +# * l10n_es_bank_statement |
1062 | +# |
1063 | +msgid "" |
1064 | +msgstr "" |
1065 | +"Project-Id-Version: OpenERP Server 6.1-dev\n" |
1066 | +"Report-Msgid-Bugs-To: support@openerp.com\n" |
1067 | +"POT-Creation-Date: 2011-03-09 13:02+0000\n" |
1068 | +"PO-Revision-Date: 2011-03-09 14:05+0100\n" |
1069 | +"Last-Translator: Alberto <alberto@pexego.es>\n" |
1070 | +"Language-Team: \n" |
1071 | +"MIME-Version: 1.0\n" |
1072 | +"Content-Type: text/plain; charset=UTF-8\n" |
1073 | +"Content-Transfer-Encoding: 8bit\n" |
1074 | +"Plural-Forms: \n" |
1075 | + |
1076 | +#. module: l10n_es_bank_statement |
1077 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:632 |
1078 | +#, python-format |
1079 | +msgid "The bank statement is alredy confirmed. It can not be imported from file." |
1080 | +msgstr "" |
1081 | + |
1082 | +#. module: l10n_es_bank_statement |
1083 | +#: model:ir.model,name:l10n_es_bank_statement.model_l10n_es_extractos_concepto |
1084 | +msgid "C43 codes" |
1085 | +msgstr "" |
1086 | + |
1087 | +#. module: l10n_es_bank_statement |
1088 | +#: field:l10n.es.bank.statement.import.c43.wizard,reco_amount:0 |
1089 | +msgid "Reconcile by amount" |
1090 | +msgstr "" |
1091 | + |
1092 | +#. module: l10n_es_bank_statement |
1093 | +#: model:ir.ui.menu,name:l10n_es_bank_statement.menu_extractos_bancarios |
1094 | +msgid "C43 bank statements" |
1095 | +msgstr "" |
1096 | + |
1097 | +#. module: l10n_es_bank_statement |
1098 | +#: field:l10n.es.extractos.concepto,account_id:0 |
1099 | +msgid "Account associated to the concept" |
1100 | +msgstr "" |
1101 | + |
1102 | +#. module: l10n_es_bank_statement |
1103 | +#: model:ir.module.module,shortdesc:l10n_es_bank_statement.module_meta_information |
1104 | +msgid "Spanish Bank Statements Importation" |
1105 | +msgstr "" |
1106 | + |
1107 | +#. module: l10n_es_bank_statement |
1108 | +#: field:l10n.es.bank.statement.import.c43.wizard,file:0 |
1109 | +#: field:l10n.es.bank.statement.import.c43.wizard,file_name:0 |
1110 | +msgid "Bank Statements File" |
1111 | +msgstr "" |
1112 | + |
1113 | +#. module: l10n_es_bank_statement |
1114 | +#: model:ir.actions.act_window,name:l10n_es_bank_statement.action_c43_file_import_wizard |
1115 | +msgid "Import Bank Statement" |
1116 | +msgstr "" |
1117 | + |
1118 | +#. module: l10n_es_bank_statement |
1119 | +#: view:l10n.es.bank.statement.import.c43.wizard:0 |
1120 | +#: view:l10n.es.extractos.import.wizard:0 |
1121 | +msgid "Import" |
1122 | +msgstr "" |
1123 | + |
1124 | +#. module: l10n_es_bank_statement |
1125 | +#: model:ir.model,name:l10n_es_bank_statement.model_l10n_es_extractos_import_wizard |
1126 | +msgid "l10n.es.extractos.import.wizard" |
1127 | +msgstr "" |
1128 | + |
1129 | +#. module: l10n_es_bank_statement |
1130 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:195 |
1131 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:197 |
1132 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:199 |
1133 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:201 |
1134 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:207 |
1135 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:231 |
1136 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:319 |
1137 | +#, python-format |
1138 | +msgid "Error in C43 file" |
1139 | +msgstr "" |
1140 | + |
1141 | +#. module: l10n_es_bank_statement |
1142 | +#: help:l10n.es.extractos.concepto,account_id:0 |
1143 | +msgid "Default account to be associated with the concept when the file of C43 bank statements is imported" |
1144 | +msgstr "" |
1145 | + |
1146 | +#. module: l10n_es_bank_statement |
1147 | +#: view:l10n.es.bank.statement.import.c43.wizard:0 |
1148 | +msgid "Bank statements import according to norm C43" |
1149 | +msgstr "" |
1150 | + |
1151 | +#. module: l10n_es_bank_statement |
1152 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:195 |
1153 | +#, python-format |
1154 | +msgid "Number of debit records does not agree with the defined in the last record of account." |
1155 | +msgstr "" |
1156 | + |
1157 | +#. module: l10n_es_bank_statement |
1158 | +#: view:l10n.es.bank.statement.import.c43.wizard:0 |
1159 | +msgid "Bank Statements File:" |
1160 | +msgstr "" |
1161 | + |
1162 | +#. module: l10n_es_bank_statement |
1163 | +#: view:l10n.es.bank.statement.import.c43.wizard:0 |
1164 | +msgid "Automatic reconciliation options" |
1165 | +msgstr "" |
1166 | + |
1167 | +#. module: l10n_es_bank_statement |
1168 | +#: code:addons/l10n_es_bank_statement/account_bank_statement.py:155 |
1169 | +#, python-format |
1170 | +msgid "%s moves (%s) found for this date and partner. You'll have to concile this line manually..." |
1171 | +msgstr "" |
1172 | + |
1173 | +#. module: l10n_es_bank_statement |
1174 | +#: field:l10n.es.bank.statement.import.c43.wizard,reco_max_days:0 |
1175 | +msgid "Max. days from statement date" |
1176 | +msgstr "" |
1177 | + |
1178 | +#. module: l10n_es_bank_statement |
1179 | +#: help:l10n.es.bank.statement.import.c43.wizard,reco_max_days:0 |
1180 | +msgid "Maximum difference in days, between the maturity date of the entry to reconcile and the bank statement entry" |
1181 | +msgstr "" |
1182 | + |
1183 | +#. module: l10n_es_bank_statement |
1184 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:197 |
1185 | +#, python-format |
1186 | +msgid "Number of credit records does not agree with the defined in the last record of account." |
1187 | +msgstr "" |
1188 | + |
1189 | +#. module: l10n_es_bank_statement |
1190 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:207 |
1191 | +#, python-format |
1192 | +msgid "Final balance amount = (initial balance + credit - debit) does not agree with the defined in the last record of account." |
1193 | +msgstr "" |
1194 | + |
1195 | +#. module: l10n_es_bank_statement |
1196 | +#: model:ir.ui.menu,name:l10n_es_bank_statement.menu_extractos_bancarios_concepto |
1197 | +msgid "Default accounts associated to C43 codes" |
1198 | +msgstr "" |
1199 | + |
1200 | +#. module: l10n_es_bank_statement |
1201 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:778 |
1202 | +#, python-format |
1203 | +msgid "A default account has not been defined for the C43 concept " |
1204 | +msgstr "" |
1205 | + |
1206 | +#. module: l10n_es_bank_statement |
1207 | +#: model:ir.model,name:l10n_es_bank_statement.model_l10n_es_bank_statement_import_c43_wizard |
1208 | +msgid "l10n.es.bank.statement.import.c43.wizard" |
1209 | +msgstr "" |
1210 | + |
1211 | +#. module: l10n_es_bank_statement |
1212 | +#: code:addons/l10n_es_bank_statement/import_conceptos.py:60 |
1213 | +#, python-format |
1214 | +msgid "Concepts for this company already imported..." |
1215 | +msgstr "" |
1216 | + |
1217 | +#. module: l10n_es_bank_statement |
1218 | +#: help:l10n.es.extractos.concepto,code:0 |
1219 | +msgid "2 digits code of the concept defined in the file of C43 bank statements" |
1220 | +msgstr "" |
1221 | + |
1222 | +#. module: l10n_es_bank_statement |
1223 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:199 |
1224 | +#, python-format |
1225 | +msgid "Debit amount does not agree with the defined in the last record of account." |
1226 | +msgstr "" |
1227 | + |
1228 | +#. module: l10n_es_bank_statement |
1229 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:231 |
1230 | +#, python-format |
1231 | +msgid "Number of records does not agree with the defined in the last record." |
1232 | +msgstr "" |
1233 | + |
1234 | +#. module: l10n_es_bank_statement |
1235 | +#: field:l10n.es.extractos.concepto,code:0 |
1236 | +msgid "Concept code" |
1237 | +msgstr "" |
1238 | + |
1239 | +#. module: l10n_es_bank_statement |
1240 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:319 |
1241 | +#, python-format |
1242 | +msgid "Not valid record type." |
1243 | +msgstr "" |
1244 | + |
1245 | +#. module: l10n_es_bank_statement |
1246 | +#: code:addons/l10n_es_bank_statement/account_bank_statement.py:155 |
1247 | +#, python-format |
1248 | +msgid "Beware!" |
1249 | +msgstr "" |
1250 | + |
1251 | +#. module: l10n_es_bank_statement |
1252 | +#: code:addons/l10n_es_bank_statement/import_conceptos.py:80 |
1253 | +#: code:addons/l10n_es_bank_statement/import_conceptos.py:101 |
1254 | +#, python-format |
1255 | +msgid "C43 Created Concepts" |
1256 | +msgstr "" |
1257 | + |
1258 | +#. module: l10n_es_bank_statement |
1259 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:632 |
1260 | +#, python-format |
1261 | +msgid "Error!" |
1262 | +msgstr "" |
1263 | + |
1264 | +#. module: l10n_es_bank_statement |
1265 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:778 |
1266 | +#, python-format |
1267 | +msgid "Error" |
1268 | +msgstr "" |
1269 | + |
1270 | +#. module: l10n_es_bank_statement |
1271 | +#: field:l10n.es.extractos.concepto,name:0 |
1272 | +msgid "Concept name" |
1273 | +msgstr "" |
1274 | + |
1275 | +#. module: l10n_es_bank_statement |
1276 | +#: constraint:account.bank.statement.line:0 |
1277 | +msgid "The amount of the voucher must be the same amount as the one on the statement line" |
1278 | +msgstr "" |
1279 | + |
1280 | +#. module: l10n_es_bank_statement |
1281 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:201 |
1282 | +#, python-format |
1283 | +msgid "Credit amount does not agree with the defined in the last record of account." |
1284 | +msgstr "" |
1285 | + |
1286 | +#. module: l10n_es_bank_statement |
1287 | +#: view:l10n.es.extractos.import.wizard:0 |
1288 | +msgid "This wizard will import default concepts related to standard accounts of spanish charts." |
1289 | +msgstr "" |
1290 | + |
1291 | +#. module: l10n_es_bank_statement |
1292 | +#: model:ir.model,name:l10n_es_bank_statement.model_account_bank_statement_line |
1293 | +msgid "Bank Statement Line" |
1294 | +msgstr "" |
1295 | + |
1296 | +#. module: l10n_es_bank_statement |
1297 | +#: model:ir.actions.act_window,name:l10n_es_bank_statement.action_extractos_import_wizard |
1298 | +#: model:ir.ui.menu,name:l10n_es_bank_statement.menu_import_wizard |
1299 | +msgid "Import Statement Concepts Wizard" |
1300 | +msgstr "" |
1301 | + |
1302 | +#. module: l10n_es_bank_statement |
1303 | +#: field:l10n.es.bank.statement.import.c43.wizard,reco_payment_order:0 |
1304 | +msgid "Reconcile payment orders by total amount" |
1305 | +msgstr "" |
1306 | + |
1307 | +#. module: l10n_es_bank_statement |
1308 | +#: model:ir.module.module,description:l10n_es_bank_statement.module_meta_information |
1309 | +msgid "" |
1310 | +"\n" |
1311 | +"Module for the importation of Spanish bank statements following the C43 normative of the 'Asociación Española de la Banca'.\n" |
1312 | +" \n" |
1313 | +" Adds a wizard to the bank statements to perform the importation. The imported file gets attached to the given bank statement.\n" |
1314 | +" It allows to define default accounting codes for the concepts defined in the C43 bank statement file.\n" |
1315 | +"\n" |
1316 | +" The search of the entries to reconcile (and partner) is done like this:\n" |
1317 | +" 1) Unreconciled entries with the given reference and amount. The reference is taken from the 'conceptos' or 'referencia2' fields of the statement.\n" |
1318 | +" 2) Unreconciled entries with (a partner with) the given VAT number and amount.\n" |
1319 | +" These fields are tested to find a valid spanish VAT:\n" |
1320 | +" - First 9 characters of 'referencia1' (Banc Sabadell)\n" |
1321 | +" - First 9 characters of 'conceptos' (La Caixa)\n" |
1322 | +" - Characters [21:30] of 'conceptos' (Caja Rural del Jalón)\n" |
1323 | +" 3) Unreconciled entries with the given amount.\n" |
1324 | +"\n" |
1325 | +" If no partner is found, the default account defined for the concept is used.\n" |
1326 | +"\n" |
1327 | +" The module also adds a wizard in Financial Management/Configuration/C43 bank statements to import the default statement concepts, that must be run after creating the spanish chart of accounts (l10n_es module).\n" |
1328 | +" " |
1329 | +msgstr "" |
1330 | +"\n" |
1331 | +"Módulo para la importación de extractos bancarios españoles de acuerdo a la norma C43 de la Asociación Española de la Banca.\n" |
1332 | +" \n" |
1333 | +" Añade un asistente a los extractos bancarios para realizar la importación. El fichero importado queda adjunto al extracto bancario activo.\n" |
1334 | +" Permite definir códigos contables por defecto para los conceptos definidos en el fichero de extracto bancario C43.\n" |
1335 | +"\n" |
1336 | +" La búsqueda de entradas a conciliar se realiza de la siguiente forma:\n" |
1337 | +" 1) Entradas sin conciliar con una cantidad y referencia especificadas. La referencia se obtiene de los campos 'concepto' o 'referencia2' del extracto.\n" |
1338 | +" 2) Entradas sin conciliar en las que figure el CIF del partner y la cantidad.\n" |
1339 | +" Para encontrar un CIF español válido se busca en los siguientes campos:\n" |
1340 | +" - Los primeros 9 caracteres del campo 'referencia1' (Banc Sabadell)\n" |
1341 | +" - Los primeros 9 caracteres del campo 'conceptos' (La Caixa)\n" |
1342 | +" - Los caracteres [21:30] del campo 'conceptos' (Caja Rural del Jalón)\n" |
1343 | +" 3) Entradas sin conciliar en las que figure la cantidad.\n" |
1344 | +"\n" |
1345 | +" Si no se encuentra ningún partner, se utiliza la cuenta por defecto definida para el concepto.\n" |
1346 | +"\n" |
1347 | +" El módulo también añade un asistente en 'Contabilidad/Configuración/Extractos bancarios C43' para importar los conceptos por defecto de los extractos; esto se debe ejecutar después de crear el plan español de cuentas (módulo 'l10n_es').\n" |
1348 | +" " |
1349 | + |
1350 | +#. module: l10n_es_bank_statement |
1351 | +#: field:l10n.es.bank.statement.import.c43.wizard,reco_vat_and_amount:0 |
1352 | +msgid "Reconcile by VAT number and amount" |
1353 | +msgstr "" |
1354 | + |
1355 | +#. module: l10n_es_bank_statement |
1356 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:333 |
1357 | +#, python-format |
1358 | +msgid "Bank Statement" |
1359 | +msgstr "" |
1360 | + |
1361 | +#. module: l10n_es_bank_statement |
1362 | +#: code:addons/l10n_es_bank_statement/import_conceptos.py:60 |
1363 | +#, python-format |
1364 | +msgid "Info:" |
1365 | +msgstr "" |
1366 | + |
1367 | +#. module: l10n_es_bank_statement |
1368 | +#: field:l10n.es.bank.statement.import.c43.wizard,reco_reference_and_amount:0 |
1369 | +msgid "Reconcile by reference and amount" |
1370 | +msgstr "" |
1371 | + |
1372 | +#. module: l10n_es_bank_statement |
1373 | +#: view:l10n.es.extractos.import.wizard:0 |
1374 | +msgid "Import Wizard" |
1375 | +msgstr "" |
1376 | + |
1377 | +#. module: l10n_es_bank_statement |
1378 | +#: code:addons/l10n_es_bank_statement/import_c43_file.py:352 |
1379 | +#, python-format |
1380 | +msgid "bank-statement.txt" |
1381 | +msgstr "" |
1382 | + |
1383 | +#. module: l10n_es_bank_statement |
1384 | +#: model:ir.actions.act_window,name:l10n_es_bank_statement.action_extractos_concepto |
1385 | +#: view:l10n.es.extractos.concepto:0 |
1386 | +msgid "C43 default accounts" |
1387 | +msgstr "" |
1388 | + |
1389 | +#. module: l10n_es_bank_statement |
1390 | +#: view:l10n.es.bank.statement.import.c43.wizard:0 |
1391 | +#: view:l10n.es.extractos.import.wizard:0 |
1392 | +msgid "Cancel" |
1393 | +msgstr "" |
1394 | + |
1395 | +#. module: l10n_es_bank_statement |
1396 | +#: code:addons/l10n_es_bank_statement/import_conceptos.py:113 |
1397 | +#: field:l10n.es.extractos.concepto,company_id:0 |
1398 | +#: field:l10n.es.extractos.import.wizard,company_id:0 |
1399 | +#, python-format |
1400 | +msgid "Company" |
1401 | +msgstr "" |
1402 | |
1403 | === removed file 'l10n_es_bank_statement/i18n/l10n_es_extractos_bancarios.pot' |
1404 | --- l10n_es_bank_statement/i18n/l10n_es_extractos_bancarios.pot 2010-10-19 08:20:07 +0000 |
1405 | +++ l10n_es_bank_statement/i18n/l10n_es_extractos_bancarios.pot 1970-01-01 00:00:00 +0000 |
1406 | @@ -1,293 +0,0 @@ |
1407 | -# Translation of OpenERP Server. |
1408 | -# This file contains the translation of the following modules: |
1409 | -# * l10n_es_bank_statement |
1410 | -# |
1411 | -msgid "" |
1412 | -msgstr "" |
1413 | -"Project-Id-Version: OpenERP Server 5.0.7\n" |
1414 | -"Report-Msgid-Bugs-To: support@openerp.com\n" |
1415 | -"POT-Creation-Date: 2010-05-06 11:26:42+0000\n" |
1416 | -"PO-Revision-Date: 2010-05-06 11:26:42+0000\n" |
1417 | -"Last-Translator: <>\n" |
1418 | -"Language-Team: \n" |
1419 | -"MIME-Version: 1.0\n" |
1420 | -"Content-Type: text/plain; charset=UTF-8\n" |
1421 | -"Content-Transfer-Encoding: \n" |
1422 | -"Plural-Forms: \n" |
1423 | - |
1424 | -#. module: l10n_es_bank_statement |
1425 | -#: model:ir.module.module,shortdesc:l10n_es_bank_statement.module_meta_information |
1426 | -msgid "Spanish Bank Statements Importation" |
1427 | -msgstr "" |
1428 | - |
1429 | -#. module: l10n_es_bank_statement |
1430 | -#: wizard_field:l10n_es_bank_statement.importar,init,reco_payment_order:0 |
1431 | -msgid "Reconcile payment orders by total amount" |
1432 | -msgstr "" |
1433 | - |
1434 | -#. module: l10n_es_bank_statement |
1435 | -#: wizard_field:l10n_es_bank_statement.importar,init,reco_vat_and_amount:0 |
1436 | -msgid "Reconcile by VAT number and amount" |
1437 | -msgstr "" |
1438 | - |
1439 | -#. module: l10n_es_bank_statement |
1440 | -#: wizard_field:l10n_es_bank_statement.importar,init,reco_reference_and_amount:0 |
1441 | -msgid "Reconcile by reference and amount" |
1442 | -msgstr "" |
1443 | - |
1444 | -#. module: l10n_es_bank_statement |
1445 | -#: wizard_view:l10n_es_bank_statement.importar,init:0 |
1446 | -msgid "Automatic reconciliation options" |
1447 | -msgstr "" |
1448 | - |
1449 | -#. module: l10n_es_bank_statement |
1450 | -#: wizard_field:l10n_es_bank_statement.importar,init,reco_max_days:0 |
1451 | -msgid "Max. days from statement date" |
1452 | -msgstr "" |
1453 | - |
1454 | -#. module: l10n_es_bank_statement |
1455 | -#: wizard_view:l10n_es_bank_statement.importar,init:0 |
1456 | -msgid "Bank Statements File:" |
1457 | -msgstr "" |
1458 | - |
1459 | -#. module: l10n_es_bank_statement |
1460 | -#: help:l10n_es_bank_statement.importar,init,reco_max_days:0 |
1461 | -msgid "Maximum difference in days, between the maturity date of the entry to reconcile and the bank statement entry" |
1462 | -msgstr "" |
1463 | - |
1464 | -#. module: l10n_es_bank_statement |
1465 | -#: wizard_field:l10n_es_bank_statement.importar,init,reco_amount:0 |
1466 | -msgid "Reconcile by amount" |
1467 | -msgstr "" |
1468 | - |
1469 | -#. module: l10n_es_bank_statement |
1470 | -#: constraint:ir.model:0 |
1471 | -msgid "The Object name must start with x_ and not contain any special character !" |
1472 | -msgstr "" |
1473 | - |
1474 | -#. module: l10n_es_bank_statement |
1475 | -#: constraint:ir.actions.act_window:0 |
1476 | -msgid "Invalid model name in the action definition." |
1477 | -msgstr "" |
1478 | - |
1479 | -#. module: l10n_es_bank_statement |
1480 | -#: model:ir.ui.menu,name:l10n_es_bank_statement.menu_extractos_bancarios |
1481 | -msgid "C43 bank statements" |
1482 | -msgstr "" |
1483 | - |
1484 | -#. module: l10n_es_bank_statement |
1485 | -#: field:l10n.es.extractos.concepto,account_id:0 |
1486 | -msgid "Account associated to the concept" |
1487 | -msgstr "" |
1488 | - |
1489 | -#. module: l10n_es_bank_statement |
1490 | -#: model:ir.module.module,shortdesc:l10n_es_bank_statement.module_meta_information |
1491 | -msgid "Importación de extractos bancarios C43" |
1492 | -msgstr "" |
1493 | - |
1494 | -#. module: l10n_es_bank_statement |
1495 | -#: wizard_field:l10n_es_bank_statement.importar,init,file:0 |
1496 | -msgid "Bank Statements File" |
1497 | -msgstr "" |
1498 | - |
1499 | -#. module: l10n_es_bank_statement |
1500 | -#: view:l10n.es.extractos.import.wizard:0 |
1501 | -#: wizard_button:l10n_es_bank_statement.importar,init,import:0 |
1502 | -msgid "Import" |
1503 | -msgstr "" |
1504 | - |
1505 | -#. module: l10n_es_bank_statement |
1506 | -#: model:ir.model,name:l10n_es_bank_statement.model_l10n_es_extractos_import_wizard |
1507 | -msgid "l10n.es.extractos.import.wizard" |
1508 | -msgstr "" |
1509 | - |
1510 | -#. module: l10n_es_bank_statement |
1511 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1512 | -#, python-format |
1513 | -msgid "Final balance amount = (initial balance + credit - debit) does not agree with the defined in the last record of account." |
1514 | -msgstr "" |
1515 | - |
1516 | -#. module: l10n_es_bank_statement |
1517 | -#: help:l10n.es.extractos.concepto,account_id:0 |
1518 | -msgid "Default account to be associated with the concept when the file of C43 bank statements is imported" |
1519 | -msgstr "" |
1520 | - |
1521 | -#. module: l10n_es_bank_statement |
1522 | -#: wizard_view:l10n_es_bank_statement.importar,init:0 |
1523 | -msgid "Bank statements import according to norm C43" |
1524 | -msgstr "" |
1525 | - |
1526 | -#. module: l10n_es_bank_statement |
1527 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1528 | -#, python-format |
1529 | -msgid "Error !" |
1530 | -msgstr "" |
1531 | - |
1532 | -#. module: l10n_es_bank_statement |
1533 | -#: model:ir.actions.act_window,name:l10n_es_bank_statement.action_extractos_concepto |
1534 | -#: view:l10n.es.extractos.concepto:0 |
1535 | -msgid "C43 default accounts" |
1536 | -msgstr "" |
1537 | - |
1538 | -#. module: l10n_es_bank_statement |
1539 | -#: field:l10n.es.extractos.concepto,company_id:0 |
1540 | -msgid "Company" |
1541 | -msgstr "" |
1542 | - |
1543 | -#. module: l10n_es_bank_statement |
1544 | -#: model:ir.model,name:l10n_es_bank_statement.model_l10n_es_extractos_concepto |
1545 | -msgid "C43 codes" |
1546 | -msgstr "" |
1547 | - |
1548 | -#. module: l10n_es_bank_statement |
1549 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1550 | -#, python-format |
1551 | -msgid "Number of debit records does not agree with the defined in the last record of account." |
1552 | -msgstr "" |
1553 | - |
1554 | -#. module: l10n_es_bank_statement |
1555 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1556 | -#, python-format |
1557 | -msgid "Number of credit records does not agree with the defined in the last record of account." |
1558 | -msgstr "" |
1559 | - |
1560 | -#. module: l10n_es_bank_statement |
1561 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1562 | -#, python-format |
1563 | -msgid "Error in C43 file" |
1564 | -msgstr "" |
1565 | - |
1566 | -#. module: l10n_es_bank_statement |
1567 | -#: model:ir.ui.menu,name:l10n_es_bank_statement.menu_extractos_bancarios_concepto |
1568 | -msgid "Default accounts associated to C43 codes" |
1569 | -msgstr "" |
1570 | - |
1571 | -#. module: l10n_es_bank_statement |
1572 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1573 | -#, python-format |
1574 | -msgid "Archivo a importar codificado en ISO-8859-1" |
1575 | -msgstr "" |
1576 | - |
1577 | -#. module: l10n_es_bank_statement |
1578 | -#: model:ir.actions.act_window,name:l10n_es_bank_statement.action_extractos_import_wizard |
1579 | -#: model:ir.ui.menu,name:l10n_es_bank_statement.menu_import_wizard |
1580 | -msgid "Import Statement Concepts Wizard" |
1581 | -msgstr "" |
1582 | - |
1583 | -#. module: l10n_es_bank_statement |
1584 | -#: model:ir.module.module,description:l10n_es_bank_statement.module_meta_information |
1585 | -msgid "Module for the importation of Spanish bank statements following the C43 normative of the 'Asociación Española de la Banca'.\n" |
1586 | -" \n" |
1587 | -" Adds a wizard to the bank statements to perform the importation. The imported file gets attached to the given bank statement.\n" |
1588 | -" It allows to define default accounting codes for the concepts defined in the C43 bank statement file.\n" |
1589 | -"\n" |
1590 | -" The search of the entries to reconcile (and partner) is done like this:\n" |
1591 | -" 1) Unreconciled entries with the given reference and amount. The reference is taken from the 'conceptos' or 'referencia2' fields of the statement.\n" |
1592 | -" 2) Unreconciled entries with (a partner with) the given VAT number and amount.\n" |
1593 | -" These fields are tested to find a valid spanish VAT:\n" |
1594 | -" - First 9 characters of 'referencia1' (Banc Sabadell)\n" |
1595 | -" - First 9 characters of 'conceptos' (La Caixa)\n" |
1596 | -" - Characters [21:30] of 'conceptos' (Caja Rural del Jalón)\n" |
1597 | -" 3) Unreconciled entries with the given amount.\n" |
1598 | -"\n" |
1599 | -" If no partner is found, the default account defined for the concept is used.\n" |
1600 | -"\n" |
1601 | -" The module also adds a wizard in Financial Management/Configuration/C43 bank statements to import the default statement concepts, that must be run after creating the spanish chart of accounts (l10n_es module).\n" |
1602 | -" " |
1603 | -msgstr "" |
1604 | - |
1605 | -#. module: l10n_es_bank_statement |
1606 | -#: constraint:ir.ui.view:0 |
1607 | -msgid "Invalid XML for View Architecture!" |
1608 | -msgstr "" |
1609 | - |
1610 | -#. module: l10n_es_bank_statement |
1611 | -#: help:l10n.es.extractos.concepto,code:0 |
1612 | -msgid "2 digits code of the concept defined in the file of C43 bank statements" |
1613 | -msgstr "" |
1614 | - |
1615 | -#. module: l10n_es_bank_statement |
1616 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1617 | -#, python-format |
1618 | -msgid "Debit amount does not agree with the defined in the last record of account." |
1619 | -msgstr "" |
1620 | - |
1621 | -#. module: l10n_es_bank_statement |
1622 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1623 | -#, python-format |
1624 | -msgid "Number of records does not agree with the defined in the last record." |
1625 | -msgstr "" |
1626 | - |
1627 | -#. module: l10n_es_bank_statement |
1628 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1629 | -#, python-format |
1630 | -msgid "Not valid record type." |
1631 | -msgstr "" |
1632 | - |
1633 | -#. module: l10n_es_bank_statement |
1634 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1635 | -#, python-format |
1636 | -msgid "A default account has not been defined for the C43 concept " |
1637 | -msgstr "" |
1638 | - |
1639 | -#. module: l10n_es_bank_statement |
1640 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1641 | -#, python-format |
1642 | -msgid "Error" |
1643 | -msgstr "" |
1644 | - |
1645 | -#. module: l10n_es_bank_statement |
1646 | -#: field:l10n.es.extractos.concepto,name:0 |
1647 | -msgid "Concept name" |
1648 | -msgstr "" |
1649 | - |
1650 | -#. module: l10n_es_bank_statement |
1651 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1652 | -#, python-format |
1653 | -msgid "Credit amount does not agree with the defined in the last record of account." |
1654 | -msgstr "" |
1655 | - |
1656 | -#. module: l10n_es_bank_statement |
1657 | -#: view:l10n.es.extractos.import.wizard:0 |
1658 | -msgid "This wizard will import default concepts related to standard accounts of spanish charts." |
1659 | -msgstr "" |
1660 | - |
1661 | -#. module: l10n_es_bank_statement |
1662 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1663 | -#, python-format |
1664 | -msgid "The bank statement is alredy confirmed. It can not be imported from file." |
1665 | -msgstr "" |
1666 | - |
1667 | -#. module: l10n_es_bank_statement |
1668 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1669 | -#, python-format |
1670 | -msgid "Bank Statement" |
1671 | -msgstr "" |
1672 | - |
1673 | -#. module: l10n_es_bank_statement |
1674 | -#: view:l10n.es.extractos.import.wizard:0 |
1675 | -msgid "Import Wizard" |
1676 | -msgstr "" |
1677 | - |
1678 | -#. module: l10n_es_bank_statement |
1679 | -#: code:addons/l10n_es_bank_statement/wizard/wizard_import_c43_file.py:0 |
1680 | -#, python-format |
1681 | -msgid "bank-statement.txt" |
1682 | -msgstr "" |
1683 | - |
1684 | -#. module: l10n_es_bank_statement |
1685 | -#: field:l10n.es.extractos.concepto,code:0 |
1686 | -msgid "Concept code" |
1687 | -msgstr "" |
1688 | - |
1689 | -#. module: l10n_es_bank_statement |
1690 | -#: view:l10n.es.extractos.import.wizard:0 |
1691 | -#: wizard_button:l10n_es_bank_statement.importar,init,end:0 |
1692 | -msgid "Cancel" |
1693 | -msgstr "" |
1694 | - |
1695 | -#. module: l10n_es_bank_statement |
1696 | -#: model:ir.actions.wizard,name:l10n_es_bank_statement.wizard_l10n_es_bank_statement_importar |
1697 | -msgid "Import bank stat." |
1698 | -msgstr "" |
1699 | - |
1700 | |
1701 | === added file 'l10n_es_bank_statement/import_c43_file.py' |
1702 | --- l10n_es_bank_statement/import_c43_file.py 1970-01-01 00:00:00 +0000 |
1703 | +++ l10n_es_bank_statement/import_c43_file.py 2011-03-11 07:55:12 +0000 |
1704 | @@ -0,0 +1,821 @@ |
1705 | +# -*- coding: utf-8 -*- |
1706 | +############################################################################## |
1707 | +# |
1708 | +# OpenERP, Open Source Management Solution |
1709 | +# Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. |
1710 | +# Jordi Esteve <jesteve@zikzakmedia.com> |
1711 | +# Copyright (c) 2010 Pexego Sistemas Informáticos. All Rights Reserved |
1712 | +# Borja López Soilán <borjals@pexego.es> |
1713 | +# Alberto Luengo Cabanillas <alberto@pexego.es> |
1714 | +# |
1715 | +# |
1716 | +# This program is free software: you can redistribute it and/or modify |
1717 | +# it under the terms of the GNU General Public License as published by |
1718 | +# the Free Software Foundation, either version 3 of the License, or |
1719 | +# (at your option) any later version. |
1720 | +# |
1721 | +# This program is distributed in the hope that it will be useful, |
1722 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1723 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1724 | +# GNU General Public License for more details. |
1725 | +# |
1726 | +# You should have received a copy of the GNU General Public License |
1727 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1728 | +# |
1729 | +############################################################################## |
1730 | + |
1731 | +""" |
1732 | +C43 file importation wizard for bank statements. |
1733 | +""" |
1734 | +from osv import fields,osv |
1735 | +import wizard |
1736 | +import pooler |
1737 | +import base64 |
1738 | +import time |
1739 | +import re |
1740 | +from tools.translate import _ |
1741 | + |
1742 | +class l10n_es_bank_statement_import_c43_wizard(osv.osv_memory): |
1743 | + """ |
1744 | + C43 file importation wizard for bank statements. |
1745 | + """ |
1746 | + |
1747 | + def _process_record_11(self, cr, uid, st_data, line, context): |
1748 | + """ |
1749 | + 11 - Registro cabecera de cuenta (obligatorio) |
1750 | + """ |
1751 | + # |
1752 | + # Add a new group to the statement groups |
1753 | + # |
1754 | + st_group = {} |
1755 | + st_data['groups'] = st_data.get('groups', []) |
1756 | + st_data['groups'].append(st_group) |
1757 | + |
1758 | + # |
1759 | + # Set the group values |
1760 | + # |
1761 | + st_group.update({ |
1762 | + 'entidad':line[2:6], |
1763 | + 'oficina': line[6:10], |
1764 | + 'cuenta': line[10:20], |
1765 | + 'fecha_ini': time.strftime('%Y-%m-%d', time.strptime(line[20:26], '%y%m%d')), |
1766 | + 'fecha_fin': time.strftime('%Y-%m-%d', time.strptime(line[26:32], '%y%m%d')), |
1767 | + 'divisa': line[47:50], |
1768 | + 'modalidad': line[50:51], # 1,2 o 3 |
1769 | + 'nombre_propietario': line[51:77], # Nombre abreviado propietario cuenta |
1770 | + 'saldo_ini': (float(line[33:45]) + (float(line[45:47]) / 100)) * (line[32:33] == '1' and -1 or 1), |
1771 | + 'saldo_fin': 0, |
1772 | + 'num_debe': 0, |
1773 | + 'debe': 0, |
1774 | + 'num_haber': 0, |
1775 | + 'haber': 0, |
1776 | + '_debit_count': 0, |
1777 | + '_debit': 0, |
1778 | + '_credit_count': 0, |
1779 | + '_credit': 0, |
1780 | + '_balance': 0, |
1781 | + }) |
1782 | + |
1783 | + # |
1784 | + # Use the first group initial balance and date, as initial |
1785 | + # balance and date for the full statement. |
1786 | + # |
1787 | + if st_data.get('saldo_ini', None) is None: |
1788 | + st_data['saldo_ini'] = st_group['saldo_ini'] |
1789 | + st_data['fecha_ini'] = st_group['fecha_ini'] |
1790 | + |
1791 | + # Update the record counter |
1792 | + st_data['_num_records'] = st_data.get('_num_records', 0) + 1 |
1793 | + |
1794 | + return st_group |
1795 | + |
1796 | + |
1797 | + def _process_record_22(self, cr, uid, st_data, line, context): |
1798 | + """ |
1799 | + 22 - Registro principal de movimiento (obligatorio) |
1800 | + """ |
1801 | + |
1802 | + # |
1803 | + # Add a new line to the statement lines |
1804 | + # |
1805 | + st_line = {} |
1806 | + st_data['lines'] = st_data.get('lines', []) |
1807 | + st_data['lines'].append(st_line) |
1808 | + |
1809 | + # |
1810 | + # Set the line values |
1811 | + # |
1812 | + st_line.update({ |
1813 | + 'of_origen': line[6:10], |
1814 | + 'fecha_opera': time.strftime('%Y-%m-%d', time.strptime(line[10:16], '%y%m%d')), |
1815 | + 'fecha_valor': time.strftime('%Y-%m-%d', time.strptime(line[16:22], '%y%m%d')), |
1816 | + 'concepto_c': line[22:24], |
1817 | + 'concepto_p': line[24:27], |
1818 | + 'importe': (float(line[28:40]) + (float(line[40:42]) / 100)) * (line[27:28] == '1' and -1 or 1), |
1819 | + 'num_documento': line[41:52], |
1820 | + 'referencia1': line[52:64], |
1821 | + 'referencia2': line[64:], |
1822 | + 'conceptos': '', |
1823 | + }) |
1824 | + |
1825 | + # |
1826 | + # Update the (last) group totals |
1827 | + # |
1828 | + st_group = st_data['groups'][-1] |
1829 | + if st_line['importe'] < 0: |
1830 | + st_group['_debit_count'] += 1 |
1831 | + st_group['_debit'] -= st_line['importe'] |
1832 | + else: |
1833 | + st_group['_credit_count'] += 1 |
1834 | + st_group['_credit'] += st_line['importe'] |
1835 | + |
1836 | + # Update the record counter |
1837 | + st_data['_num_records'] += 1 |
1838 | + |
1839 | + return st_line |
1840 | + |
1841 | + |
1842 | + def _process_record_23(self, cr, uid, st_data, line, context): |
1843 | + """ |
1844 | + 23 - Registros complementarios de concepto (opcionales y hasta un máximo de 5) |
1845 | + """ |
1846 | + # |
1847 | + # Update the current (last) line |
1848 | + # |
1849 | + st_line = st_data['lines'][-1] |
1850 | + st_line['conceptos'] += line[4:] # Se han unido los dos conceptos line[4:42]+line[42:] en uno |
1851 | + |
1852 | + # Update the record counter |
1853 | + st_data['_num_records'] += 1 |
1854 | + |
1855 | + return st_line |
1856 | + |
1857 | + |
1858 | + def _process_record_24(self, cr, uid, st_data, line, context): |
1859 | + """ |
1860 | + 24 - Registro complementario de información de equivalencia del importe (opcional y sin valor contable) |
1861 | + """ |
1862 | + # |
1863 | + # Update the current (last) line |
1864 | + # |
1865 | + st_line = st_data['lines'][-1] |
1866 | + st_line['divisa_eq'] = line[4:7] |
1867 | + st_line['importe_eq'] = float(line[7:19]) + (float(line[19:21]) / 100) |
1868 | + |
1869 | + # Update the record counter |
1870 | + st_data['_num_records'] += 1 |
1871 | + |
1872 | + return st_line |
1873 | + |
1874 | + |
1875 | + def _process_record_33(self, cr, uid, st_data, line, context): |
1876 | + """ |
1877 | + 33 - Registro final de cuenta |
1878 | + """ |
1879 | + # |
1880 | + # Update the (last) group |
1881 | + # |
1882 | + st_group = st_data['groups'][-1] |
1883 | + st_group.update({ |
1884 | + 'num_debe': st_group['num_debe'] + int(line[20:25]), |
1885 | + 'debe': st_group['debe'] + float(line[25:37]) + (float(line[37:39]) / 100), |
1886 | + 'num_haber': st_group['num_haber'] + int(line[39:44]), |
1887 | + 'haber': st_group['haber'] + float(line[44:56]) + (float(line[56:58]) / 100), |
1888 | + 'saldo_fin': st_group['saldo_fin'] + (float(line[59:71]) + (float(line[71:73]) / 100)) * (line[58:59] == '1' and -1 or 1), |
1889 | + '_balance': st_group['saldo_ini'] + st_group['_credit'] - st_group['_debit'] |
1890 | + }) |
1891 | + |
1892 | + # Update the record counter |
1893 | + st_data['_num_records'] += 1 |
1894 | + |
1895 | + # |
1896 | + # Group level checks |
1897 | + # |
1898 | + if st_group['num_debe'] != st_group['_debit_count']: |
1899 | + raise osv.except_osv(_('Error in C43 file'), _('Number of debit records does not agree with the defined in the last record of account.')) |
1900 | + if st_group['num_haber'] != st_group['_credit_count']: |
1901 | + raise osv.except_osv(_('Error in C43 file'), _('Number of credit records does not agree with the defined in the last record of account.')) |
1902 | + if abs(st_group['debe'] - st_group['_debit']) > 0.005: |
1903 | + raise osv.except_osv(_('Error in C43 file'), _('Debit amount does not agree with the defined in the last record of account.')) |
1904 | + if abs(st_group['haber'] - st_group['_credit']) > 0.005: |
1905 | + raise osv.except_osv(_('Error in C43 file'), _('Credit amount does not agree with the defined in the last record of account.')) |
1906 | + # Note: Only perform this check if the balance defined on the file record, |
1907 | + # as some banks may leave it empty (zero) on some circunstances |
1908 | + # (like CaixaNova extracts for VISA credit cards). |
1909 | + if st_group['saldo_fin'] != 0.0 \ |
1910 | + and abs(st_group['saldo_fin'] - st_group['_balance']) > 0.005: |
1911 | + raise osv.except_osv(_('Error in C43 file'), _('Final balance amount = (initial balance + credit - debit) does not agree with the defined in the last record of account.')) |
1912 | + |
1913 | + return st_group |
1914 | + |
1915 | + |
1916 | + def _process_record_88(self, cr, uid, st_data, line, context): |
1917 | + """ |
1918 | + 88 - Registro de fin de archivo |
1919 | + """ |
1920 | + # We will use the last group final balance and date, as final |
1921 | + # balance and date for the full statement. |
1922 | + st_group = st_data['groups'][-1] |
1923 | + |
1924 | + # Update the statement |
1925 | + st_data.update({ |
1926 | + 'num_registros': int(line[20:26]), |
1927 | + 'fecha_fin': st_group['fecha_fin'], |
1928 | + 'saldo_fin': st_group['saldo_fin'], |
1929 | + }) |
1930 | + |
1931 | + # |
1932 | + # File level checks |
1933 | + # |
1934 | + if st_data['num_registros'] != st_data['_num_records']: |
1935 | + raise osv.except_osv(_('Error in C43 file'), _('Number of records does not agree with the defined in the last record.')) |
1936 | + |
1937 | + return st_data |
1938 | + |
1939 | + |
1940 | + def _load_c43_file(self, cr, uid, file_contents, context=None): |
1941 | + """ |
1942 | + Reads a c43 file and returns a dictionary containing the file data: |
1943 | + |
1944 | + _num_records: Number of records really counted |
1945 | + num_registros: Number of records declared on the file |
1946 | + fecha_fin: Final date (as the last record group) |
1947 | + saldo_fin: Final balance (from the last record group) |
1948 | + groups: Info about each of the groups (account groups): |
1949 | + _debit_count |
1950 | + _debit |
1951 | + _credit_count |
1952 | + _credit |
1953 | + entidad |
1954 | + oficina |
1955 | + cuenta |
1956 | + fecha_ini |
1957 | + fecha_fin |
1958 | + saldo_ini |
1959 | + saldo_fin |
1960 | + divisa |
1961 | + modalidad |
1962 | + nombre_propietario |
1963 | + lines: Info about each of the moves |
1964 | + of_origen |
1965 | + fecha_opera |
1966 | + fecha_valor |
1967 | + concepto_c |
1968 | + concepto_p |
1969 | + importe |
1970 | + num_documento |
1971 | + referencia1 |
1972 | + referencia2 |
1973 | + conceptos |
1974 | + divisa_eq |
1975 | + importe_eq |
1976 | + """ |
1977 | + if context is None: |
1978 | + context = {} |
1979 | + |
1980 | + # |
1981 | + # st_data will contain the data read from the file, plus the internal |
1982 | + # counters used for checking. |
1983 | + # |
1984 | + st_data = { |
1985 | + '_num_records': 0, # Number of records really counted |
1986 | + 'num_registros': 0, # Number of records declared on the file |
1987 | + 'fecha_fin': None, # Final date (as the last record group) |
1988 | + 'saldo_fin': None, # Final balance (from the last record group) |
1989 | + 'groups': [], # Info about each of the groups (account groups) |
1990 | + 'lines': [], # Info about each of the moves |
1991 | + } |
1992 | + |
1993 | + # |
1994 | + # Read the C43 file |
1995 | + # |
1996 | + decoded_file_contents = base64.decodestring(file_contents) |
1997 | + try: |
1998 | + unicode(decoded_file_contents, 'utf8') |
1999 | + except Exception, ex: # Si no puede convertir a UTF-8 es que debe estar en ISO-8859-1: Lo convertimos |
2000 | + decoded_file_contents = unicode(decoded_file_contents, 'iso-8859-1').encode('utf-8') |
2001 | + |
2002 | + # |
2003 | + # Process the file lines |
2004 | + # |
2005 | + for line in decoded_file_contents.split("\n"): |
2006 | + if len(line) == 0: |
2007 | + continue |
2008 | + if line[0:2] == '11': # Registro cabecera de cuenta (obligatorio) |
2009 | + self._process_record_11(cr, uid, st_data, line, context) |
2010 | + elif line[0:2] == '22': # Registro principal de movimiento (obligatorio) |
2011 | + self._process_record_22(cr, uid, st_data, line, context) |
2012 | + elif line[0:2] == '23': # Registros complementarios de concepto (opcionales y hasta un máximo de 5) |
2013 | + self._process_record_23(cr, uid, st_data, line, context) |
2014 | + elif line[0:2] == '24': # Registro complementario de información de equivalencia del importe (opcional y sin valor contable) |
2015 | + self._process_record_24(cr, uid, st_data, line, context) |
2016 | + elif line[0:2] == '33': # Registro final de cuenta |
2017 | + self._process_record_33(cr, uid, st_data, line, context) |
2018 | + elif line[0:2] == '88': # Registro de fin de archivo |
2019 | + self._process_record_88(cr, uid, st_data, line, context) |
2020 | + elif ord(line[0]) == 26: # CTRL-Z (^Z), is often used as an end-of-file marker in DOS |
2021 | + pass |
2022 | + else: |
2023 | + raise osv.except_osv(_('Error in C43 file'), _('Not valid record type.')) |
2024 | + |
2025 | + return st_data |
2026 | + |
2027 | + |
2028 | + def _attach_file_to_statement(self, cr, uid, file_contents, statement_id, context=None): |
2029 | + """ |
2030 | + Attachs a file to the given bank statement. |
2031 | + """ |
2032 | + if context is None: |
2033 | + context = {} |
2034 | + pool = pooler.get_pool(cr.dbname) |
2035 | + attachment_facade = pool.get('ir.attachment') |
2036 | + |
2037 | + attachment_name = _('Bank Statement') |
2038 | + |
2039 | + # |
2040 | + # Remove the previous statement file attachment (if any) |
2041 | + # |
2042 | + ids = attachment_facade.search(cr, uid, [ |
2043 | + ('res_id', '=', statement_id), |
2044 | + ('res_model', '=', 'account.bank.statement'), |
2045 | + ('name', '=', attachment_name), |
2046 | + ], context=context) |
2047 | + if ids: |
2048 | + attachment_facade.unlink(cr, uid, ids, context) |
2049 | + |
2050 | + # |
2051 | + # Create the new attachment |
2052 | + # |
2053 | + res = attachment_facade.create(cr, uid, { |
2054 | + 'name': attachment_name, |
2055 | + 'datas': file_contents, |
2056 | + 'datas_fname': _('bank-statement.txt'), |
2057 | + 'res_model': 'account.bank.statement', |
2058 | + 'res_id': statement_id, |
2059 | + }, context=context) |
2060 | + |
2061 | + return res |
2062 | + |
2063 | + |
2064 | + def _get_default_partner_account_ids(self, cr, uid, context=None): |
2065 | + """ |
2066 | + Returns the ids of the default receivable and payable accounts |
2067 | + for partners. |
2068 | + """ |
2069 | + if context is None: |
2070 | + context = {} |
2071 | + pool = pooler.get_pool(cr.dbname) |
2072 | + |
2073 | + model_fields_ids = pool.get('ir.model.fields').search(cr, uid, [ |
2074 | + ('name', 'in', ['property_account_receivable', 'property_account_payable']), |
2075 | + ('model', '=', 'res.partner'), |
2076 | + ], context=context) |
2077 | + property_ids = pool.get('ir.property').search(cr, uid, [ |
2078 | + ('fields_id', 'in', model_fields_ids), |
2079 | + ('res_id', '=', False), |
2080 | + ], context=context) |
2081 | + |
2082 | + account_receivable_id = None |
2083 | + account_payable_id = None |
2084 | + |
2085 | + for prop in pool.get('ir.property').browse(cr, uid, property_ids, context=context): |
2086 | + if prop.fields_id.name == 'property_account_receivable': |
2087 | + try: |
2088 | + # OpenERP 5.0 and 5.2/6.0 revno <= 2236 |
2089 | + account_receivable_id = int(prop.value.split(',')[1]) |
2090 | + except AttributeError: |
2091 | + # OpenERP 6.0 revno >= 2236 |
2092 | + account_receivable_id = prop.value_reference.id |
2093 | + elif prop.fields_id.name == 'property_account_payable': |
2094 | + try: |
2095 | + # OpenERP 5.0 and 5.2/6.0 revno <= 2236 |
2096 | + account_payable_id = int(prop.value.split(',')[1]) |
2097 | + except AttributeError: |
2098 | + # OpenERP 6.0 revno >= 2236 |
2099 | + account_payable_id = prop.value_reference.id |
2100 | + |
2101 | + return (account_receivable_id, account_payable_id) |
2102 | + |
2103 | + |
2104 | + def _find_partner_by_line_vat_number(self, cr, uid, st_line, context=None): |
2105 | + """ |
2106 | + Searchs for a partner given the vat number of the line. |
2107 | + |
2108 | + Notes: |
2109 | + - Depending on the bank, the VAT number may be stored on a diferent |
2110 | + field. So we will have to test if any of those fields looks like a |
2111 | + spanish VAT number, and then search for a partner with that VAT. |
2112 | + - Only works for spanish VAT numbers. |
2113 | + """ |
2114 | + if context is None: |
2115 | + context = {} |
2116 | + pool = pooler.get_pool(cr.dbname) |
2117 | + partner_facade = pool.get('res.partner') |
2118 | + |
2119 | + partner = None |
2120 | + |
2121 | + possible_vat_numbers = [ |
2122 | + st_line['referencia1'][:9].replace(' ',''), # Banc Sabadell |
2123 | + st_line['conceptos'][:9].replace(' ',''), # La Caixa |
2124 | + st_line['conceptos'][21:30].replace(' ',''), # Caja Rural del Jalón |
2125 | + ] |
2126 | + for possible_vat_number in possible_vat_numbers: |
2127 | + if partner_facade.check_vat_es(possible_vat_number): |
2128 | + partner_ids = partner_facade.search(cr, uid, [ |
2129 | + ('vat', 'like', 'ES%s' % possible_vat_number), |
2130 | + ('active', '=', True), |
2131 | + ], context=context) |
2132 | + if len(partner_ids) == 1: |
2133 | + # We found a partner with that VAT number |
2134 | + partner = partner_facade.browse(cr, uid, partner_ids[0], context=context) |
2135 | + break |
2136 | + return partner |
2137 | + |
2138 | + |
2139 | + def _get_nearest_move_line(self, lines, maturity_date, max_date_diff=3600*24*30): |
2140 | + """ |
2141 | + Find the nearest move_line to a given (maturity) date |
2142 | + """ |
2143 | + min_diff = max_date_diff |
2144 | + nearest = None |
2145 | + if not maturity_date: |
2146 | + maturity_date = time.time() |
2147 | + maturity_date_timestamp = time.mktime(time.strptime(maturity_date, '%Y-%m-%d')) |
2148 | + for line in lines: |
2149 | + line_date = line.date_maturity or line.date |
2150 | + if line_date: |
2151 | + line_timestamp = time.mktime(time.strptime(line_date, '%Y-%m-%d')) |
2152 | + diff = abs(maturity_date_timestamp-line_timestamp) |
2153 | + if diff < min_diff: |
2154 | + nearest = line |
2155 | + min_diff = diff |
2156 | + return nearest |
2157 | + |
2158 | + |
2159 | + def _find_entry_to_reconcile_by_line_ref_and_amount(self, cr, uid, |
2160 | + st_line, reconciled_move_lines_ids, |
2161 | + maturity_date, max_date_diff, context=None): |
2162 | + """ |
2163 | + Searchs for a non-conciled entry with the same reference and amount. |
2164 | + (If more than one entry matches returns False). |
2165 | + |
2166 | + Note: The operation reference may be stored in |
2167 | + Banc Sabadell => 'referencia2' or 'conceptos' |
2168 | + Caja Rural del Jalón => 'conceptos' |
2169 | + """ |
2170 | + if context is None: |
2171 | + context = {} |
2172 | + pool = pooler.get_pool(cr.dbname) |
2173 | + move_line_facade = pool.get('account.move.line') |
2174 | + |
2175 | + possible_references = [ |
2176 | + st_line['conceptos'], |
2177 | + st_line['referencia2'], |
2178 | + ] |
2179 | + |
2180 | + for reference in possible_references: |
2181 | + domain = [ |
2182 | + ('id', 'not in', reconciled_move_lines_ids), |
2183 | + ('ref', '=', reference.strip()), |
2184 | + ('reconcile_id', '=', False), |
2185 | + ('reconcile_partial_id', '=', False), |
2186 | + ('account_id.type', 'in', ['receivable', 'payable']), |
2187 | + ] |
2188 | + if st_line['importe'] >= 0: |
2189 | + domain.append( ('debit', '=', '%.2f' % st_line['importe']) ) |
2190 | + else: |
2191 | + domain.append( ('credit', '=', '%.2f' % -st_line['importe']) ) |
2192 | + |
2193 | + line_ids = move_line_facade.search(cr, uid, domain, context=context) |
2194 | + if line_ids: |
2195 | + lines = move_line_facade.browse(cr, uid, line_ids, context) |
2196 | + line = self._get_nearest_move_line(lines, maturity_date, max_date_diff) |
2197 | + return line |
2198 | + return None |
2199 | + |
2200 | + |
2201 | + def _find_entry_to_reconcile_by_line_vat_number_and_amount(self, cr, uid, |
2202 | + st_line, reconciled_move_lines_ids, |
2203 | + maturity_date, max_date_diff, context=None): |
2204 | + """ |
2205 | + Searchs for a non-conciled entry given the partner vat number of the line and amount. |
2206 | + If more than one line is found, and one of the lines has the same |
2207 | + maturity date or at least the same month, that line is returned. |
2208 | + """ |
2209 | + if context is None: |
2210 | + context = {} |
2211 | + pool = pooler.get_pool(cr.dbname) |
2212 | + move_line_facade = pool.get('account.move.line') |
2213 | + |
2214 | + partner = self._find_partner_by_line_vat_number(cr, uid, st_line, context) |
2215 | + |
2216 | + if partner: |
2217 | + # |
2218 | + # Find a line to reconcile from this partner |
2219 | + # |
2220 | + domain = [ |
2221 | + ('id', 'not in', reconciled_move_lines_ids), |
2222 | + ('partner_id', '=', partner.id), |
2223 | + ('reconcile_id', '=', False), |
2224 | + ('reconcile_partial_id', '=', False), |
2225 | + ('account_id.type', 'in', ['receivable', 'payable']), |
2226 | + ] |
2227 | + if st_line['importe'] >= 0: |
2228 | + domain.append( ('debit', '=', '%.2f' % st_line['importe']) ) |
2229 | + else: |
2230 | + domain.append( ('credit', '=', '%.2f' % -st_line['importe']) ) |
2231 | + |
2232 | + line_ids = move_line_facade.search(cr, uid, domain, context=context) |
2233 | + if line_ids: |
2234 | + lines = move_line_facade.browse(cr, uid, line_ids, context) |
2235 | + line = self._get_nearest_move_line(lines, maturity_date, max_date_diff) |
2236 | + return line |
2237 | + return None |
2238 | + |
2239 | + |
2240 | + def _find_entry_to_reconcile_by_line_amount(self, cr, uid, |
2241 | + st_line, reconciled_move_lines_ids, |
2242 | + maturity_date, max_date_diff, context=None): |
2243 | + """ |
2244 | + Searchs for a non-conciled entry given the line amount. |
2245 | + """ |
2246 | + if context is None: |
2247 | + context = {} |
2248 | + pool = pooler.get_pool(cr.dbname) |
2249 | + move_line_facade = pool.get('account.move.line') |
2250 | + |
2251 | + domain = [ |
2252 | + ('id', 'not in', reconciled_move_lines_ids), |
2253 | + ('reconcile_id', '=', False), |
2254 | + ('reconcile_partial_id', '=', False), |
2255 | + ('account_id.type', 'in', ['receivable', 'payable']), |
2256 | + ] |
2257 | + if st_line['importe'] >= 0: |
2258 | + domain.append( ('debit', '=', '%.2f' % st_line['importe']) ) |
2259 | + else: |
2260 | + domain.append( ('credit', '=', '%.2f' % -st_line['importe']) ) |
2261 | + |
2262 | + line_ids = move_line_facade.search(cr, uid, domain, context=context) |
2263 | + if line_ids: |
2264 | + lines = move_line_facade.browse(cr, uid, line_ids, context) |
2265 | + line = self._get_nearest_move_line(lines, maturity_date, max_date_diff) |
2266 | + return line |
2267 | + return None |
2268 | + |
2269 | + |
2270 | + def _find_payment_order_to_reconcile_by_line_amount(self, cr, uid, |
2271 | + st_line, reconciled_move_lines_ids, |
2272 | + maturity_date, max_date_diff, context=None): |
2273 | + """ |
2274 | + Searchs for a non-conciled payment order with the same total amount. |
2275 | + (If more than one order matches None is returned). |
2276 | + """ |
2277 | + if context is None: |
2278 | + context = {} |
2279 | + pool = pooler.get_pool(cr.dbname) |
2280 | + |
2281 | + # We require account_payment to be instaled |
2282 | + if not 'payment.order' in pool.obj_list(): |
2283 | + return None |
2284 | + |
2285 | + # |
2286 | + # The total field of the payment orders is a functional field, |
2287 | + # so we can't use it for searching. |
2288 | + # Also, browsing all the payment orders would be slow and not scale |
2289 | + # well. So we just let Postgres do the job. |
2290 | + # |
2291 | + # The query will search for orders of the given amount and without |
2292 | + # reconciled (or partial reconciled) lines |
2293 | + # |
2294 | + query = """ |
2295 | + SELECT payment_line.order_id, SUM(payment_line.amount_currency) AS total |
2296 | + FROM payment_line |
2297 | + INNER JOIN account_move_line ON (payment_line.move_line_id = account_move_line.id) |
2298 | + GROUP BY payment_line.order_id |
2299 | + HAVING SUM(payment_line.amount_currency) = %.2f |
2300 | + AND COUNT(account_move_line.reconcile_id) = 0 |
2301 | + AND COUNT(account_move_line.reconcile_partial_id) = 0 |
2302 | + """ |
2303 | + cr.execute(query % -st_line['importe']) |
2304 | + res = cr.fetchall() |
2305 | + |
2306 | + if len(res) == 1: |
2307 | + # Only one payment order found, return it |
2308 | + payment_order = pool.get('payment.order').browse(cr, uid, res[0][0], context) |
2309 | + return payment_order |
2310 | + else: |
2311 | + # More than one payment order found, we return false |
2312 | + return None |
2313 | + |
2314 | + |
2315 | + # |
2316 | + # Main action -------------------------------------------------------------- |
2317 | + # |
2318 | + def import_action(self, cr, uid, ids, context=None): |
2319 | + """ |
2320 | + Imports the C43 file selected by the user on the wizard form, |
2321 | + into the current bank statement statement. |
2322 | + """ |
2323 | + if context is None: |
2324 | + context = {} |
2325 | + |
2326 | + pool = pooler.get_pool(cr.dbname) |
2327 | + statement_facade = pool.get('account.bank.statement') |
2328 | + statement_line_facade = pool.get('account.bank.statement.line') |
2329 | + concepto_facade = pool.get('l10n.es.extractos.concepto') |
2330 | + |
2331 | + for c43_wizard in self.browse(cr,uid,ids,context): |
2332 | + statement_id = context['active_id'] |
2333 | + |
2334 | + statement = statement_facade.browse(cr, uid, statement_id) |
2335 | + if statement.state == 'confirm': |
2336 | + raise osv.except_osv(_('Error!'), _('The bank statement is alredy confirmed. It can not be imported from file.')) |
2337 | + |
2338 | + # Load the file data into the st_data dictionary |
2339 | + st_data = self._load_c43_file(cr, uid, c43_wizard.file, context=context) |
2340 | + |
2341 | + # |
2342 | + # Process each movement line from the statement data |
2343 | + # |
2344 | + reconciled_move_lines_ids = [] |
2345 | + for st_line in st_data['lines']: |
2346 | + # |
2347 | + # Search the 'concepto' for this line |
2348 | + # |
2349 | + concepto_ids = concepto_facade.search(cr, uid, [ |
2350 | + ('code', '=', st_line['concepto_c']) |
2351 | + ], context=context) |
2352 | + concepto = None |
2353 | + if concepto_ids: |
2354 | + concepto = concepto_facade.browse(cr, uid, concepto_ids[0], context=context) |
2355 | + |
2356 | + # |
2357 | + # Basic statement line values |
2358 | + # |
2359 | + note = st_line['conceptos'].strip() |
2360 | + ref = re.sub(' +', ' ', note).strip() |
2361 | + values = { |
2362 | + 'statement_id': statement_id, |
2363 | + 'name': concepto and concepto.name or '-', |
2364 | + 'date': st_line['fecha_opera'], |
2365 | + 'amount': abs(st_line['importe']), |
2366 | + 'ref': ref, |
2367 | + 'note': note, |
2368 | + } |
2369 | + |
2370 | + if st_line['concepto_c'] in ['03']: # Recibo/Letra domiciliado |
2371 | + values['type'] = 'supplier' |
2372 | + elif st_line['concepto_c'] in ['14']: # Devolución/Impagado |
2373 | + values['type'] = 'customer' |
2374 | + elif st_line['concepto_c'] in ['05', '06', '07', '08', '09', '10', '11', '12', '13', '15', '16', '17', '98', '99']: |
2375 | + values['type'] = 'general' |
2376 | + else: |
2377 | + values['type'] = (st_line['importe'] >= 0 and 'customer') or 'supplier' |
2378 | + |
2379 | + # |
2380 | + # Search for lines or payment orders to reconcile against this line |
2381 | + # |
2382 | + line2reconcile = None |
2383 | + order2reconcile = None |
2384 | + |
2385 | + maturity_date = st_line['fecha_valor'] |
2386 | + max_date_diff = c43_wizard.reco_max_days * 3600*24 |
2387 | + |
2388 | + # Search unconciled entries by line reference and amount. |
2389 | + if not line2reconcile and c43_wizard.reco_reference_and_amount: |
2390 | + line2reconcile = self._find_entry_to_reconcile_by_line_ref_and_amount(cr, uid, |
2391 | + st_line, |
2392 | + reconciled_move_lines_ids, |
2393 | + maturity_date, |
2394 | + max_date_diff, |
2395 | + context=context) |
2396 | + |
2397 | + # Search unconciled entries by line VAT number and amount. |
2398 | + if not line2reconcile and c43_wizard.reco_vat_and_amount: |
2399 | + line2reconcile = self._find_entry_to_reconcile_by_line_vat_number_and_amount(cr, uid, |
2400 | + st_line, |
2401 | + reconciled_move_lines_ids, |
2402 | + maturity_date, |
2403 | + max_date_diff, |
2404 | + context=context) |
2405 | + |
2406 | + # Search unconciled entries by line amount. |
2407 | + if not line2reconcile and c43_wizard.reco_amount: |
2408 | + line2reconcile = self._find_entry_to_reconcile_by_line_amount(cr, uid, |
2409 | + st_line, |
2410 | + reconciled_move_lines_ids, |
2411 | + maturity_date, |
2412 | + max_date_diff, |
2413 | + context=context) |
2414 | + |
2415 | + # Search unreconciled payment orders by amount. |
2416 | + if not line2reconcile and c43_wizard.reco_payment_order and 'payment.order' in pool.obj_list(): |
2417 | + order2reconcile = self._find_payment_order_to_reconcile_by_line_amount(cr, uid, |
2418 | + st_line, |
2419 | + reconciled_move_lines_ids, |
2420 | + maturity_date, |
2421 | + max_date_diff, |
2422 | + context=context) |
2423 | + |
2424 | + # |
2425 | + # Create the statement lines |
2426 | + # |
2427 | + if line2reconcile: |
2428 | + # |
2429 | + # Add a statement line reconciled against the line2reconcile |
2430 | + # |
2431 | + reconciled_move_lines_ids.append(line2reconcile.id) |
2432 | + line_ids = [line2reconcile.id] |
2433 | + voucher_id = statement_line_facade.generate_voucher_from_import_wizard(cr, uid, statement_id, line2reconcile, line_ids,context) |
2434 | + values.update({ |
2435 | + 'account_id': line2reconcile.account_id.id, |
2436 | + 'partner_id': line2reconcile.partner_id and line2reconcile.partner_id.id or None, |
2437 | + 'voucher_id': voucher_id, |
2438 | + }) |
2439 | + statement_line_facade.create(cr, uid, values, context=context) |
2440 | + elif order2reconcile: |
2441 | + # |
2442 | + # Add *several* statement lines reconciled against each of |
2443 | + # the payment order lines. |
2444 | + # |
2445 | + for line in order2reconcile.line_ids: |
2446 | + reconciled_move_lines_ids.append(line.id) |
2447 | + line_ids = [line.move_line_id.id] |
2448 | + voucher_id = statement_line_facade.generate_voucher_from_import_wizard(cr, uid, statement_id, line, line_ids, context) |
2449 | + values.update({ |
2450 | + 'account_id': line.move_line_id.account_id.id, |
2451 | + 'partner_id': line.move_line_id.partner_id and line.move_line_id.partner_id.id or None, |
2452 | + 'voucher_id': voucher_id, |
2453 | + }) |
2454 | + statement_line_facade.create(cr, uid, values, context=context) |
2455 | + else: |
2456 | + # |
2457 | + # Add a non-reconciled statement line |
2458 | + # |
2459 | + account_id = concepto and concepto.account_id.id |
2460 | + partner = None |
2461 | + |
2462 | + if values['type'] in ['customer', 'supplier']: |
2463 | + # |
2464 | + # Use partner accounts |
2465 | + # |
2466 | + partner = self._find_partner_by_line_vat_number(cr, uid, st_line, context) |
2467 | + if partner: |
2468 | + # Use the partner accounts |
2469 | + if values['type'] == 'customer': |
2470 | + account_id = partner.property_account_receivable and partner.property_account_receivable.id |
2471 | + else: |
2472 | + account_id = partner.property_account_payable and partner.property_account_payable.id |
2473 | + else: |
2474 | + # Use the generic partner accounts |
2475 | + default_account_receivable_id, default_account_payable_id = self._get_default_partner_account_ids(cr, uid, context) |
2476 | + if values['type'] == 'customer': |
2477 | + account_id = default_account_receivable_id |
2478 | + else: |
2479 | + account_id = default_account_payable_id |
2480 | + |
2481 | + if not account_id: |
2482 | + raise osv.except_osv(_('Error'), _('A default account has not been defined for the C43 concept ') + st_line['concepto_c'] ) |
2483 | + |
2484 | + values.update({ |
2485 | + 'account_id': account_id, |
2486 | + 'partner_id': partner and partner.id or None, |
2487 | + 'voucher_id': None, |
2488 | + }) |
2489 | + statement_line_facade.create(cr, uid, values, context=context) |
2490 | + |
2491 | + |
2492 | + # |
2493 | + # Update the statement |
2494 | + # |
2495 | + statement_facade.write(cr, uid, statement_id, { |
2496 | + 'date': st_data['fecha_fin'], |
2497 | + 'balance_start': st_data['saldo_ini'], |
2498 | + 'balance_end_real': st_data['saldo_fin'], |
2499 | + }, context=context) |
2500 | + |
2501 | + # Attach the C43 file to the current statement |
2502 | + self._attach_file_to_statement(cr, uid, c43_wizard.file, statement_id) |
2503 | + |
2504 | + return {} |
2505 | + |
2506 | + |
2507 | + _name = 'l10n.es.bank.statement.import.c43.wizard' |
2508 | + |
2509 | + _columns = { |
2510 | + 'file': fields.binary('Bank Statements File', required=True, filename='file_name'), |
2511 | + 'file_name': fields.char('Bank Statements File', size=64, readonly=True), |
2512 | + 'reco_reference_and_amount': fields.boolean('Reconcile by reference and amount'), |
2513 | + 'reco_vat_and_amount' : fields.boolean('Reconcile by VAT number and amount'), |
2514 | + 'reco_amount' : fields.boolean('Reconcile by amount'), |
2515 | + 'reco_payment_order': fields.boolean('Reconcile payment orders by total amount'), |
2516 | + 'reco_max_days' : fields.integer('Max. days from statement date',help='Maximum difference in days, between the maturity date of the entry to reconcile and the bank statement entry') |
2517 | + } |
2518 | + |
2519 | +l10n_es_bank_statement_import_c43_wizard() |
2520 | + |
2521 | + |
2522 | + |
2523 | + |
2524 | + |
2525 | + |
2526 | |
2527 | === added file 'l10n_es_bank_statement/import_c43_file_view.xml' |
2528 | --- l10n_es_bank_statement/import_c43_file_view.xml 1970-01-01 00:00:00 +0000 |
2529 | +++ l10n_es_bank_statement/import_c43_file_view.xml 2011-03-11 07:55:12 +0000 |
2530 | @@ -0,0 +1,46 @@ |
2531 | +<?xml version="1.0" encoding="utf-8"?> |
2532 | +<openerp> |
2533 | + <data> |
2534 | + |
2535 | + <!-- Import C43 file wizard --> |
2536 | + <record model="ir.ui.view" id="c43_file_import_wizard"> |
2537 | + <field name="name">l10n.es.bank.statement.c43.import.form</field> |
2538 | + <field name="model">l10n.es.bank.statement.import.c43.wizard</field> |
2539 | + <field name="type">form</field> |
2540 | + <field name="arch" type="xml"> |
2541 | + <form string="Bank statements import according to norm C43"> |
2542 | + <group colspan="4"> |
2543 | + <label string="Bank Statements File:"/> |
2544 | + <newline/> |
2545 | + <field name="file_name" nolabel="1"/> |
2546 | + <field name="file" filename="file_name" nolabel="1"/> |
2547 | + </group> |
2548 | + <group colspan="4"> |
2549 | + <separator string="Automatic reconciliation options" colspan="4"/> |
2550 | + <field name="reco_reference_and_amount" colspan="4"/> |
2551 | + <field name="reco_vat_and_amount" colspan="4"/> |
2552 | + <field name="reco_amount" colspan="4"/> |
2553 | + <field name="reco_payment_order" colspan="4"/> |
2554 | + <field name="reco_max_days" colspan="4"/> |
2555 | + </group> |
2556 | + <button icon="gtk-cancel" special="cancel" string="Cancel" type="object"/> |
2557 | + <button icon="gtk-ok" name="import_action" string="Import" type="object"/> |
2558 | + </form> |
2559 | + </field> |
2560 | + </record> |
2561 | + |
2562 | + <record id="action_c43_file_import_wizard" model="ir.actions.act_window"> |
2563 | + <field name="name">Import C43 Files Wizard</field> |
2564 | + <field name="type">ir.actions.act_window</field> |
2565 | + <field name="res_model">l10n.es.bank.statement.import.c43.wizard</field> |
2566 | + <field name="view_type">form</field> |
2567 | + <field name="view_mode">form</field> |
2568 | + <field name="target">new</field> |
2569 | + </record> |
2570 | + |
2571 | + <act_window id="action_c43_file_import_wizard" |
2572 | + key2="client_action_multi" name="Import Bank Statement" |
2573 | + res_model="l10n.es.bank.statement.import.c43.wizard" src_model="account.bank.statement" |
2574 | + view_mode="form" target="new" view_type="form" groups="account.group_account_manager"/> |
2575 | + </data> |
2576 | +</openerp> |
2577 | \ No newline at end of file |
2578 | |
2579 | === modified file 'l10n_es_bank_statement/import_conceptos.py' |
2580 | --- l10n_es_bank_statement/import_conceptos.py 2010-11-05 13:13:04 +0000 |
2581 | +++ l10n_es_bank_statement/import_conceptos.py 2011-03-11 07:55:12 +0000 |
2582 | @@ -27,9 +27,11 @@ |
2583 | C43 format concepts and extension of the bank statement lines. |
2584 | """ |
2585 | |
2586 | -from osv import osv |
2587 | +from osv import osv, fields |
2588 | import tools |
2589 | import os |
2590 | +from tools.translate import _ |
2591 | +from xml.dom import minidom |
2592 | |
2593 | |
2594 | |
2595 | @@ -38,16 +40,82 @@ |
2596 | Wizard to import the XML file defining the statement concepts (concepto) |
2597 | """ |
2598 | |
2599 | + def _get_available_user_companies(self, cr, uid, context={}): |
2600 | + """ |
2601 | + Obtiene la compañía del usuario activo |
2602 | + """ |
2603 | + current_user = self.pool.get('res.users').browse(cr,uid,uid) |
2604 | + result = [x.id for x in current_user.company_ids] |
2605 | + return result |
2606 | + |
2607 | + def action_import(self, cr, uid, ids, context=None): |
2608 | + for wiz in self.browse(cr, uid, ids, context): |
2609 | + concept_obj = self.pool.get('l10n.es.extractos.concepto') |
2610 | + account_obj = self.pool.get('account.account') |
2611 | + concept_ids_list = [] |
2612 | + root_uid = 1 |
2613 | + company_concepts = concept_obj.browse(cr, root_uid, concept_obj.search(cr, root_uid, [('company_id','=', wiz.company_id.id)])) |
2614 | + all_concepts = concept_obj.browse(cr, root_uid, concept_obj.search(cr, root_uid, [])) |
2615 | + if company_concepts: |
2616 | + raise osv.except_osv(_("Info:"), _("Concepts for this company already imported...")) |
2617 | + elif all_concepts: |
2618 | + #Duplicamos los de una compañia (controlando que los planes contables no tengan el mismo numero de digitos) y asignamos nueva compañía |
2619 | + any_concepts = concept_obj.browse(cr, root_uid, concept_obj.search(cr, root_uid,[('company_id','=', all_concepts[0].company_id.id)])) |
2620 | + for concept in any_concepts: |
2621 | + account_code = "%s%%00"%(concept.account_id.code[0:4]) |
2622 | + company_account_id = account_obj.search(cr, root_uid, [('company_id','=',wiz.company_id.id), ('code','like',account_code)]) |
2623 | + company_account_id = company_account_id and company_account_id[0] or False |
2624 | + vals_concept = { |
2625 | + 'name': concept.name, |
2626 | + 'code': concept.code, |
2627 | + 'account_id': company_account_id, |
2628 | + 'company_id': wiz.company_id.id |
2629 | + } |
2630 | + concept_id = concept_obj.create(cr,uid, vals_concept) |
2631 | + concept_ids_list.append(concept_id) |
2632 | + |
2633 | + #Devolvemos la vista lista de los conceptos creados... |
2634 | + concept_view_list_id = self.pool.get('ir.ui.view').search(cr, root_uid, [('name', '=', 'l10n.es.extractos.concepto.tree')])[0] |
2635 | + return { |
2636 | + 'name' : _('C43 Created Concepts'), |
2637 | + 'type' : 'ir.actions.act_window', |
2638 | + 'res_model' : 'l10n.es.extractos.concepto', |
2639 | + 'view_type' : 'form', |
2640 | + 'view_mode' : 'tree,form', |
2641 | + 'domain' : "[('id', 'in', %s)]" % concept_ids_list, |
2642 | + 'view_id' : False, |
2643 | + 'views': [(concept_view_list_id, 'tree'), (False, 'form'), (False, 'calendar'), (False, 'graph')], |
2644 | + } |
2645 | + |
2646 | + else: |
2647 | + #Creamos nuevos registros... |
2648 | + try: |
2649 | + fp = tools.file_open(os.path.join('l10n_es_bank_statement', 'data/extractos_conceptos.xml')) |
2650 | + except IOError: |
2651 | + return {} |
2652 | + idref = {} |
2653 | + tools.convert_xml_import(cr, 'l10n_es_bank_statement', fp, idref, 'init', noupdate=True) |
2654 | + #Devolvemos la vista lista de los usuarios modificados... |
2655 | + concept_view_list_id = self.pool.get('ir.ui.view').search(cr, root_uid, [('name', '=', 'l10n.es.extractos.concepto.tree')])[0] |
2656 | + return { |
2657 | + 'name' : _('C43 Created Concepts'), |
2658 | + 'type' : 'ir.actions.act_window', |
2659 | + 'res_model' : 'l10n.es.extractos.concepto', |
2660 | + 'view_type' : 'form', |
2661 | + 'view_mode' : 'tree,form', |
2662 | + 'view_id' : False, |
2663 | + 'views': [(concept_view_list_id, 'tree'), (False, 'form'), (False, 'calendar'), (False, 'graph')], |
2664 | + } |
2665 | + |
2666 | _name = 'l10n.es.extractos.import.wizard' |
2667 | |
2668 | - def action_import(self, cr, uid, ids, context=None): |
2669 | - try: |
2670 | - fp = tools.file_open(os.path.join('l10n_es_bank_statement', 'extractos_conceptos.xml')) |
2671 | - except IOError, ex: |
2672 | - return {} |
2673 | - idref = {} |
2674 | - tools.convert_xml_import(cr, 'l10n_es_bank_statement', fp, idref, 'init', noupdate=True) |
2675 | - return {} |
2676 | + _columns = { |
2677 | + 'company_id': fields.many2one('res.company', _('Company'), required=True, context={'user_preference': True}) |
2678 | + } |
2679 | + |
2680 | + _defaults = { |
2681 | + 'company_id': lambda self, cr, uid, context: self._get_available_user_companies(cr, uid, context), |
2682 | + } |
2683 | |
2684 | l10n_es_extractos_import_wizard() |
2685 | |
2686 | |
2687 | === added file 'l10n_es_bank_statement/security/concepto_security.xml' |
2688 | --- l10n_es_bank_statement/security/concepto_security.xml 1970-01-01 00:00:00 +0000 |
2689 | +++ l10n_es_bank_statement/security/concepto_security.xml 2011-03-11 07:55:12 +0000 |
2690 | @@ -0,0 +1,14 @@ |
2691 | +<?xml version="1.0" encoding="utf-8"?> |
2692 | +<openerp> |
2693 | +<data noupdate="0"> |
2694 | + |
2695 | + <!-- Multi - Company Rules --> |
2696 | + <record model="ir.rule" id="c43_concept_comp_rule"> |
2697 | + <field name="name">C43 File Concepts multi-company</field> |
2698 | + <field name="model_id" ref="model_l10n_es_extractos_concepto"/> |
2699 | + <field name="global" eval="True"/> |
2700 | + <field name="domain_force">['|','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),('company_id.child_ids','child_of',[user.company_id.id])]</field> |
2701 | + </record> |
2702 | + |
2703 | +</data> |
2704 | +</openerp> |
2705 | |
2706 | === removed file 'l10n_es_bank_statement/wizard/__init__.py' |
2707 | --- l10n_es_bank_statement/wizard/__init__.py 2010-11-05 13:13:04 +0000 |
2708 | +++ l10n_es_bank_statement/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
2709 | @@ -1,31 +0,0 @@ |
2710 | -# -*- coding: utf-8 -*- |
2711 | -############################################################################## |
2712 | -# |
2713 | -# OpenERP, Open Source Management Solution |
2714 | -# Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. |
2715 | -# Jordi Esteve <jesteve@zikzakmedia.com> |
2716 | -# Copyright (c) 2010 Pexego Sistemas Informáticos. All Rights Reserved |
2717 | -# Borja López Soilán <borjals@pexego.es> |
2718 | -# $Id$ |
2719 | -# |
2720 | -# This program is free software: you can redistribute it and/or modify |
2721 | -# it under the terms of the GNU General Public License as published by |
2722 | -# the Free Software Foundation, either version 3 of the License, or |
2723 | -# (at your option) any later version. |
2724 | -# |
2725 | -# This program is distributed in the hope that it will be useful, |
2726 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2727 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2728 | -# GNU General Public License for more details. |
2729 | -# |
2730 | -# You should have received a copy of the GNU General Public License |
2731 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2732 | -# |
2733 | -############################################################################## |
2734 | - |
2735 | -""" |
2736 | -Wizards for the spanish localization of the bank statements. |
2737 | -""" |
2738 | - |
2739 | -import wizard_import_c43_file |
2740 | - |
2741 | |
2742 | === renamed file 'l10n_es_bank_statement/wizard/wizard_import_c43_file.py' => 'l10n_es_bank_statement/wizard/wizard_import_c43_file.py.THIS' |
1) No he podido ejecutarlo, sólo mirarme el código, pues en la propuesta de merge has olvidado añadir estos dos ficheros nuevos:
import_c43_file.py c43_file_ view.xml
import_
que se importan en los ficheros __init__.py y __openerp__.py del módulo.
2) Para respetar el estilo de programación, revisa en la definición de los métodos o en sus llamadas que los parámetros estén separados correctamente con ", " (una coma + un espacio).
Fichero account_ bank_statement. py, líneas 41, 47, 50, 71 conceptos. py, línea 48
Fichero import_
Por ejemplo, hacer este cambio: partner_ id(self, cr,uid, line_ids,context, partner_id, ptype, amount): partner_ id(self, cr, uid, line_ids, context, partner_id, ptype, amount):
def onchange_
def onchange_
3) Fichero import_ conceptos. py: extractos. import. wizard' que implementa la importación de conceptos bancarios para definir el método def generate_ voucher_ from_import_ wizard( ) que en principio no tiene nada que ver. Creo que sería más coherente definirlo dentro del objeto 'account. bank.statement. line', en el mismo objeto donde se llama.
3.1) Me ha extrañado que uses el mismo objeto en memoria 'l10n.es.
3.2) Sobre este método generate_ voucher_ from_import_ wizard( ), algunas pequeñas sugerencias:
La línea 63 no hace falta: voucher_res = {}
La línea 66 debería ser st_line. date, con lo que deberías añadir un parámetro más a este método para pasarle esta fecha.
ctx['date'] = line.date
en lugar de
ctx['date'] = line_date
para coger la fecha del movimiento contable en lugar de la fecha de hoy ¿Pq coges la fecha de hoy?, la fecha de hoy es la fecha en que se introduce el extracto bancario que no tiene ningún interés y puede ser días/semanas después de la fecha del movimiento o apunte contable. O quizás mejor coger la fecha de la línea del extracto bancario, por lo se debería coger la fecha de current_
4) En el método def onchange_ partner_ id() de account_ bank_statement. py, en la versión 5.0 se elimina la propuesta de concilacion que hubiera antes de proponer una de nueva. Creo que en la versión 6.0, si modificas la empresa de la línea de extracto también se debería eliminar el voucher que hubiera antes de proponer uno de nuevo, si no, así que vayamos cambiando la empresa de una línea de extracto bancario se podrían ir proponiendo nuevos vouchers y nos quedarían vouchers antiguos erróneos.