Merge lp:~therp-nl/banking-addons/ba7.0-MIG-import into lp:banking-addons

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 166
Proposed branch: lp:~therp-nl/banking-addons/ba7.0-MIG-import
Merge into: lp:banking-addons
Prerequisite: lp:~therp-nl/banking-addons/ba7.0-RFR-split_off_payment_part
Diff against target: 3727 lines (+583/-1203)
57 files modified
account_banking/__init__.py (+3/-3)
account_banking/__openerp__.py (+10/-17)
account_banking/account_banking.py (+165/-345)
account_banking/account_banking_view.xml (+69/-181)
account_banking/banking_import_transaction.py (+72/-74)
account_banking/migrations/0.1.81/post-set-statement-line-state.py (+3/-3)
account_banking/parsers/__init__.py (+3/-3)
account_banking/parsers/convert.py (+4/-4)
account_banking/parsers/models.py (+3/-3)
account_banking/record.py (+3/-3)
account_banking/sepa/__init__.py (+3/-3)
account_banking/sepa/iban.py (+3/-3)
account_banking/sepa/online.py (+3/-3)
account_banking/sepa/postalcode.py (+3/-3)
account_banking/sepa/urlagent.py (+3/-3)
account_banking/struct.py (+3/-3)
account_banking/wizard/__init__.py (+3/-3)
account_banking/wizard/bank_import.py (+29/-37)
account_banking/wizard/banking_transaction_wizard.py (+14/-12)
account_banking/wizard/banktools.py (+38/-66)
account_banking_fi_patu/__init__.py (+3/-3)
account_banking_fi_patu/__openerp__.py (+4/-4)
account_banking_fi_patu/patu.py (+3/-3)
account_banking_nl_abnamro/__init__.py (+1/-30)
account_banking_nl_abnamro/__openerp__.py (+12/-23)
account_banking_nl_abnamro/__terp__.py (+0/-53)
account_banking_nl_abnamro/abnamro.py (+14/-13)
account_banking_nl_clieop/__init__.py (+3/-3)
account_banking_nl_clieop/__openerp__.py (+6/-15)
account_banking_nl_clieop/account_banking_nl_clieop.py (+3/-3)
account_banking_nl_clieop/migrations/0.63/post-fill-ir_model_id.py (+3/-3)
account_banking_nl_clieop/migrations/0.64/post-set-payment-order-type.py (+3/-3)
account_banking_nl_clieop/wizard/__init__.py (+3/-3)
account_banking_nl_clieop/wizard/clieop.py (+3/-3)
account_banking_nl_clieop/wizard/export_clieop.py (+3/-3)
account_banking_nl_girotel/__init__.py (+3/-3)
account_banking_nl_girotel/__openerp__.py (+5/-14)
account_banking_nl_girotel/girotel.py (+3/-3)
account_banking_nl_ing/__init__.py (+1/-3)
account_banking_nl_ing/__openerp__.py (+8/-19)
account_banking_nl_ing/__terp__.py (+0/-58)
account_banking_nl_ing/ing.py (+10/-10)
account_banking_nl_multibank/__init__.py (+3/-3)
account_banking_nl_multibank/__openerp__.py (+8/-18)
account_banking_nl_multibank/multibank.py (+3/-3)
account_banking_nl_triodos/__init__.py (+3/-3)
account_banking_nl_triodos/__openerp__.py (+6/-19)
account_banking_nl_triodos/__terp__.py (+0/-58)
account_banking_nl_triodos/triodos.py (+3/-3)
account_banking_uk_hsbc/__openerp__.py (+2/-5)
account_banking_uk_hsbc/account_banking_uk_hsbc.py (+3/-3)
account_banking_uk_hsbc/wizard/__init__.py (+3/-3)
account_banking_uk_hsbc/wizard/export_hsbc.py (+3/-3)
account_banking_uk_hsbc/wizard/paymul.py (+3/-3)
account_banking_uk_hsbc/wizard/paymul_test.py (+3/-3)
account_direct_debit/__openerp__.py (+5/-14)
account_payment_shortcut/__openerp__.py (+4/-15)
To merge this branch: bzr merge lp:~therp-nl/banking-addons/ba7.0-MIG-import
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review, no test Approve
Guewen Baconnier @ Camptocamp Approve
Alexandre Fayolle - camptocamp code review, no test Needs Fixing
Review via email: mp+158654@code.launchpad.net

Commit message

[MIG] Adapt bank statement import to 7.0 API, views
[LIC] Relicense as AGPL
[IMP] Create partners as suppliers if amount < 0

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

I'm really not fond of "import *" in production code, especially if, as in here, there several such imports in the same module.
I suggest:

* either importing explicitely the symbols you are using
* of importing just the module (maybe with the "as" keyword to perform an on the fly aliasing) and using a qualified access

Question: what do the "AB" comments stand for?

review: Needs Fixing (code review, no test)
199. By Stefan Rijnhart (Opener)

[RFR] Refactor out wildcard imports
[RFR] Use API to get period

200. By Stefan Rijnhart (Opener)

[RFR] Update comment

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Alexandre,

totally agreed. I refactored out this legacy wildcard import.

AB stands for Account Banking, the name of the original project. It was used to mark custom lines in the create_move_from_st_line() method that it replaced in earlier versions. Of course, this version takes advantage of the refactorings in the original method driven by Camp2camp (thanks!) so that it can apply proper inheritance. I only forgot to update the comments.

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

There is conflict on lines 2678..2707.

Besides that, seems fine to me.

Can you resolve the conflict and resubmit please?

Thanks

review: Needs Resubmitting
201. By Stefan Rijnhart (Opener)

[MRG] Merged with prerequisite branch and resolved conflicts

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Guewen,

thanks for the review! I resolved the conflict with the prerequisite branch.

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Thanks, LGTM

review: Approve
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Just found a minor one that comes from the old code, so I approve anyways:

#1640: replace inside translation string

review: Approve (code review, no test)
202. By Stefan Rijnhart (Opener)

[FIX] Variable substitution inside call to _()

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Thanks, fixed that rightaway

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_banking/__init__.py'
--- account_banking/__init__.py 2012-01-16 16:15:55 +0000
+++ account_banking/__init__.py 2013-05-06 14:07:28 +0000
@@ -11,16 +11,16 @@
11# garantees and support are strongly adviced to contract EduSense BV11# garantees and support are strongly adviced to contract EduSense BV
12#12#
13# This program is free software: you can redistribute it and/or modify13# This program is free software: you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by14# it under the terms of the GNU Affero General Public License as published by
15# the Free Software Foundation, either version 3 of the License, or15# the Free Software Foundation, either version 3 of the License, or
16# (at your option) any later version.16# (at your option) any later version.
17#17#
18# This program is distributed in the hope that it will be useful,18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.21# GNU Affero General Public License for more details.
22#22#
23# You should have received a copy of the GNU General Public License23# You should have received a copy of the GNU Affero General Public License
24# along with this program. If not, see <http://www.gnu.org/licenses/>.24# along with this program. If not, see <http://www.gnu.org/licenses/>.
25#25#
26##############################################################################26##############################################################################
2727
=== modified file 'account_banking/__openerp__.py'
--- account_banking/__openerp__.py 2013-05-06 14:07:27 +0000
+++ account_banking/__openerp__.py 2013-05-06 14:07:28 +0000
@@ -1,3 +1,4 @@
1# -*- coding: utf-8 -*-
1##############################################################################2##############################################################################
2#3#
3# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
@@ -8,30 +9,25 @@
8#9#
9# All Rights Reserved10# All Rights Reserved
10#11#
11# WARNING: This program as such is intended to be used by professional
12# programmers who take the whole responsability of assessing all potential
13# consequences resulting from its eventual inadequacies and bugs
14# End users who are looking for a ready-to-use solution with commercial
15# garantees and support are strongly adviced to contract EduSense BV
16#
17# This program is free software: you can redistribute it and/or modify12# This program is free software: you can redistribute it and/or modify
18# it under the terms of the GNU General Public License as published by13# it under the terms of the GNU Affero General Public License as
19# the Free Software Foundation, either version 3 of the License, or14# published by the Free Software Foundation, either version 3 of the
20# (at your option) any later version.15# License, or (at your option) any later version.
21#16#
22# This program is distributed in the hope that it will be useful,17# This program is distributed in the hope that it will be useful,
23# but WITHOUT ANY WARRANTY; without even the implied warranty of18# but WITHOUT ANY WARRANTY; without even the implied warranty of
24# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25# GNU General Public License for more details.20# GNU Affero General Public License for more details.
26#21#
27# You should have received a copy of the GNU General Public License22# You should have received a copy of the GNU Affero General Public License
28# along with this program. If not, see <http://www.gnu.org/licenses/>.23# along with this program. If not, see <http://www.gnu.org/licenses/>.
29#24#
30##############################################################################25##############################################################################
26
31{27{
32 'name': 'Account Banking',28 'name': 'Account Banking',
33 'version': '0.1.136',29 'version': '0.1.136',
34 'license': 'GPL-3',30 'license': 'AGPL-3',
35 'author': 'Banking addons community',31 'author': 'Banking addons community',
36 'website': 'https://launchpad.net/banking-addons',32 'website': 'https://launchpad.net/banking-addons',
37 'category': 'Banking addons',33 'category': 'Banking addons',
@@ -39,8 +35,7 @@
39 'account_voucher',35 'account_voucher',
40 'account_iban_preserve_domestic',36 'account_iban_preserve_domestic',
41 ],37 ],
42 'init_xml': [],38 'data': [
43 'update_xml': [
44 'security/ir.model.access.csv',39 'security/ir.model.access.csv',
45 'data/account_banking_data.xml',40 'data/account_banking_data.xml',
46 'wizard/bank_import_view.xml',41 'wizard/bank_import_view.xml',
@@ -48,7 +43,6 @@
48 'wizard/banking_transaction_wizard.xml',43 'wizard/banking_transaction_wizard.xml',
49 'workflow/account_invoice.xml',44 'workflow/account_invoice.xml',
50 ],45 ],
51 'demo_xml': [],
52 'external_dependencies': {46 'external_dependencies': {
53 'python' : ['BeautifulSoup'],47 'python' : ['BeautifulSoup'],
54 },48 },
@@ -107,6 +101,5 @@
107 + No special configuration needed for the parsers, new parsers are101 + No special configuration needed for the parsers, new parsers are
108 recognized and made available at server (re)start.102 recognized and made available at server (re)start.
109 ''',103 ''',
110 'active': False,104 'installable': True,
111 'installable': False,
112}105}
113106
=== modified file 'account_banking/account_banking.py'
--- account_banking/account_banking.py 2013-05-06 14:07:27 +0000
+++ account_banking/account_banking.py 2013-05-06 14:07:28 +0000
@@ -1,20 +1,24 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
5# (C) 2011 - 2013 Therp BV (<http://therp.nl>).
6#
7# All other contributions are (C) by their respective contributors
8#
5# All Rights Reserved9# All Rights Reserved
6#10#
7# This program is free software: you can redistribute it and/or modify11# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by12# it under the terms of the GNU Affero General Public License as
9# the Free Software Foundation, either version 3 of the License, or13# published by the Free Software Foundation, either version 3 of the
10# (at your option) any later version.14# License, or (at your option) any later version.
11#15#
12# This program is distributed in the hope that it will be useful,16# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of17# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.19# GNU Affero General Public License for more details.
16#20#
17# You should have received a copy of the GNU General Public License21# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.22# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#23#
20##############################################################################24##############################################################################
@@ -57,20 +61,20 @@
57 default behavior is to flag the orders as 'sent', not as 'done'.61 default behavior is to flag the orders as 'sent', not as 'done'.
58 Rejected payments from the bank receive on import the status 'rejected'.62 Rejected payments from the bank receive on import the status 'rejected'.
59'''63'''
60import time64
61import sepa65from openerp.osv import orm, fields
62from osv import osv, fields66from openerp.tools.translate import _
63from tools.translate import _67from openerp import netsvc, SUPERUSER_ID
64from wizard.banktools import get_or_create_bank68from openerp.addons.decimal_precision import decimal_precision as dp
65import decimal_precision as dp69from openerp.addons.account_banking import sepa
66import netsvc70from openerp.addons.account_banking.wizard.banktools import get_or_create_bank
67from openerp import SUPERUSER_ID
6871
69def warning(title, message):72def warning(title, message):
70 '''Convenience routine'''73 '''Convenience routine'''
71 return {'warning': {'title': title, 'message': message}}74 return {'warning': {'title': title, 'message': message}}
7275
73class account_banking_account_settings(osv.osv):76
77class account_banking_account_settings(orm.Model):
74 '''Default Journal for Bank Account'''78 '''Default Journal for Bank Account'''
75 _name = 'account.banking.account.settings'79 _name = 'account.banking.account.settings'
76 _description = __doc__80 _description = __doc__
@@ -122,13 +126,6 @@
122 ),126 ),
123 ),127 ),
124128
125 #'multi_currency': fields.boolean(
126 # 'Multi Currency Bank Account', required=True,
127 # help=('Select this if your bank account is able to handle '
128 # 'multiple currencies in parallel without coercing to '
129 # 'a single currency.'
130 # ),
131 #),
132 }129 }
133130
134 def _default_company(self, cr, uid, context=None):131 def _default_company(self, cr, uid, context=None):
@@ -162,7 +159,8 @@
162 if not company_id:159 if not company_id:
163 company_id = self._default_company(cr, uid, context=context)160 company_id = self._default_company(cr, uid, context=context)
164 partner_id = self.pool.get('res.company').read(161 partner_id = self.pool.get('res.company').read(
165 cr, uid, company_id, ['partner_id'], context=context)['partner_id'][0]162 cr, uid, company_id, ['partner_id'],
163 context=context)['partner_id'][0]
166 bank_ids = self.pool.get('res.partner.bank').search(164 bank_ids = self.pool.get('res.partner.bank').search(
167 cr, uid, [('partner_id', '=', partner_id)], context=context)165 cr, uid, [('partner_id', '=', partner_id)], context=context)
168 return bank_ids and bank_ids[0] or False166 return bank_ids and bank_ids[0] or False
@@ -177,7 +175,8 @@
177 'res.partner', context=localcontext)175 'res.partner', context=localcontext)
178 return account_def and account_def.id or False176 return account_def and account_def.id or False
179177
180 def _default_credit_account_id(self, cr, uid, context=None, company_id=False):178 def _default_credit_account_id(
179 self, cr, uid, context=None, company_id=False):
181 localcontext = context and context.copy() or {}180 localcontext = context and context.copy() or {}
182 localcontext['force_company'] = (181 localcontext['force_company'] = (
183 company_id or self._default_company(cr, uid, context=context))182 company_id or self._default_company(cr, uid, context=context))
@@ -187,9 +186,9 @@
187 return account_def and account_def.id or False186 return account_def and account_def.id or False
188187
189 def find(self, cr, uid, journal_id, partner_bank_id=False, context=None):188 def find(self, cr, uid, journal_id, partner_bank_id=False, context=None):
190 domain = [('journal_id','=',journal_id)]189 domain = [('journal_id', '=', journal_id)]
191 if partner_bank_id:190 if partner_bank_id:
192 domain.append(('partner_bank_id','=',partner_bank_id))191 domain.append(('partner_bank_id', '=', partner_bank_id))
193 return self.search(cr, uid, domain, context=context)192 return self.search(cr, uid, domain, context=context)
194193
195 def onchange_partner_bank_id(194 def onchange_partner_bank_id(
@@ -225,11 +224,11 @@
225 'default_debit_account_id': _default_debit_account_id,224 'default_debit_account_id': _default_debit_account_id,
226 'default_credit_account_id': _default_credit_account_id,225 'default_credit_account_id': _default_credit_account_id,
227 'partner_bank_id': _default_partner_bank_id,226 'partner_bank_id': _default_partner_bank_id,
228 #'multi_currency': lambda *a: False,
229 }227 }
230account_banking_account_settings()228account_banking_account_settings()
231229
232class account_banking_imported_file(osv.osv):230
231class account_banking_imported_file(orm.Model):
233 '''Imported Bank Statements File'''232 '''Imported Bank Statements File'''
234 _name = 'account.banking.imported.file'233 _name = 'account.banking.imported.file'
235 _description = __doc__234 _description = __doc__
@@ -267,12 +266,13 @@
267 ),266 ),
268 }267 }
269 _defaults = {268 _defaults = {
270 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),269 'date': fields.date.context_today,
271 'user_id': lambda self, cursor, uid, context: uid,270 'user_id': lambda self, cursor, uid, context: uid,
272 }271 }
273account_banking_imported_file()272account_banking_imported_file()
274273
275class account_bank_statement(osv.osv):274
275class account_bank_statement(orm.Model):
276 '''276 '''
277 Extensions from account_bank_statement:277 Extensions from account_bank_statement:
278 1. Removed period_id (transformed to optional boolean) - as it is no278 1. Removed period_id (transformed to optional boolean) - as it is no
@@ -285,45 +285,6 @@
285 '''285 '''
286 _inherit = 'account.bank.statement'286 _inherit = 'account.bank.statement'
287 _order = 'id'287 _order = 'id'
288 _abf_others = []
289 _abf_others_loaded = False
290
291 def __init__(self, *args, **kwargs):
292 '''
293 See where we stand in the order of things
294 '''
295 super(account_bank_statement, self).__init__(*args, **kwargs)
296 if not self._abf_others_loaded:
297 self._abf_others_loaded = True
298 self._abf_others = [x for x in self.__class__.__mro__
299 if x.__module__.split('.')[0] not in [
300 'osv', 'account', 'account_banking',
301 '__builtin__'
302 ]
303 ]
304
305 #def _currency(self, cursor, user, ids, name, args, context=None):
306 # '''
307 # Calculate currency from contained transactions
308 # '''
309 # res = {}
310 # res_currency_obj = self.pool.get('res.currency')
311 # res_users_obj = self.pool.get('res.users')
312 # default_currency = res_users_obj.browse(cursor, user,
313 # user, context=context).company_id.currency_id
314 # for statement in self.browse(cursor, user, ids, context=context):
315 # currency = statement.journal_id.currency
316 # if not currency:
317 # currency = default_currency
318 # res[statement.id] = currency.id
319 # currency_names = {}
320 # for currency_id, currency_name in res_currency_obj.name_get(cursor,
321 # user, res.values(), context=context):
322 # currency_names[currency_id] = currency_name
323 # for statement_id in res.keys():
324 # currency_id = res[statement_id]
325 # res[statement_id] = (currency_id, currency_names[currency_id])
326 # return res
327288
328 _columns = {289 _columns = {
329 'period_id': fields.many2one('account.period', 'Period',290 'period_id': fields.many2one('account.period', 'Period',
@@ -331,13 +292,10 @@
331 'banking_id': fields.many2one('account.banking.imported.file',292 'banking_id': fields.many2one('account.banking.imported.file',
332 'Imported File', readonly=True,293 'Imported File', readonly=True,
333 ),294 ),
334 # 'currency': fields.function(_currency, method=True, string='Currency',
335 # type='many2one', relation='res.currency'),
336 }295 }
337296
338 _defaults = {297 _defaults = {
339 'period_id': lambda *a: False,298 'period_id': False,
340 # 'currency': _currency,
341 }299 }
342300
343 def _check_company_id(self, cr, uid, ids, context=None):301 def _check_company_id(self, cr, uid, ids, context=None):
@@ -346,19 +304,21 @@
346 move of period_id to the statement line304 move of period_id to the statement line
347 """305 """
348 for statement in self.browse(cr, uid, ids, context=context):306 for statement in self.browse(cr, uid, ids, context=context):
349 if (statement.period_id and
350 statement.company_id.id != statement.period_id.company_id.id):
351 return False
352 for line in statement.line_ids:307 for line in statement.line_ids:
353 if (line.period_id and308 if (line.period_id and
354 statement.company_id.id != line.period_id.company_id.id):309 statement.company_id.id != line.period_id.company_id.id):
355 return False310 return False
356 return True311 if not statement.period_id:
312 statement.write({'period_id': line.period_id.id})
313 return super(account_bank_statement, self)._check_company_id(
314 cr, uid, ids, context=context)
357 315
358 # Redefine the constraint, or it still refer to the original method316 # Redefine the constraint, or it still refer to the original method
359 _constraints = [317 _constraints = [
360 (_check_company_id, 'The journal and period chosen have to belong to the same company.', ['journal_id','period_id']),318 (_check_company_id,
361 ]319 'The journal and period chosen have to belong to the same company.',
320 ['journal_id','period_id']),
321 ]
362322
363 def _get_period(self, cursor, uid, date, context=None):323 def _get_period(self, cursor, uid, date, context=None):
364 '''324 '''
@@ -368,231 +328,141 @@
368 periods = period_obj.find(cursor, uid, dt=date, context=context)328 periods = period_obj.find(cursor, uid, dt=date, context=context)
369 return periods and periods[0] or False329 return periods and periods[0] or False
370330
371 #def compute(self, cursor, uid, ids, context=None):331 def _prepare_move(
372 # '''332 self, cr, uid, st_line, st_line_number, context=None):
373 # Compute start and end balance with mixed currencies.333 """
374 # '''334 Add the statement line's period to the move, overwriting
375 # return None335 the period on the statement
336 """
337 res = super(account_bank_statement, self)._prepare_move(
338 cr, uid, st_line, st_line_number, context=context)
339 if context and context.get('period_id'):
340 res['period_id'] = context['period_id']
341 return res
342
343 def _prepare_move_line_vals(
344 self, cr, uid, st_line, move_id, debit, credit, currency_id=False,
345 amount_currency=False, account_id=False, analytic_id=False,
346 partner_id=False, context=None):
347 """
348 Add the statement line's period to the move lines, overwriting
349 the period on the statement
350 """
351 res = super(account_bank_statement, self)._prepare_move_line_vals(
352 cr, uid, st_line, move_id, debit, credit, currency_id=currency_id,
353 amount_currency=amount_currency, account_id=account_id,
354 analytic_id=analytic_id, partner_id=partner_id, context=context)
355 if context and context.get('period_id'):
356 res['period_id'] = context['period_id']
357 return res
376358
377 def create_move_from_st_line(self, cr, uid, st_line_id,359 def create_move_from_st_line(self, cr, uid, st_line_id,
378 company_currency_id, st_line_number,360 company_currency_id, st_line_number,
379 context=None):361 context=None):
380 # This is largely a copy of the original code in account
381 # Modifications are marked with AB
382 # Modifications by account_voucher are merged below.
383 # As there is no valid inheritance mechanism for large actions, this
384 # is the only option to add functionality to existing actions.
385 # WARNING: when the original code changes, this trigger has to be
386 # updated in sync.
387
388 if context is None:362 if context is None:
389 context = {}363 context = {}
390 res_currency_obj = self.pool.get('res.currency')
391 account_move_obj = self.pool.get('account.move')364 account_move_obj = self.pool.get('account.move')
392 account_move_line_obj = self.pool.get('account.move.line')365 account_move_line_obj = self.pool.get('account.move.line')
393 account_bank_statement_line_obj = self.pool.get(366 account_bank_statement_line_obj = self.pool.get(
394 'account.bank.statement.line')367 'account.bank.statement.line')
395 st_line = account_bank_statement_line_obj.browse(368 st_line = account_bank_statement_line_obj.browse(
396 cr, uid, st_line_id, context=context)369 cr, uid, st_line_id, context=context)
370
371 # Take period from statement line and write to context
372 # this will be picked up by the _prepare_move* methods
397 period_id = self._get_period(373 period_id = self._get_period(
398 cr, uid, st_line.date, context=context) # AB374 cr, uid, st_line.date, context=context)
399 # Start account voucher375 localctx = context.copy()
400 # Post the voucher and update links between statement and moves376 localctx['period_id'] = period_id
377
378 # Write date & period on the voucher, delegate to account_voucher's
379 # override of this method. Then post the related move and return.
401 if st_line.voucher_id:380 if st_line.voucher_id:
402 voucher_pool = self.pool.get('account.voucher')381 voucher_pool = self.pool.get('account.voucher')
403 wf_service = netsvc.LocalService("workflow")
404 voucher_pool.write(382 voucher_pool.write(
405 cr, uid, [st_line.voucher_id.id], {383 cr, uid, [st_line.voucher_id.id], {
406 'number': st_line_number,
407 'date': st_line.date,384 'date': st_line.date,
408 'period_id': period_id, # AB385 'period_id': period_id,
409 }, context=context)386 }, context=context)
410 if st_line.voucher_id.state == 'cancel':387
411 voucher_pool.action_cancel_draft(388 res = super(account_bank_statement, self).create_move_from_st_line(
412 cr, uid, [st_line.voucher_id.id], context=context)389 cr, uid, st_line_id, company_currency_id, st_line_number,
413 wf_service.trg_validate(390 context=localctx)
414 uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)391
415 v = voucher_pool.browse(392 st_line.refresh()
416 cr, uid, st_line.voucher_id.id, context=context)393 if st_line.voucher_id:
417 account_bank_statement_line_obj.write(cr, uid, [st_line_id], {
418 'move_ids': [(4, v.move_id.id, False)]
419 })
420 account_move_line_obj.write(
421 cr, uid, [x.id for x in v.move_ids],
422 {'statement_id': st_line.statement_id.id}, context=context)
423 # End of account_voucher
424 st_line.refresh()
425
426 # AB: The voucher journal isn't automatically posted, so post it (if needed)
427 if not st_line.voucher_id.journal_id.entry_posted:394 if not st_line.voucher_id.journal_id.entry_posted:
428 account_move_obj.post(cr, uid, [st_line.voucher_id.move_id.id], context={})395 account_move_obj.post(
429 return True396 cr, uid, [st_line.voucher_id.move_id.id], context={})
430
431 st = st_line.statement_id
432
433 context.update({'date': st_line.date})
434 ctxt = context.copy() # AB
435 ctxt['company_id'] = st_line.company_id.id # AB
436
437 move_id = account_move_obj.create(cr, uid, {
438 'journal_id': st.journal_id.id,
439 'period_id': period_id, # AB
440 'date': st_line.date,
441 'name': st_line_number,
442 }, context=context)
443 account_bank_statement_line_obj.write(cr, uid, [st_line.id], {
444 'move_ids': [(4, move_id, False)]
445 })
446
447 torec = []
448 if st_line.amount >= 0:
449 account_id = st.journal_id.default_credit_account_id.id
450 else:397 else:
451 account_id = st.journal_id.default_debit_account_id.id398 # Write stored reconcile_id and pay invoices through workflow
452399 if st_line.reconcile_id:
453 acc_cur = ((st_line.amount <= 0 and400 move_ids = [move.id for move in st_line.move_ids]
454 st.journal_id.default_debit_account_id) or401 torec = account_move_obj.search(
455 st_line.account_id)402 cr, uid, [
456 context.update({403 ('move_id', 'in', move_ids),
457 'res.currency.compute.account': acc_cur,404 ('account_id', '=', st_line.account_id.id)],
458 })405 context=context)
459 amount = res_currency_obj.compute(cr, uid, st.currency.id,406 account_move_line_obj.write(cr, uid, torec, {
460 company_currency_id, st_line.amount, context=context)407 (st_line.reconcile_id.line_partial_ids and
461408 'reconcile_partial_id' or 'reconcile_id'):
462 val = {409 st_line.reconcile_id.id }, context=context)
463 'name': st_line.name,410 for move_line in (st_line.reconcile_id.line_id or []) + (
464 'date': st_line.date,411 st_line.reconcile_id.line_partial_ids or []):
465 'ref': st_line.ref,412 netsvc.LocalService("workflow").trg_trigger(
466 'move_id': move_id,413 uid, 'account.move.line', move_line.id, cr)
467 'partner_id': (((st_line.partner_id) and st_line.partner_id.id) or414 return res
468 False),
469 'account_id': (st_line.account_id) and st_line.account_id.id,
470 'credit': ((amount>0) and amount) or 0.0,
471 'debit': ((amount<0) and -amount) or 0.0,
472 'statement_id': st.id,
473 'journal_id': st.journal_id.id,
474 'period_id': period_id, # AB
475 'currency_id': st.currency.id,
476 'analytic_account_id': (st_line.analytic_account_id and
477 st_line.analytic_account_id.id or
478 False),
479 }
480
481 if st.currency.id <> company_currency_id:
482 amount_cur = res_currency_obj.compute(cr, uid, company_currency_id,
483 st.currency.id, amount, context=context)
484 val['amount_currency'] = -amount_cur
485
486 if (st_line.account_id and st_line.account_id.currency_id and
487 st_line.account_id.currency_id.id <> company_currency_id):
488 val['currency_id'] = st_line.account_id.currency_id.id
489 amount_cur = res_currency_obj.compute(cr, uid, company_currency_id,
490 st_line.account_id.currency_id.id, amount, context=context)
491 val['amount_currency'] = -amount_cur
492
493 move_line_id = account_move_line_obj.create(
494 cr, uid, val, context=context)
495 torec.append(move_line_id)
496
497 # Fill the secondary amount/currency
498 # if currency is not the same than the company
499 amount_currency = False
500 currency_id = False
501 if st.currency.id <> company_currency_id:
502 amount_currency = st_line.amount
503 currency_id = st.currency.id
504 account_move_line_obj.create(cr, uid, {
505 'name': st_line.name,
506 'date': st_line.date,
507 'ref': st_line.ref,
508 'move_id': move_id,
509 'partner_id': (((st_line.partner_id) and st_line.partner_id.id) or
510 False),
511 'account_id': account_id,
512 'credit': ((amount < 0) and -amount) or 0.0,
513 'debit': ((amount > 0) and amount) or 0.0,
514 'statement_id': st.id,
515 'journal_id': st.journal_id.id,
516 'period_id': period_id, # AB
517 'amount_currency': amount_currency,
518 'currency_id': currency_id,
519 }, context=context)
520
521 for line in account_move_line_obj.browse(cr, uid, [x.id for x in
522 account_move_obj.browse(cr, uid, move_id,
523 context=context).line_id],
524 context=context):
525 if line.state <> 'valid':
526 raise osv.except_osv(_('Error !'),
527 _('Journal Item "%s" is not valid') % line.name)
528
529 # Bank statements will not consider boolean on journal entry_posted
530 account_move_obj.post(cr, uid, [move_id], context=context)
531
532 """
533 Account-banking:
534 - Write stored reconcile_id
535 - Pay invoices through workflow
536
537 Does not apply to voucher integration, but only to
538 payments and payment orders
539 """
540 if st_line.reconcile_id:
541 account_move_line_obj.write(cr, uid, torec, {
542 (st_line.reconcile_id.line_partial_ids and
543 'reconcile_partial_id' or 'reconcile_id'):
544 st_line.reconcile_id.id }, context=context)
545 for move_line in (st_line.reconcile_id.line_id or []) + (
546 st_line.reconcile_id.line_partial_ids or []):
547 netsvc.LocalService("workflow").trg_trigger(
548 uid, 'account.move.line', move_line.id, cr)
549 #""" End account-banking """
550
551 return move_id
552415
553 def button_confirm_bank(self, cr, uid, ids, context=None):416 def button_confirm_bank(self, cr, uid, ids, context=None):
554 if context is None: context = {}417 """
418 Assign journal sequence to statements without a name
419 """
420 if context is None:
421 context = {}
555 obj_seq = self.pool.get('ir.sequence')422 obj_seq = self.pool.get('ir.sequence')
556 if not isinstance(ids, list): ids = [ids]423 if ids and isinstance(ids, (int, long)):
557 noname_ids = self.search(cr, uid, [('id','in',ids),('name','=','/')])424 ids = [ids]
425 noname_ids = self.search(
426 cr, uid, [('id', 'in', ids),('name', '=', '/')],
427 context=context)
558 for st in self.browse(cr, uid, noname_ids, context=context):428 for st in self.browse(cr, uid, noname_ids, context=context):
559 if st.journal_id.sequence_id:429 if st.journal_id.sequence_id:
560 year = self.pool.get('account.period').browse(cr, uid, self._get_period(cr, uid, st.date)).fiscalyear_id.id430 period_id = self._get_period(cr, uid, st.date)
561 c = {'fiscalyear_id': year}431 year = self.pool.get('account.period').browse(
562 st_number = obj_seq.get_id(cr, uid, st.journal_id.sequence_id.id, context=c)432 cr, uid, period_id, context=context).fiscalyear_id.id
563 self.write(cr, uid, ids, {'name': st_number})433 c = {'fiscalyear_id': year}
434 st_number = obj_seq.get_id(
435 cr, uid, st.journal_id.sequence_id.id, context=c)
436 self.write(
437 cr, uid, ids, {'name': st_number}, context=context)
564 438
565 return super(account_bank_statement, self).button_confirm_bank(cr, uid, ids, context)439 return super(account_bank_statement, self).button_confirm_bank(
440 cr, uid, ids, context)
566441
567account_bank_statement()442account_bank_statement()
568443
569class account_voucher(osv.osv):444
445class account_voucher(orm.Model):
570 _inherit = 'account.voucher'446 _inherit = 'account.voucher'
571447
572 def _get_period(self, cr, uid, context=None):448 def _get_period(self, cr, uid, context=None):
573 if context is None: context = {}449 if context is None:
450 context = {}
574 if not context.get('period_id') and context.get('move_line_ids'):451 if not context.get('period_id') and context.get('move_line_ids'):
575 res = self.pool.get('account.move.line').browse(cr, uid , context.get('move_line_ids'))[0].period_id.id452 return self.pool.get('account.move.line').browse(
576 context['period_id'] = res453 cr, uid , context.get('move_line_ids'))[0].period_id.id
577 return super(account_voucher, self)._get_period(cr, uid, context)454 return super(account_voucher, self)._get_period(cr, uid, context)
578455
579 def create(self, cr, uid, values, context=None):
580 if values.get('period_id') == False and context.get('move_line_ids'):
581 values['period_id'] = self._get_period(cr, uid, context)
582 return super(account_voucher, self).create(cr, uid, values, context)
583
584account_voucher()456account_voucher()
585457
586class account_bank_statement_line(osv.osv):458
459class account_bank_statement_line(orm.Model):
587 '''460 '''
588 Extension on basic class:461 Extension on basic class:
589 1. Extra links to account.period and res.partner.bank for tracing and462 1. Extra links to account.period and res.partner.bank for tracing and
590 matching.463 matching.
591 2. Extra 'trans' field to carry the transaction id of the bank.464 2. Extra 'trans' field to carry the transaction id of the bank.
592 3. Extra 'international' flag to indicate the missing of a remote465 3. Readonly states for most fields except when in draft.
593 account number. Some banks use seperate international banking
594 modules that do not integrate with the standard transaction files.
595 4. Readonly states for most fields except when in draft.
596 '''466 '''
597 _inherit = 'account.bank.statement.line'467 _inherit = 'account.bank.statement.line'
598 _description = 'Bank Transaction'468 _description = 'Bank Transaction'
@@ -602,26 +472,6 @@
602 periods = self.pool.get('account.period').find(cursor, user, dt=date)472 periods = self.pool.get('account.period').find(cursor, user, dt=date)
603 return periods and periods[0] or False473 return periods and periods[0] or False
604474
605 def _seems_international(self, cursor, user, context=None):
606 '''
607 Some banks have seperate international banking modules which do not
608 translate correctly into the national formats. Instead, they
609 leave key fields blank and signal this anomaly with a special
610 transfer type.
611 With the introduction of SEPA, this may worsen greatly, as SEPA
612 payments are considered to be analogous to international payments
613 by most local formats.
614 '''
615 # Quick and dirty check: if remote bank account is missing, assume
616 # international transfer
617 return not (
618 context.get('partner_bank_id') and context['partner_bank_id']
619 )
620 # Not so dirty check: check if partner_id is set. If it is, check the
621 # default/invoice addresses country. If it is the same as our
622 # company's, its local, else international.
623 # TODO: to be done
624
625 def _get_currency(self, cursor, user, context=None):475 def _get_currency(self, cursor, user, context=None):
626 '''476 '''
627 Get the default currency (required to allow other modules to function,477 Get the default currency (required to allow other modules to function,
@@ -633,30 +483,6 @@
633 return res_users_obj.browse(cursor, user, user,483 return res_users_obj.browse(cursor, user, user,
634 context=context).company_id.currency_id.id484 context=context).company_id.currency_id.id
635485
636 #def _reconcile_amount(self, cursor, user, ids, name, args, context=None):
637 # '''
638 # Redefinition from the original: don't use the statements currency, but
639 # the transactions currency.
640 # '''
641 # if not ids:
642 # return {}
643
644 # res_currency_obj = self.pool.get('res.currency')
645 # res_users_obj = self.pool.get('res.users')
646
647 # res = {}
648 # company_currency_id = res_users_obj.browse(cursor, user, user,
649 # context=context).company_id.currency_id.id
650
651 # for line in self.browse(cursor, user, ids, context=context):
652 # if line.reconcile_id:
653 # res[line.id] = res_currency_obj.compute(cursor, user,
654 # company_currency_id, line.currency.id,
655 # line.reconcile_id.total_entry, context=context)
656 # else:
657 # res[line.id] = 0.0
658 # return res
659
660 def _get_invoice_id(self, cr, uid, ids, name, args, context=None):486 def _get_invoice_id(self, cr, uid, ids, name, args, context=None):
661 res = {}487 res = {}
662 for st_line in self.browse(cr, uid, ids, context):488 for st_line in self.browse(cr, uid, ids, context):
@@ -674,7 +500,7 @@
674 return res500 return res
675501
676 _columns = {502 _columns = {
677 # Redefines503 # Redefines. Todo: refactor away to view attrs
678 'amount': fields.float('Amount', readonly=True,504 'amount': fields.float('Amount', readonly=True,
679 digits_compute=dp.get_precision('Account'),505 digits_compute=dp.get_precision('Account'),
680 states={'draft': [('readonly', False)]}),506 states={'draft': [('readonly', False)]}),
@@ -684,8 +510,6 @@
684 states={'draft': [('readonly', False)]}),510 states={'draft': [('readonly', False)]}),
685 'date': fields.date('Date', required=True, readonly=True,511 'date': fields.date('Date', required=True, readonly=True,
686 states={'draft': [('readonly', False)]}),512 states={'draft': [('readonly', False)]}),
687 #'reconcile_amount': fields.function(_reconcile_amount,
688 # string='Amount reconciled', method=True, type='float'),
689513
690 # New columns514 # New columns
691 'trans': fields.char('Bank Transaction ID', size=15, required=False,515 'trans': fields.char('Bank Transaction ID', size=15, required=False,
@@ -700,12 +524,6 @@
700 states={'confirmed': [('readonly', True)]}),524 states={'confirmed': [('readonly', True)]}),
701 'currency': fields.many2one('res.currency', 'Currency', required=True,525 'currency': fields.many2one('res.currency', 'Currency', required=True,
702 states={'confirmed': [('readonly', True)]}),526 states={'confirmed': [('readonly', True)]}),
703
704 # Not used yet, but usefull in the future.
705 'international': fields.boolean('International Transaction',
706 required=False,
707 states={'confirmed': [('readonly', True)]},
708 ),
709 'reconcile_id': fields.many2one(527 'reconcile_id': fields.many2one(
710 'account.move.reconcile', 'Reconciliation', readonly=True528 'account.move.reconcile', 'Reconciliation', readonly=True
711 ),529 ),
@@ -717,14 +535,13 @@
717535
718 _defaults = {536 _defaults = {
719 'period_id': _get_period,537 'period_id': _get_period,
720 'international': _seems_international,
721 'currency': _get_currency,538 'currency': _get_currency,
722 }539 }
723540
724account_bank_statement_line()541account_bank_statement_line()
725542
726543
727class res_partner_bank(osv.osv):544class res_partner_bank(orm.Model):
728 '''545 '''
729 This is a hack to circumvent the very limited but widely used base_iban546 This is a hack to circumvent the very limited but widely used base_iban
730 dependency. The usage of __mro__ requires inside information of547 dependency. The usage of __mro__ requires inside information of
@@ -754,15 +571,13 @@
754 self._founder.__init__(*args, **kwargs)571 self._founder.__init__(*args, **kwargs)
755 mro = self.__class__.__mro__572 mro = self.__class__.__mro__
756 for i in range(len(mro)):573 for i in range(len(mro)):
757 if mro[i].__module__.startswith('base.'):574 if mro[i].__module__.startswith('openerp.addons.base.'):
758 self._founder = mro[i]575 self._founder = mro[i]
759 break576 break
760577
761 def init(self, cr):578 def init(self, cr):
762 '''579 '''
763 Update existing iban accounts to comply to new regime580 Update existing iban accounts to comply to new regime
764 Note that usage of the ORM is not possible here, as the ORM cannot
765 search on values not provided by the client.
766 '''581 '''
767 582
768 partner_bank_obj = self.pool.get('res.partner.bank')583 partner_bank_obj = self.pool.get('res.partner.bank')
@@ -795,10 +610,11 @@
795 Create dual function IBAN account for SEPA countries610 Create dual function IBAN account for SEPA countries
796 '''611 '''
797 if vals.get('state') == 'iban':612 if vals.get('state') == 'iban':
798 iban = vals.get('acc_number',False) or vals.get('acc_number_domestic',False)613 iban = (vals.get('acc_number')
614 or vals.get('acc_number_domestic', False))
799 vals['acc_number'], vals['acc_number_domestic'] = (615 vals['acc_number'], vals['acc_number_domestic'] = (
800 self._correct_IBAN(iban))616 self._correct_IBAN(iban))
801 return self._founder.create(cursor, uid, vals, context)617 return self._founder.create(self, cursor, uid, vals, context)
802618
803 def write(self, cr, uid, ids, vals, context=None):619 def write(self, cr, uid, ids, vals, context=None):
804 '''620 '''
@@ -818,7 +634,7 @@
818 self._correct_IBAN(account['acc_number']))634 self._correct_IBAN(account['acc_number']))
819 else:635 else:
820 vals['acc_number_domestic'] = False636 vals['acc_number_domestic'] = False
821 self._founder.write(cr, uid, account['id'], vals, context)637 self._founder.write(self, cr, uid, account['id'], vals, context)
822 return True638 return True
823639
824 def search(self, cursor, uid, args, *rest, **kwargs):640 def search(self, cursor, uid, args, *rest, **kwargs):
@@ -880,10 +696,9 @@
880 # Extend search filter696 # Extend search filter
881 newargs = extended_search_expression(args)697 newargs = extended_search_expression(args)
882 698
883 # Original search (_founder)699 # Original search
884 results = self._founder.search(cursor, uid, newargs,700 results = super(res_partner_bank, self).search(
885 *rest, **kwargs701 cursor, uid, newargs, *rest, **kwargs)
886 )
887 return results702 return results
888703
889 def read(704 def read(
@@ -894,7 +709,7 @@
894 '''709 '''
895 if fields and 'state' not in fields:710 if fields and 'state' not in fields:
896 fields.append('state')711 fields.append('state')
897 records = self._founder.read(cr, uid, ids, fields, context, load)712 records = self._founder.read(self, cr, uid, ids, fields, context, load)
898 is_list = True713 is_list = True
899 if not isinstance(records, list):714 if not isinstance(records, list):
900 records = [records,]715 records = [records,]
@@ -954,6 +769,9 @@
954 Trigger to find IBAN. When found:769 Trigger to find IBAN. When found:
955 1. Reformat BBAN770 1. Reformat BBAN
956 2. Autocomplete bank771 2. Autocomplete bank
772
773 TODO: prevent unnecessary assignment of country_ids and
774 browsing of the country
957 '''775 '''
958 if not acc_number:776 if not acc_number:
959 return {}777 return {}
@@ -1013,6 +831,7 @@
1013 if country_ids:831 if country_ids:
1014 country = country_obj.browse(832 country = country_obj.browse(
1015 cursor, uid, country_ids[0], context=context)833 cursor, uid, country_ids[0], context=context)
834 values['country_id'] = country_ids[0]
1016 if country and country.code in sepa.IBAN.countries:835 if country and country.code in sepa.IBAN.countries:
1017 try:836 try:
1018 info = sepa.online.account_info(country.code, acc_number)837 info = sepa.online.account_info(country.code, acc_number)
@@ -1027,9 +846,8 @@
1027 info.bic or iban_acc.BIC_searchkey,846 info.bic or iban_acc.BIC_searchkey,
1028 name = info.bank847 name = info.bank
1029 )848 )
1030 values['country_id'] = country_id or \849 if country_id:
1031 country_ids and country_ids[0] or \850 values['country_id'] = country_id
1032 False
1033 values['bank'] = bank_id or False851 values['bank'] = bank_id or False
1034 if info.bic:852 if info.bic:
1035 values['bank_bic'] = info.bic853 values['bank_bic'] = info.bic
@@ -1038,8 +856,8 @@
1038 if info is None:856 if info is None:
1039 result.update(warning(857 result.update(warning(
1040 _('Invalid data'),858 _('Invalid data'),
1041 _('The account number appears to be invalid for %(country)s')859 _('The account number appears to be invalid for %s')
1042 % {'country': country.name}860 % country.name
1043 ))861 ))
1044 except NotImplementedError:862 except NotImplementedError:
1045 if country.code in sepa.IBAN.countries:863 if country.code in sepa.IBAN.countries:
@@ -1049,8 +867,8 @@
1049 else:867 else:
1050 result.update(warning(868 result.update(warning(
1051 _('Invalid format'),869 _('Invalid format'),
1052 _('The account number has the wrong format for %(country)s')870 _('The account number has the wrong format for %s')
1053 % {'country': country.name}871 % country.name
1054 ))872 ))
1055 return result873 return result
1056874
@@ -1083,15 +901,10 @@
1083 _("The IBAN number doesn't seem to be correct")901 _("The IBAN number doesn't seem to be correct")
1084 )902 )
1085903
1086 _constraints = [
1087 # Cannot have this as a constraint as it is rejecting valid numbers from GB and DE
1088 # It works much better without this constraint!
1089 #(check_iban, _("The IBAN number doesn't seem to be correct"), ["acc_number"])
1090 ]
1091
1092res_partner_bank()904res_partner_bank()
1093905
1094class res_bank(osv.osv):906
907class res_bank(orm.Model):
1095 '''908 '''
1096 Add a on_change trigger to automagically fill bank details from the 909 Add a on_change trigger to automagically fill bank details from the
1097 online SWIFT database. Allow hand filled names to overrule SWIFT names.910 online SWIFT database. Allow hand filled names to overrule SWIFT names.
@@ -1134,7 +947,8 @@
1134947
1135res_bank()948res_bank()
1136949
1137class invoice(osv.osv):950
951class invoice(orm.Model):
1138 '''952 '''
1139 Create other reference types as well.953 Create other reference types as well.
1140954
@@ -1147,6 +961,9 @@
1147961
1148 Don't forget to redefine the column "reference_type" as below or962 Don't forget to redefine the column "reference_type" as below or
1149 your method will never be triggered.963 your method will never be triggered.
964
965 TODO: move 'structured' part to account_banking_payment module
966 where it belongs
1150 '''967 '''
1151 _inherit = 'account.invoice'968 _inherit = 'account.invoice'
1152969
@@ -1176,13 +993,16 @@
1176993
1177invoice()994invoice()
1178995
1179class account_move_line(osv.osv):996
997class account_move_line(orm.Model):
1180 _inherit = "account.move.line"998 _inherit = "account.move.line"
1181999
1182 def get_balance(self, cr, uid, ids, context=None):1000 def get_balance(self, cr, uid, ids, context=None):
1183 """ 1001 """
1184 Return the balance of any set of move lines.1002 Return the balance of any set of move lines.
1185 Surely this exists somewhere in account base, but I missed it.1003
1004 Not to be confused with the 'balance' field on this model, which
1005 returns the account balance that the move line applies to.
1186 """1006 """
1187 total = 0.01007 total = 0.0
1188 if not ids:1008 if not ids:
11891009
=== modified file 'account_banking/account_banking_view.xml'
--- account_banking/account_banking_view.xml 2013-05-06 14:07:27 +0000
+++ account_banking/account_banking_view.xml 2013-05-06 14:07:28 +0000
@@ -134,16 +134,7 @@
134 </tree>134 </tree>
135 </field>135 </field>
136 </record>136 </record>
137 <record id="view_account_banking_imported_line_search" model="ir.ui.view">137
138 <field name="name">account.banking.imported.line.search</field>
139 <field name="model">account.bank.imported.line</field>
140 <field name="type">search</field>
141 <field name="arch" type="xml">
142 <search string="Search Bank Statement files">
143 <field name="company_id" />
144 </search>
145 </field>
146 </record>
147 <record model="ir.actions.act_window" id="action_account_banking_imported_files">138 <record model="ir.actions.act_window" id="action_account_banking_imported_files">
148 <field name="name">Imported Bank Statements Files</field>139 <field name="name">Imported Bank Statements Files</field>
149 <field name="type">ir.actions.act_window</field>140 <field name="type">ir.actions.act_window</field>
@@ -193,7 +184,12 @@
193 <field name="model">account.bank.statement</field>184 <field name="model">account.bank.statement</field>
194 <field name="type">tree</field>185 <field name="type">tree</field>
195 <field name="arch" type="xml">186 <field name="arch" type="xml">
196 <field name="period_id" position="replace"/>187 <!-- Remove period from bank statement -->
188 <field name="period_id" position="replace">
189 <!-- Add invisible column for identification of import file
190 -->
191 <field name="banking_id" invisible="True" />
192 </field>
197 </field>193 </field>
198 </record>194 </record>
199 <record id="view_banking_bank_statement_form_1" model="ir.ui.view">195 <record id="view_banking_bank_statement_form_1" model="ir.ui.view">
@@ -204,92 +200,52 @@
204 <field name="type">form</field>200 <field name="type">form</field>
205 <field name="arch" type="xml">201 <field name="arch" type="xml">
206 <data>202 <data>
203 <page string="Transactions" position="after">
204 <page string="Journal Entries" name="move_live_ids">
205 <field colspan="4" name="move_line_ids" nolabel="1"/>
206 </page>
207 </page>
207 <field name="period_id" position="replace"/>208 <field name="period_id" position="replace"/>
208 <xpath expr="/form/notebook/page[@string='Transaction']/field/tree" position="attributes">209
210 <xpath expr="//page[@string='Transactions']/field/tree"
211 position="attributes">
209 <attribute name="colors">black:state == 'confirmed';darkmagenta:match_multi == True;crimson:duplicate == True;grey:state == 'draft';</attribute>212 <attribute name="colors">black:state == 'confirmed';darkmagenta:match_multi == True;crimson:duplicate == True;grey:state == 'draft';</attribute>
210 </xpath>213 </xpath>
211 <xpath expr="/form/notebook/page[@string='Transaction']/field/tree/field[@name='name']" position="replace">214
212 <field name="name" required="1"/>215 <xpath expr="//field[@name='line_ids']/tree/field[@name='name']"
213 </xpath>216 position="attributes">
214 <xpath expr="/form/notebook/page[@string='Transaction']/field/form/field[@name='name']" position="replace">217 <attribute name="required">1</attribute>
215 <field name="name" required="1"/>218 </xpath>
216 </xpath>219
217 </data>220 <xpath expr="//field[@name='line_ids']/form//field[@name='name']"
218 </field>221 position="attributes">
219 </record>222 <attribute name="required">1</attribute>
220 <record id="view_banking_bank_statement_form_2" model="ir.ui.view">223 </xpath>
221 <field name="name">account.bank.statement.form.banking-2</field>224
222 <field name="inherit_id" ref="account.view_bank_statement_form" />225 <!-- Add invisible field for identification of import file
223 <field name="model">account.bank.statement</field>226 on bank statements
224 <field name="type">form</field>227 -->
225 <field name="arch" type="xml">228 <field name="balance_end_real" position="after">
226 <xpath expr="/form/notebook/page[@string='Transaction']/field/tree/field[@name='ref']" position="after">229 <field name="banking_id" invisible="True"/>
227 <field name="period_id"/>230 </field>
228 </xpath>231
229 </field>232 <!-- Show bank accounts in account_bank_statement_line to
230 </record>233 enable manualcoupling of bank account numbers to
231 <record id="view_banking_bank_statement_form_3" model="ir.ui.view">234 statement lines and harvest info for future matching
232 <field name="name">account.bank.statement.form.banking-3</field>235 in the process.
233 <field name="inherit_id" ref="account.view_bank_statement_form" />236 -->
234 <field name="model">account.bank.statement</field>237 <xpath expr="//field[@name='line_ids']/tree/field[@name='partner_id']"
235 <field name="type">form</field>238 position="after">
236 <field name="arch" type="xml">
237 <data>
238 <xpath expr="/form/notebook/page[@string='Transaction']/field/form/field[@name='ref']" position="after">
239 <field name="period_id"/>
240 <field name="match_type"/>
241 <field name="match_multi"/>
242 <field name="duplicate"/>
243 </xpath>
244 </data>
245 </field>
246 </record>
247
248 <!-- Add invisible column on bank statements tree for identification
249 of import file
250 -->
251 <record id="view_banking_bank_statement_tree_2" model="ir.ui.view">
252 <field name="name">account.bank.statement.tree.banking-2</field>
253 <field name="inherit_id" ref="account.view_bank_statement_tree" />
254 <field name="model">account.bank.statement</field>
255 <field name="type">tree</field>
256 <field name="arch" type="xml">
257 <field name="state" position="after">
258 <field name="banking_id" invisible="True" />
259 </field>
260 </field>
261 </record>
262
263 <!-- Add invisible field for identification of import file on bank statements
264 -->
265 <record id="view_banking_bank_statement_form_4" model="ir.ui.view">
266 <field name="name">account.bank.statement.form.banking-4</field>
267 <field name="inherit_id" ref="account.view_bank_statement_form" />
268 <field name="model">account.bank.statement</field>
269 <field name="type">form</field>
270 <field name="arch" type="xml">
271 <field name="balance_end_real" position="after">
272 <field name="banking_id" invisible="True"/>
273 </field>
274 </field>
275 </record>
276
277 <!-- Show bank accounts in account_bank_statement_line to enable manual
278 coupling of bank account numbers to statement lines and harvest info
279 for future matching in the process.
280 -->
281 <record id="view_banking_bank_statement_form_5" model="ir.ui.view">
282 <field name="name">account.bank.statement.form.banking-5</field>
283 <field name="inherit_id" ref="account.view_bank_statement_form" />
284 <field name="model">account.bank.statement</field>
285 <field name="type">form</field>
286 <field name="arch" type="xml">
287 <data>
288 <xpath expr="/form/notebook/page/field[@name='line_ids']/tree/field[@name='partner_id']" position="after">
289 <!-- TODO set partner_id when partner_bank_id changes -->239 <!-- TODO set partner_id when partner_bank_id changes -->
290 <field name="partner_bank_id"/>240 <field name="partner_bank_id"/>
291 </xpath>241 </xpath>
292 <xpath expr="/form/notebook/page/field[@name='line_ids']/tree/field[@name='amount']" position="after">242 <xpath expr="//field[@name='line_ids']/form//field[@name='partner_id']"
243 position="after">
244 <field name="partner_bank_id"/>
245 </xpath>
246
247 <xpath expr="//field[@name='line_ids']/tree/field[@name='amount']"
248 position="after">
293 <field name="match_type"/>249 <field name="match_type"/>
294 <field name="residual"/>250 <field name="residual"/>
295 <button name="match_wizard" states="draft"251 <button name="match_wizard" states="draft"
@@ -310,7 +266,9 @@
310 <field name="invoice_id"/>266 <field name="invoice_id"/>
311 <field name="reconcile_id"/>267 <field name="reconcile_id"/>
312 </xpath>268 </xpath>
313 <xpath expr="/form/notebook/page/field[@name='line_ids']/form/field[@name='amount']" position="after">269
270 <xpath expr="//field[@name='line_ids']/form//field[@name='amount']"
271 position="after">
314 <field name="state"/>272 <field name="state"/>
315 <field name="invoice_id"/>273 <field name="invoice_id"/>
316 <field name="reconcile_id"/>274 <field name="reconcile_id"/>
@@ -318,30 +276,7 @@
318 </data>276 </data>
319 </field>277 </field>
320 </record>278 </record>
321 <record id="view_banking_bank_statement_form_6" model="ir.ui.view">
322 <field name="name">account.bank.statement.form.banking-6</field>
323 <field name="inherit_id" ref="account.view_bank_statement_form" />
324 <field name="model">account.bank.statement</field>
325 <field name="type">form</field>
326 <field name="arch" type="xml">
327 <xpath expr="/form/notebook/page/field[@name='line_ids']/form/field[@name='partner_id']" position="after">
328 <field name="partner_bank_id"/>
329 </xpath>
330 </field>
331 </record>
332279
333 <!-- Set trigger on IBAN and acc_number fields in res_partner_bank form -->
334 <!--record id="view_partner_bank_account_banking_form_1" model="ir.ui.view">
335 <field name="name">res.partner.bank.form.banking-1</field>
336 <field name="model">res.partner.bank</field>
337 <field name="inherit_id" ref="base_iban.view_partner_bank_iban_form"/>
338 <field name="type">form</field>
339 <field name="arch" type="xml">
340 <field name="iban" position="replace">
341 <field name="iban" on_change="onchange_iban(iban)" />
342 </field>
343 </field>
344 </record-->
345 <record id="view_partner_bank_account_banking_form_2" model="ir.ui.view">280 <record id="view_partner_bank_account_banking_form_2" model="ir.ui.view">
346 <field name="name">res.partner.bank.form.banking-2</field>281 <field name="name">res.partner.bank.form.banking-2</field>
347 <field name="model">res.partner.bank</field>282 <field name="model">res.partner.bank</field>
@@ -360,53 +295,6 @@
360 </field>295 </field>
361 </record>296 </record>
362297
363 <!-- Set trigger on IBAN and acc_number field in res_partner form -->
364 <!--record id="view_partner_account_banking_form_1" model="ir.ui.view">
365 <field name="name">res.partner.form.banking-1</field>
366 <field name="model">res.partner</field>
367 <field name="inherit_id" ref="base_iban.view_partner_iban_form"/>
368 <field name="type">form</field>
369 <field name="arch" type="xml">
370 <field name="iban" position="replace">
371 <field name="iban" on_change="onchange_iban(iban)" />
372 </field>
373 </field>
374 </record-->
375 <record id="view_partner_account_banking_form_2" model="ir.ui.view">
376 <field name="name">res.partner.form.banking-2</field>
377 <field name="model">res.partner</field>
378 <field name="inherit_id" ref="account.view_partner_property_form"/>
379 <field name="priority" eval="24"/>
380 <field name="type">form</field>
381 <field name="arch" type="xml">
382 <data>
383 <field name="acc_number" position="attributes">
384 <attribute name="on_change">onchange_acc_number(acc_number, acc_number_domestic, state, partner_id, country_id)</attribute>
385 </field>
386 <field name="acc_number_domestic" position="attributes">
387 <attribute name="on_change">onchange_domestic(acc_number_domestic, partner_id, country_id)</attribute>
388 </field>
389 </data>
390 </field>
391 </record>
392 <record id="view_partner_account_banking_form_3" model="ir.ui.view">
393 <field name="name">res.partner.form.banking-3</field>
394 <field name="model">res.partner</field>
395 <field name="inherit_id" ref="account.view_partner_property_form"/>
396 <field name="priority" eval="24"/>
397 <field name="type">form</field>
398 <field name="arch" type="xml">
399 <data>
400 <field name="acc_number" position="attributes">
401 <attribute name="on_change">onchange_acc_number(acc_number, acc_number_domestic, state, partner_id, country_id)</attribute>
402 </field>
403 <field name="acc_number_domestic" position="attributes">
404 <attribute name="on_change">onchange_domestic(acc_number_domestic, partner_id, country_id)</attribute>
405 </field>
406 </data>
407 </field>
408 </record>
409
410 <!-- Set trigger on BIC in res_bank form -->298 <!-- Set trigger on BIC in res_bank form -->
411 <record id="view_res_bank_account_banking_form_1" model="ir.ui.view">299 <record id="view_res_bank_account_banking_form_1" model="ir.ui.view">
412 <field name="name">res.bank.form.banking-1</field>300 <field name="name">res.bank.form.banking-1</field>
@@ -438,25 +326,25 @@
438 <field domain="[('journal_id','=',parent.journal_id)]" name="account_id"/>326 <field domain="[('journal_id','=',parent.journal_id)]" name="account_id"/>
439 <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>327 <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
440 <field name="amount"/>328 <field name="amount"/>
441 <field name="match_type"/>329 <field name="match_type"/>
442 <field name="residual"/>330 <field name="residual"/>
443 <button name="match_wizard" states="draft"331 <button name="match_wizard" states="draft"
444 string="Match"332 string="Match"
445 icon="terp-gtk-jump-to-ltr"333 icon="terp-gtk-jump-to-ltr"
446 type="object"/>334 type="object"/>
447 <field name="match_multi" invisible="1"/>335 <field name="match_multi" invisible="1"/>
448 <field name="duplicate" invisible="1"/>336 <field name="duplicate" invisible="1"/>
449 <field name="state"/>337 <field name="state"/>
450 <button name="confirm" states="draft"338 <button name="confirm" states="draft"
451 string="Confirm transaction"339 string="Confirm transaction"
452 icon="gtk-ok"340 icon="gtk-ok"
453 type="object"/>341 type="object"/>
454 <button name="cancel" states="confirmed"342 <button name="cancel" states="confirmed"
455 string="Cancel transaction"343 string="Cancel transaction"
456 icon="gtk-cancel"344 icon="gtk-cancel"
457 type="object"/>345 type="object"/>
458 <field name="invoice_id"/>346 <field name="invoice_id"/>
459 <field name="reconcile_id"/>347 <field name="reconcile_id"/>
460 </tree>348 </tree>
461 </field>349 </field>
462 </record>350 </record>
463351
=== modified file 'account_banking/banking_import_transaction.py'
--- account_banking/banking_import_transaction.py 2013-05-06 14:07:27 +0000
+++ account_banking/banking_import_transaction.py 2013-05-06 14:07:28 +0000
@@ -1,45 +1,42 @@
1# -*- encoding: utf-8 -*-
2##############################################################################1##############################################################################
3#2#
4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).3# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
5# Contributions by Kaspars Vilkens (KNdati):4# (C) 2011 Therp BV (<http://therp.nl>).
6# lenghty discussions, bugreports and bugfixes5# (C) 2011 Smile (<http://smile.fr>).
7# Refractoring (C) 2011 Therp BV (<http://therp.nl>).6#
8# (C) 2011 Smile (<http://smile.fr>).7# All other contributions are (C) by their respective contributors
9#8#
10# All Rights Reserved9# All Rights Reserved
11#10#
12# This program is free software: you can redistribute it and/or modify11# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by12# it under the terms of the GNU Affero General Public License as
14# the Free Software Foundation, either version 3 of the License, or13# published by the Free Software Foundation, either version 3 of the
15# (at your option) any later version.14# License, or (at your option) any later version.
16#15#
17# This program is distributed in the hope that it will be useful,16# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of17# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.19# GNU Affero General Public License for more details.
21#20#
22# You should have received a copy of the GNU General Public License21# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.22# along with this program. If not, see <http://www.gnu.org/licenses/>.
24#23#
25##############################################################################24##############################################################################
2625
27from osv import osv, fields
28import netsvc
29import base64
30import datetime26import datetime
31from tools import config27from openerp.osv import orm, fields
32from tools.translate import _28from openerp import netsvc
33from parsers import models29from openerp.tools.translate import _
34from parsers.convert import *30from openerp.addons.decimal_precision import decimal_precision as dp
35# from account_banking.struct import struct31from openerp.addons.account_banking.parsers import models
36from account_banking import sepa32from openerp.addons.account_banking.parsers import convert
37from wizard.banktools import *33from openerp.addons.account_banking import sepa
38import decimal_precision as dp34from openerp.addons.account_banking.wizard import banktools
3935
40bt = models.mem_bank_transaction36bt = models.mem_bank_transaction
4137
42class banking_import_transaction(osv.osv):38
39class banking_import_transaction(orm.Model):
43 """ orm representation of mem_bank_transaction() for interactive and posthoc40 """ orm representation of mem_bank_transaction() for interactive and posthoc
44 configuration of reconciliation in the bank statement view.41 configuration of reconciliation in the bank statement view.
4542
@@ -245,8 +242,8 @@
245 candidates = [242 candidates = [
246 x for x in move_lines243 x for x in move_lines
247 if x.partner_id.id in partner_ids and244 if x.partner_id.id in partner_ids and
248 (str2date(x.date, '%Y-%m-%d') <=245 (convert.str2date(x.date, '%Y-%m-%d') <=
249 (str2date(trans.execution_date, '%Y-%m-%d') +246 (convert.str2date(trans.execution_date, '%Y-%m-%d') +
250 self.payment_window))247 self.payment_window))
251 and (not _cached(x) or _remaining(x))248 and (not _cached(x) or _remaining(x))
252 ]249 ]
@@ -267,8 +264,8 @@
267 candidates = [264 candidates = [
268 x for x in candidates or move_lines 265 x for x in candidates or move_lines
269 if (x.invoice and has_id_match(x.invoice, ref, msg) and266 if (x.invoice and has_id_match(x.invoice, ref, msg) and
270 str2date(x.invoice.date_invoice, '%Y-%m-%d') <=267 convert.str2date(x.invoice.date_invoice, '%Y-%m-%d') <=
271 (str2date(trans.execution_date, '%Y-%m-%d') +268 (convert.str2date(trans.execution_date, '%Y-%m-%d') +
272 self.payment_window)269 self.payment_window)
273 and (not _cached(x) or _remaining(x)))270 and (not _cached(x) or _remaining(x)))
274 ]271 ]
@@ -280,8 +277,8 @@
280 x for x in move_lines 277 x for x in move_lines
281 if (is_zero(x.move_id, ((x.debit or 0.0) - (x.credit or 0.0)) -278 if (is_zero(x.move_id, ((x.debit or 0.0) - (x.credit or 0.0)) -
282 trans.transferred_amount)279 trans.transferred_amount)
283 and str2date(x.date, '%Y-%m-%d') <=280 and convert.str2date(x.date, '%Y-%m-%d') <=
284 (str2date(trans.execution_date, '%Y-%m-%d') +281 (convert.str2date(trans.execution_date, '%Y-%m-%d') +
285 self.payment_window)282 self.payment_window)
286 and (not _cached(x) or _remaining(x)))283 and (not _cached(x) or _remaining(x)))
287 ]284 ]
@@ -296,8 +293,8 @@
296 best = [x for x in candidates293 best = [x for x in candidates
297 if (is_zero(x.move_id, ((x.debit or 0.0) - (x.credit or 0.0)) -294 if (is_zero(x.move_id, ((x.debit or 0.0) - (x.credit or 0.0)) -
298 trans.transferred_amount)295 trans.transferred_amount)
299 and str2date(x.date, '%Y-%m-%d') <=296 and convert.str2date(x.date, '%Y-%m-%d') <=
300 (str2date(trans.execution_date, '%Y-%m-%d') +297 (convert.str2date(trans.execution_date, '%Y-%m-%d') +
301 self.payment_window))298 self.payment_window))
302 ]299 ]
303 if len(best) == 1:300 if len(best) == 1:
@@ -315,8 +312,8 @@
315 # transfers first312 # transfers first
316 paid = [x for x in move_lines 313 paid = [x for x in move_lines
317 if x.invoice and has_id_match(x.invoice, ref, msg)314 if x.invoice and has_id_match(x.invoice, ref, msg)
318 and str2date(x.invoice.date_invoice, '%Y-%m-%d')315 and convert.str2date(x.invoice.date_invoice, '%Y-%m-%d')
319 <= str2date(trans.execution_date, '%Y-%m-%d')316 <= convert.str2date(trans.execution_date, '%Y-%m-%d')
320 and (_cached(x) and not _remaining(x))317 and (_cached(x) and not _remaining(x))
321 ]318 ]
322 if paid:319 if paid:
@@ -406,7 +403,7 @@
406 transaction = self.browse(cr, uid, transaction_id, context)403 transaction = self.browse(cr, uid, transaction_id, context)
407 if not transaction.move_line_id:404 if not transaction.move_line_id:
408 if transaction.match_type == 'invoice':405 if transaction.match_type == 'invoice':
409 raise osv.except_osv(406 raise orm.except_orm(
410 _("Cannot link transaction %s with invoice") %407 _("Cannot link transaction %s with invoice") %
411 transaction.statement_line_id.name,408 transaction.statement_line_id.name,
412 (transaction.invoice_ids and409 (transaction.invoice_ids and
@@ -416,7 +413,7 @@
416 transaction.statement_line_id.name413 transaction.statement_line_id.name
417 )))414 )))
418 else:415 else:
419 raise osv.except_osv(416 raise orm.except_orm(
420 _("Cannot link transaction %s with accounting entry") %417 _("Cannot link transaction %s with accounting entry") %
421 transaction.statement_line_id.name,418 transaction.statement_line_id.name,
422 (transaction.move_line_ids and419 (transaction.move_line_ids and
@@ -475,7 +472,6 @@
475 'partner_id': st_line.partner_id and st_line.partner_id.id or False,472 'partner_id': st_line.partner_id and st_line.partner_id.id or False,
476 'company_id': st_line.company_id.id,473 'company_id': st_line.company_id.id,
477 'type':voucher_type,474 'type':voucher_type,
478 'company_id': st_line.company_id.id,
479 'account_id': account_id,475 'account_id': account_id,
480 'amount': abs(st_line.amount),476 'amount': abs(st_line.amount),
481 'writeoff_amount': writeoff,477 'writeoff_amount': writeoff,
@@ -552,7 +548,7 @@
552 def _legacy_clear_up_writeoff(self, cr, uid, transaction, context=None):548 def _legacy_clear_up_writeoff(self, cr, uid, transaction, context=None):
553 """549 """
554 Legacy method to support upgrades older installations of the550 Legacy method to support upgrades older installations of the
555 interactive wizard branch. To be removed after 6.2551 interactive wizard branch. To be removed after 7.0
556 clear up the writeoff move552 clear up the writeoff move
557 """553 """
558 if transaction.writeoff_move_line_id:554 if transaction.writeoff_move_line_id:
@@ -649,7 +645,7 @@
649 if not transaction.match_type:645 if not transaction.match_type:
650 continue646 continue
651 if transaction.match_type not in self.cancel_map:647 if transaction.match_type not in self.cancel_map:
652 raise osv.except_osv(648 raise orm.except_orm(
653 _("Cannot cancel type %s" % transaction.match_type),649 _("Cannot cancel type %s" % transaction.match_type),
654 _("No method found to cancel this type"))650 _("No method found to cancel this type"))
655 self.cancel_map[transaction.match_type](651 self.cancel_map[transaction.match_type](
@@ -670,7 +666,7 @@
670 if not transaction.match_type:666 if not transaction.match_type:
671 continue667 continue
672 if transaction.match_type not in self.confirm_map:668 if transaction.match_type not in self.confirm_map:
673 raise osv.except_osv(669 raise orm.except_orm(
674 _("Cannot reconcile"),670 _("Cannot reconcile"),
675 _("Cannot reconcile type %s. No method found to " +671 _("Cannot reconcile type %s. No method found to " +
676 "reconcile this type") %672 "reconcile this type") %
@@ -678,7 +674,7 @@
678 )674 )
679 if (transaction.residual and transaction.writeoff_account_id):675 if (transaction.residual and transaction.writeoff_account_id):
680 if transaction.match_type not in ('invoice', 'move', 'manual'):676 if transaction.match_type not in ('invoice', 'move', 'manual'):
681 raise osv.except_osv(677 raise orm.except_orm(
682 _("Cannot reconcile"),678 _("Cannot reconcile"),
683 _("Bank transaction %s: write off not implemented for " +679 _("Bank transaction %s: write off not implemented for " +
684 "this match type.") %680 "this match type.") %
@@ -689,12 +685,6 @@
689 self.confirm_map[transaction.match_type](685 self.confirm_map[transaction.match_type](
690 self, cr, uid, transaction.id, context)686 self, cr, uid, transaction.id, context)
691687
692 """
693 account_ids = [
694 x.id for x in bank_account_ids
695 if x.partner_id.id == move_line.partner_id.id
696 ][0]
697 """
698 return True688 return True
699 689
700 signal_duplicate_keys = [690 signal_duplicate_keys = [
@@ -727,7 +717,7 @@
727 me['transferred_amount'] - trans.transferred_amount):717 me['transferred_amount'] - trans.transferred_amount):
728 dupes.append(trans.id)718 dupes.append(trans.id)
729 if len(dupes) < 1:719 if len(dupes) < 1:
730 raise osv.except_osv(_('Cannot check for duplicate'),720 raise orm.except_orm(_('Cannot check for duplicate'),
731 _("Cannot check for duplicate. "721 _("Cannot check for duplicate. "
732 "I can't find myself."))722 "I can't find myself."))
733 if len(dupes) > 1:723 if len(dupes) > 1:
@@ -833,7 +823,6 @@
833 has_payment = bool(payment_line_obj)823 has_payment = bool(payment_line_obj)
834 statement_line_obj = self.pool.get('account.bank.statement.line')824 statement_line_obj = self.pool.get('account.bank.statement.line')
835 statement_obj = self.pool.get('account.bank.statement')825 statement_obj = self.pool.get('account.bank.statement')
836 payment_order_obj = self.pool.get('payment.order')
837 imported_statement_ids = []826 imported_statement_ids = []
838827
839 # Results828 # Results
@@ -886,7 +875,7 @@
886875
887 if (transaction.statement_line_id and876 if (transaction.statement_line_id and
888 transaction.statement_line_id.state == 'confirmed'):877 transaction.statement_line_id.state == 'confirmed'):
889 raise osv.except_osv(878 raise orm.except_orm(
890 _("Cannot perform match"),879 _("Cannot perform match"),
891 _("Cannot perform match on a confirmed transction"))880 _("Cannot perform match on a confirmed transction"))
892 881
@@ -934,7 +923,7 @@
934 account_info = info[transaction.local_account][currency_code]923 account_info = info[transaction.local_account][currency_code]
935 else:924 else:
936 # Pull account info/currency925 # Pull account info/currency
937 account_info = get_company_bank_account(926 account_info = banktools.get_company_bank_account(
938 self.pool, cr, uid, transaction.local_account,927 self.pool, cr, uid, transaction.local_account,
939 transaction.local_currency, company, results['log']928 transaction.local_currency, company, results['log']
940 )929 )
@@ -991,10 +980,9 @@
991 continue980 continue
992981
993 # Link accounting period982 # Link accounting period
994 period_id = get_period(983 period_id = banktools.get_period(
995 self.pool, cr, uid,984 self.pool, cr, uid, transaction.effective_date,
996 str2date(transaction.effective_date,'%Y-%m-%d'), company,985 company, results['log'])
997 results['log'])
998 if not period_id:986 if not period_id:
999 results['trans_skipped_cnt'] += 1987 results['trans_skipped_cnt'] += 1
1000 if not injected:988 if not injected:
@@ -1053,7 +1041,7 @@
1053 partner_banks = []1041 partner_banks = []
1054 else:1042 else:
1055 # Link remote partner, import account when needed1043 # Link remote partner, import account when needed
1056 partner_banks = get_bank_accounts(1044 partner_banks = banktools.get_bank_accounts(
1057 self.pool, cr, uid, transaction.remote_account,1045 self.pool, cr, uid, transaction.remote_account,
1058 results['log'], fail=True1046 results['log'], fail=True
1059 )1047 )
@@ -1072,14 +1060,17 @@
1072 country_code = company.partner_id.country.code1060 country_code = company.partner_id.country.code
1073 else:1061 else:
1074 country_code = None1062 country_code = None
1075 partner_id = get_or_create_partner(1063 partner_id = banktools.get_or_create_partner(
1076 self.pool, cr, uid, transaction.remote_owner,1064 self.pool, cr, uid, transaction.remote_owner,
1077 transaction.remote_owner_address,1065 transaction.remote_owner_address,
1078 transaction.remote_owner_postalcode,1066 transaction.remote_owner_postalcode,
1079 transaction.remote_owner_city,1067 transaction.remote_owner_city,
1080 country_code, results['log'], context=context)1068 country_code, results['log'],
1069 customer=transaction.transferred_amount > 0,
1070 supplier=transaction.transferred_amount < 0,
1071 context=context)
1081 if transaction.remote_account:1072 if transaction.remote_account:
1082 partner_bank_id = create_bank_account(1073 partner_bank_id = banktools.create_bank_account(
1083 self.pool, cr, uid, partner_id,1074 self.pool, cr, uid, partner_id,
1084 transaction.remote_account,1075 transaction.remote_account,
1085 transaction.remote_owner, 1076 transaction.remote_owner,
@@ -1356,7 +1347,8 @@
1356 'account.bank.statement.line', 'Statement line',1347 'account.bank.statement.line', 'Statement line',
1357 ondelete='CASCADE'),1348 ondelete='CASCADE'),
1358 'statement_id': fields.many2one(1349 'statement_id': fields.many2one(
1359 'account.bank.statement', 'Statement'),1350 'account.bank.statement', 'Statement',
1351 ondelete='CASCADE'),
1360 'parent_id': fields.many2one(1352 'parent_id': fields.many2one(
1361 'banking.import.transaction', 'Split off from this transaction'),1353 'banking.import.transaction', 'Split off from this transaction'),
1362 # match fields1354 # match fields
@@ -1394,7 +1386,7 @@
1394 "or reconcile it with the payment(s)"),1386 "or reconcile it with the payment(s)"),
1395 ),1387 ),
1396 'writeoff_amount': fields.float('Difference Amount'),1388 'writeoff_amount': fields.float('Difference Amount'),
1397 # Legacy field: to be removed after 6.21389 # Legacy field: to be removed after 7.0
1398 'writeoff_move_line_id': fields.many2one(1390 'writeoff_move_line_id': fields.many2one(
1399 'account.move.line', 'Write off move line'),1391 'account.move.line', 'Write off move line'),
1400 'writeoff_analytic_id': fields.many2one(1392 'writeoff_analytic_id': fields.many2one(
@@ -1412,7 +1404,8 @@
14121404
1413banking_import_transaction()1405banking_import_transaction()
14141406
1415class account_bank_statement_line(osv.osv):1407
1408class account_bank_statement_line(orm.Model):
1416 _inherit = 'account.bank.statement.line'1409 _inherit = 'account.bank.statement.line'
1417 _columns = {1410 _columns = {
1418 'import_transaction_id': fields.many2one(1411 'import_transaction_id': fields.many2one(
@@ -1483,21 +1476,20 @@
1483 """1476 """
1484 statement_pool = self.pool.get('account.bank.statement')1477 statement_pool = self.pool.get('account.bank.statement')
1485 obj_seq = self.pool.get('ir.sequence')1478 obj_seq = self.pool.get('ir.sequence')
1486 move_pool = self.pool.get('account.move')
1487 import_transaction_obj = self.pool.get('banking.import.transaction')1479 import_transaction_obj = self.pool.get('banking.import.transaction')
14881480
1489 for st_line in self.browse(cr, uid, ids, context):1481 for st_line in self.browse(cr, uid, ids, context):
1490 if st_line.state != 'draft':1482 if st_line.state != 'draft':
1491 continue1483 continue
1492 if st_line.duplicate:1484 if st_line.duplicate:
1493 raise osv.except_osv(1485 raise orm.except_orm(
1494 _('Bank transfer flagged as duplicate'),1486 _('Bank transfer flagged as duplicate'),
1495 _("You cannot confirm a bank transfer marked as a "1487 _("You cannot confirm a bank transfer marked as a "
1496 "duplicate (%s.%s)") % 1488 "duplicate (%s.%s)") %
1497 (st_line.statement_id.name, st_line.name,))1489 (st_line.statement_id.name, st_line.name,))
1498 if st_line.analytic_account_id:1490 if st_line.analytic_account_id:
1499 if not st_line.statement_id.journal_id.analytic_journal_id:1491 if not st_line.statement_id.journal_id.analytic_journal_id:
1500 raise osv.except_osv(1492 raise orm.except_orm(
1501 _('No Analytic Journal !'),1493 _('No Analytic Journal !'),
1502 _("You have to define an analytic journal on the '%s' "1494 _("You have to define an analytic journal on the '%s' "
1503 "journal!") % (st_line.statement_id.journal_id.name,))1495 "journal!") % (st_line.statement_id.journal_id.name,))
@@ -1541,7 +1533,6 @@
1541 ids = [ids]1533 ids = [ids]
1542 import_transaction_obj = self.pool.get('banking.import.transaction')1534 import_transaction_obj = self.pool.get('banking.import.transaction')
1543 move_pool = self.pool.get('account.move')1535 move_pool = self.pool.get('account.move')
1544 transaction_cancel_ids = []
1545 set_draft_ids = []1536 set_draft_ids = []
1546 move_unlink_ids = []1537 move_unlink_ids = []
1547 # harvest ids for various actions1538 # harvest ids for various actions
@@ -1549,7 +1540,7 @@
1549 if st_line.state != 'confirmed':1540 if st_line.state != 'confirmed':
1550 continue1541 continue
1551 if st_line.statement_id.state != 'draft':1542 if st_line.statement_id.state != 'draft':
1552 raise osv.except_osv(1543 raise orm.except_orm(
1553 _("Cannot cancel bank transaction"),1544 _("Cannot cancel bank transaction"),
1554 _("The bank statement that this transaction belongs to has "1545 _("The bank statement that this transaction belongs to has "
1555 "already been confirmed"))1546 "already been confirmed"))
@@ -1584,10 +1575,10 @@
1584 ids = [ids]1575 ids = [ids]
1585 for line in self.browse(cr, uid, ids, context=context):1576 for line in self.browse(cr, uid, ids, context=context):
1586 if line.state == 'confirmed':1577 if line.state == 'confirmed':
1587 raise osv.except_osv(1578 raise orm.except_orm(
1588 _('Confirmed Statement Line'),1579 _('Confirmed Statement Line'),
1589 _("You cannot delete a confirmed Statement Line"1580 _("You cannot delete a confirmed Statement Line"
1590 ": '%s'" % line.name))1581 ": '%s'") % line.name)
1591 return super(account_bank_statement_line, self).unlink(1582 return super(account_bank_statement_line, self).unlink(
1592 cr, uid, ids, context=context)1583 cr, uid, ids, context=context)
15931584
@@ -1629,7 +1620,8 @@
16291620
1630account_bank_statement_line()1621account_bank_statement_line()
16311622
1632class account_bank_statement(osv.osv):1623
1624class account_bank_statement(orm.Model):
1633 _inherit = 'account.bank.statement'1625 _inherit = 'account.bank.statement'
16341626
1635 def _end_balance(self, cursor, user, ids, name, attr, context=None):1627 def _end_balance(self, cursor, user, ids, name, attr, context=None):
@@ -1665,19 +1657,21 @@
1665 self.balance_check(cr, uid, st.id, journal_type=j_type, context=context)1657 self.balance_check(cr, uid, st.id, journal_type=j_type, context=context)
1666 if (not st.journal_id.default_credit_account_id) \1658 if (not st.journal_id.default_credit_account_id) \
1667 or (not st.journal_id.default_debit_account_id):1659 or (not st.journal_id.default_debit_account_id):
1668 raise osv.except_osv(_('Configuration Error !'),1660 raise orm.except_orm(_('Configuration Error !'),
1669 _('Please verify that an account is defined in the journal.'))1661 _('Please verify that an account is defined in the journal.'))
16701662
1671 # protect against misguided manual changes1663 # protect against misguided manual changes
1672 for line in st.move_line_ids:1664 for line in st.move_line_ids:
1673 if line.state != 'valid':1665 if line.state != 'valid':
1674 raise osv.except_osv(_('Error !'),1666 raise orm.except_orm(_('Error !'),
1675 _('The account entries lines are not in valid state.'))1667 _('The account entries lines are not in valid state.'))
16761668
1677 line_obj.confirm(cr, uid, [line.id for line in st.line_ids], context)1669 line_obj.confirm(cr, uid, [line.id for line in st.line_ids], context)
1678 st.refresh()1670 st.refresh()
1679 self.log(cr, uid, st.id, _('Statement %s is confirmed, journal '1671 self.message_post(
1680 'items are created.') % (st.name,))1672 cr, uid, [st.id],
1673 body=_('Statement %s confirmed, journal items were created.')
1674 % (st.name,), context=context)
1681 return self.write(cr, uid, ids, {'state':'confirm'}, context=context)1675 return self.write(cr, uid, ids, {'state':'confirm'}, context=context)
16821676
1683 def button_cancel(self, cr, uid, ids, context=None):1677 def button_cancel(self, cr, uid, ids, context=None):
@@ -1696,8 +1690,12 @@
1696 for st in self.browse(cr, uid, ids, context=context):1690 for st in self.browse(cr, uid, ids, context=context):
1697 for line in st.line_ids:1691 for line in st.line_ids:
1698 if line.state == 'confirmed':1692 if line.state == 'confirmed':
1699 raise osv.except_osv(_('Confirmed Statement Lines'), _("You cannot delete a Statement with confirmed Statement Lines: '%s'" % st.name))1693 raise orm.except_orm(
1700 return super(account_bank_statement,self).unlink(cr, uid, ids, context=context)1694 _('Confirmed Statement Lines'),
1695 _("You cannot delete a Statement with confirmed "
1696 "Statement Lines: '%s'") % st.name)
1697 return super(account_bank_statement, self).unlink(
1698 cr, uid, ids, context=context)
17011699
1702 _columns = {1700 _columns = {
1703 # override this field *only* to replace the 1701 # override this field *only* to replace the
17041702
=== modified file 'account_banking/migrations/0.1.81/post-set-statement-line-state.py'
--- account_banking/migrations/0.1.81/post-set-statement-line-state.py 2011-12-27 12:00:52 +0000
+++ account_banking/migrations/0.1.81/post-set-statement-line-state.py 2013-05-06 14:07:28 +0000
@@ -4,16 +4,16 @@
4# Copyright (C) 2011 Therp BV (<http://therp.nl>)4# Copyright (C) 2011 Therp BV (<http://therp.nl>)
5#5#
6# This program is free software: you can redistribute it and/or modify6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by7# it under the terms of the GNU Affero General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.9# (at your option) any later version.
10#10#
11# This program is distributed in the hope that it will be useful,11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.14# GNU Affero General Public License for more details.
15#15#
16# You should have received a copy of the GNU General Public License16# You should have received a copy of the GNU Affero General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#18#
19##############################################################################19##############################################################################
2020
=== modified file 'account_banking/parsers/__init__.py'
--- account_banking/parsers/__init__.py 2010-01-26 20:55:24 +0000
+++ account_banking/parsers/__init__.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking/parsers/convert.py'
--- account_banking/parsers/convert.py 2011-03-09 12:26:49 +0000
+++ account_banking/parsers/convert.py 2013-05-06 14:07:28 +0000
@@ -1,20 +1,20 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking/parsers/models.py'
--- account_banking/parsers/models.py 2012-01-17 08:48:10 +0000
+++ account_banking/parsers/models.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking/record.py'
--- account_banking/record.py 2011-03-10 21:54:37 +0000
+++ account_banking/record.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking/sepa/__init__.py'
--- account_banking/sepa/__init__.py 2010-06-29 14:58:52 +0000
+++ account_banking/sepa/__init__.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking/sepa/iban.py'
--- account_banking/sepa/iban.py 2012-05-03 09:58:01 +0000
+++ account_banking/sepa/iban.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking/sepa/online.py'
--- account_banking/sepa/online.py 2012-01-12 09:50:06 +0000
+++ account_banking/sepa/online.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking/sepa/postalcode.py'
--- account_banking/sepa/postalcode.py 2012-05-03 10:28:10 +0000
+++ account_banking/sepa/postalcode.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking/sepa/urlagent.py'
--- account_banking/sepa/urlagent.py 2010-02-25 23:18:37 +0000
+++ account_banking/sepa/urlagent.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking/struct.py'
--- account_banking/struct.py 2010-02-03 23:36:03 +0000
+++ account_banking/struct.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking/wizard/__init__.py'
--- account_banking/wizard/__init__.py 2013-05-06 14:07:27 +0000
+++ account_banking/wizard/__init__.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking/wizard/bank_import.py'
--- account_banking/wizard/bank_import.py 2013-05-06 14:07:27 +0000
+++ account_banking/wizard/bank_import.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
@@ -28,19 +28,15 @@
28The parsing is done in the parser modules. Every parser module is required to28The parsing is done in the parser modules. Every parser module is required to
29use parser.models as a mean of communication with the business logic.29use parser.models as a mean of communication with the business logic.
30'''30'''
31from osv import osv, fields31from osv import orm, fields
32import time
33import netsvc
34import base6432import base64
35import datetime33import datetime
36from tools import config34from openerp.tools.translate import _
37from tools.translate import _35from openerp.addons.account_banking.parsers import models
38from account_banking.parsers import models36from openerp.addons.account_banking.parsers import convert
39from account_banking.parsers.convert import *37from openerp.addons.account_banking.struct import struct
40from account_banking.struct import struct38from openerp.addons.account_banking.wizard import banktools
41from account_banking import sepa39from openerp.addons.decimal_precision import decimal_precision as dp
42from banktools import *
43import decimal_precision as dp
4440
45bt = models.mem_bank_transaction41bt = models.mem_bank_transaction
4642
@@ -54,7 +50,8 @@
54 '''50 '''
55 return models.parser_type.get_parser_types()51 return models.parser_type.get_parser_types()
5652
57class banking_import_line(osv.osv_memory):53
54class banking_import_line(orm.TransientModel):
58 _name = 'banking.import.line'55 _name = 'banking.import.line'
59 _description = 'Bank import lines'56 _description = 'Bank import lines'
60 _columns = {57 _columns = {
@@ -95,10 +92,9 @@
95 ], 'Transaction type'),92 ], 'Transaction type'),
96 'duplicate': fields.boolean('Duplicate'),93 'duplicate': fields.boolean('Duplicate'),
97 }94 }
98banking_import_line()
99 95
10096
101class banking_import(osv.osv_memory):97class banking_import(orm.TransientModel):
102 _name = 'account.banking.bank.import'98 _name = 'account.banking.bank.import'
10399
104 def import_statements_file(self, cursor, uid, ids, context):100 def import_statements_file(self, cursor, uid, ids, context):
@@ -121,7 +117,7 @@
121 parser_code = banking_import.parser117 parser_code = banking_import.parser
122 parser = models.create_parser(parser_code)118 parser = models.create_parser(parser_code)
123 if not parser:119 if not parser:
124 raise osv.except_osv(120 raise orm.except_orm(
125 _('ERROR!'),121 _('ERROR!'),
126 _('Unable to import parser %(parser)s. Parser class not found.') %122 _('Unable to import parser %(parser)s. Parser class not found.') %
127 {'parser': parser_code}123 {'parser': parser_code}
@@ -135,7 +131,7 @@
135 statements = parser.parse(cursor, data)131 statements = parser.parse(cursor, data)
136132
137 if any([x for x in statements if not x.is_valid()]):133 if any([x for x in statements if not x.is_valid()]):
138 raise osv.except_osv(134 raise orm.except_orm(
139 _('ERROR!'),135 _('ERROR!'),
140 _('The imported statements appear to be invalid! Check your file.')136 _('The imported statements appear to be invalid! Check your file.')
141 )137 )
@@ -187,7 +183,7 @@
187183
188 else:184 else:
189 # Pull account info/currency185 # Pull account info/currency
190 account_info = get_company_bank_account(186 account_info = banktools.get_company_bank_account(
191 self.pool, cursor, uid, statement.local_account,187 self.pool, cursor, uid, statement.local_account,
192 statement.local_currency, company, results.log188 statement.local_currency, company, results.log
193 )189 )
@@ -244,7 +240,7 @@
244 # matching procedure240 # matching procedure
245 statement_ids = statement_obj.search(cursor, uid, [241 statement_ids = statement_obj.search(cursor, uid, [
246 ('name', '=', statement.id),242 ('name', '=', statement.id),
247 ('date', '=', date2str(statement.date)),243 ('date', '=', convert.date2str(statement.date)),
248 ])244 ])
249 if statement_ids:245 if statement_ids:
250 results.log.append(246 results.log.append(
@@ -255,11 +251,14 @@
255 continue251 continue
256252
257 # Get the period for the statement (as bank statement object checks this)253 # Get the period for the statement (as bank statement object checks this)
258 period_ids = period_obj.search(cursor, uid, [('company_id','=',company.id),254 period_ids = period_obj.search(
259 ('date_start','<=',statement.date),255 cursor, uid, [
260 ('date_stop','>=',statement.date),256 ('company_id', '=', company.id),
261 ('special', '=', False)])257 ('date_start', '<=', statement.date),
262258 ('date_stop', '>=', statement.date),
259 ('special', '=', False),
260 ], context=context)
261
263 if not period_ids:262 if not period_ids:
264 results.log.append(263 results.log.append(
265 _('No period found covering statement date %(date)s, '264 _('No period found covering statement date %(date)s, '
@@ -274,7 +273,7 @@
274 statement_id = statement_obj.create(cursor, uid, dict(273 statement_id = statement_obj.create(cursor, uid, dict(
275 name = statement.id,274 name = statement.id,
276 journal_id = account_info.journal_id.id,275 journal_id = account_info.journal_id.id,
277 date = date2str(statement.date),276 date = convert.date2str(statement.date),
278 balance_start = statement.start_balance,277 balance_start = statement.start_balance,
279 balance_end_real = statement.end_balance,278 balance_end_real = statement.end_balance,
280 balance_end = statement.end_balance,279 balance_end = statement.end_balance,
@@ -302,11 +301,9 @@
302 values['local_account'] = statement.local_account301 values['local_account'] = statement.local_account
303 values['local_currency'] = statement.local_currency302 values['local_currency'] = statement.local_currency
304303
305 transaction_id = import_transaction_obj.create(cursor, uid, values, context=context)304 transaction_id = import_transaction_obj.create(
306 if transaction_id:305 cursor, uid, values, context=context)
307 transaction_ids.append(transaction_id)306 transaction_ids.append(transaction_id)
308 else:
309 osv.except_osv('Failed to create an import transaction resource','')
310 307
311 results.stat_loaded_cnt += 1308 results.stat_loaded_cnt += 1
312309
@@ -422,7 +419,6 @@
422 'State', readonly=True),419 'State', readonly=True),
423 'import_id': fields.many2one(420 'import_id': fields.many2one(
424 'account.banking.imported.file', 'Import File'),421 'account.banking.imported.file', 'Import File'),
425 # osv_memory does not seem to support one2many
426 'statement_ids': fields.many2many(422 'statement_ids': fields.many2many(
427 'account.bank.statement', 'rel_wiz_statements', 'wizard_id',423 'account.bank.statement', 'rel_wiz_statements', 'wizard_id',
428 'statement_id', 'Imported Bank Statements'),424 'statement_id', 'Imported Bank Statements'),
@@ -442,7 +438,3 @@
442 cr, uid, 'bank.import.transaction', context=c),438 cr, uid, 'bank.import.transaction', context=c),
443 'parser': _default_parser_type,439 'parser': _default_parser_type,
444 }440 }
445
446banking_import()
447
448# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
449441
=== modified file 'account_banking/wizard/banking_transaction_wizard.py'
--- account_banking/wizard/banking_transaction_wizard.py 2013-05-06 14:07:27 +0000
+++ account_banking/wizard/banking_transaction_wizard.py 2013-05-06 14:07:28 +0000
@@ -2,25 +2,26 @@
2##############################################################################2##############################################################################
3#3#
4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
5# (C) 2011 Therp BV (<http://therp.nl>).5# (C) 2011 - 2013 Therp BV (<http://therp.nl>).
6# (C) 2011 Smile (<http://smile.fr>).6# (C) 2011 Smile (<http://smile.fr>).
7# All Rights Reserved7# All Rights Reserved
8#8#
9# This program is free software: you can redistribute it and/or modify9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by10# it under the terms of the GNU Affero General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.12# (at your option) any later version.
13#13#
14# This program is distributed in the hope that it will be useful,14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.17# GNU Affero General Public License for more details.
18#18#
19# You should have received a copy of the GNU General Public License19# You should have received a copy of the GNU Affero General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21#21#
22##############################################################################22##############################################################################
23from osv import osv, fields23
24from osv import orm, fields
24from openerp.tools.translate import _25from openerp.tools.translate import _
2526
26"""27"""
@@ -31,7 +32,8 @@
3132
32"""33"""
3334
34class banking_transaction_wizard(osv.osv_memory):35
36class banking_transaction_wizard(orm.TransientModel):
35 _name = 'banking.transaction.wizard'37 _name = 'banking.transaction.wizard'
36 _description = 'Match transaction'38 _description = 'Match transaction'
3739
@@ -78,7 +80,7 @@
78 cr, uid, ids[0], ['import_transaction_id'],80 cr, uid, ids[0], ['import_transaction_id'],
79 context=context)['import_transaction_id'][0] # many2one tuple81 context=context)['import_transaction_id'][0] # many2one tuple
80 import_transaction_obj.match(cr, uid, [trans_id], context=context)82 import_transaction_obj.match(cr, uid, [trans_id], context=context)
81 return True83 return self.create_act_window(cr, uid, ids, context=None)
82 84
83 def write(self, cr, uid, ids, vals, context=None):85 def write(self, cr, uid, ids, vals, context=None):
84 """86 """
@@ -162,7 +164,7 @@
162 # transaction_obj.write(164 # transaction_obj.write(
163 # cr, uid, wiz.import_transaction_id.id,165 # cr, uid, wiz.import_transaction_id.id,
164 # { 'invoice_id': False, }, context=context)166 # { 'invoice_id': False, }, context=context)
165 osv.except_osv(167 orm.except_orm(
166 _("No entry found for the selected invoice"),168 _("No entry found for the selected invoice"),
167 _("No entry found for the selected invoice. " +169 _("No entry found for the selected invoice. " +
168 "Try manual reconciliation."))170 "Try manual reconciliation."))
@@ -184,7 +186,7 @@
184 move_line_id = line.id186 move_line_id = line.id
185 break187 break
186 if not move_line_id:188 if not move_line_id:
187 osv.except_osv(189 orm.except_orm(
188 _("Cannot select for reconcilion"),190 _("Cannot select for reconcilion"),
189 _("No entry found for the selected invoice. "))191 _("No entry found for the selected invoice. "))
190 else:192 else:
@@ -222,7 +224,7 @@
222 """224 """
223 Just a button that triggers a write.225 Just a button that triggers a write.
224 """226 """
225 return True227 return self.create_act_window(cr, uid, ids, context=None)
226228
227 def disable_match(self, cr, uid, ids, context=None):229 def disable_match(self, cr, uid, ids, context=None):
228 """230 """
@@ -255,7 +257,7 @@
255 if x['import_transaction_id']]257 if x['import_transaction_id']]
256 self.pool.get('banking.import.transaction').clear_and_write(258 self.pool.get('banking.import.transaction').clear_and_write(
257 cr, uid, trans_ids, context=context)259 cr, uid, trans_ids, context=context)
258 return True260 return self.create_act_window(cr, uid, ids, context=None)
259261
260 def reverse_duplicate(self, cr, uid, ids, context=None):262 def reverse_duplicate(self, cr, uid, ids, context=None):
261 if isinstance(ids, (int, float)):263 if isinstance(ids, (int, float)):
@@ -267,7 +269,7 @@
267 transaction_obj.write(269 transaction_obj.write(
268 cr, uid, wiz['import_transaction_id'][0], 270 cr, uid, wiz['import_transaction_id'][0],
269 {'duplicate': not wiz['duplicate']}, context=context)271 {'duplicate': not wiz['duplicate']}, context=context)
270 return True272 return self.create_act_window(cr, uid, ids, context=None)
271273
272 def _get_default_match_type(self, cr, uid, context=None):274 def _get_default_match_type(self, cr, uid, context=None):
273 """275 """
274276
=== modified file 'account_banking/wizard/banktools.py'
--- account_banking/wizard/banktools.py 2013-02-07 09:38:41 +0000
+++ account_banking/wizard/banktools.py 2013-05-06 14:07:28 +0000
@@ -1,29 +1,27 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
22import datetime22from openerp.tools.translate import _
23from tools.translate import _23from openerp.addons.account_banking import sepa
24from account_banking.parsers import convert24from openerp.addons.account_banking.struct import struct
25from account_banking import sepa
26from account_banking.struct import struct
2725
28__all__ = [26__all__ = [
29 'get_period', 27 'get_period',
@@ -33,54 +31,23 @@
33 'create_bank_account',31 'create_bank_account',
34]32]
3533
36def get_period(pool, cursor, uid, date, company, log):34def get_period(pool, cr, uid, date, company, log=None):
37 '''35 '''
38 Get a suitable period for the given date range and the given company.36 Wrapper over account_period.find() to log exceptions of
39 '''37 missing periods instead of raising.
40 fiscalyear_obj = pool.get('account.fiscalyear')38 '''
41 period_obj = pool.get('account.period')39 context = {'account_period_prefer_normal': True}
42 if not date:40 if company:
43 date = convert.date2str(datetime.datetime.today())41 context['company_id'] = company.id
4442 try:
45 search_date = convert.date2str(date)43 period_ids = pool.get('account.period').find(
46 fiscalyear_ids = fiscalyear_obj.search(cursor, uid, [44 cr, uid, dt=date, context=context)
47 ('date_start','<=', search_date), ('date_stop','>=', search_date),45 except Exception, e:
48 ('state','=','draft'), ('company_id','=',company.id)46 if log is None:
49 ])47 raise
50 if not fiscalyear_ids:48 else:
51 fiscalyear_ids = fiscalyear_obj.search(cursor, uid, [49 log.append(e)
52 ('date_start','<=',search_date), ('date_stop','>=',search_date),50 return False
53 ('state','=','draft'), ('company_id','=',None)
54 ])
55 if not fiscalyear_ids:
56 log.append(
57 _('No suitable fiscal year found for date %(date)s and company %(company_name)s')
58 % dict(company_name=company.name, date=date)
59 )
60 return False
61 elif len(fiscalyear_ids) > 1:
62 log.append(
63 _('Multiple overlapping fiscal years found for date %(date)s and company %(company_name)s')
64 % dict(company_name=company.name, date=date)
65 )
66 return False
67
68 fiscalyear_id = fiscalyear_ids[0]
69 period_ids = period_obj.search(cursor, uid, [
70 ('date_start','<=',search_date), ('date_stop','>=',search_date),
71 ('fiscalyear_id','=',fiscalyear_id), ('state','=','draft'),
72 ('special', '=', False),
73 ])
74 if not period_ids:
75 log.append(_('No suitable period found for date %(date)s and company %(company_name)s')
76 % dict(company_name=company.name, date=date)
77 )
78 return False
79 if len(period_ids) != 1:
80 log.append(_('Multiple overlapping periods for date %(date)s and company %(company_name)s')
81 % dict(company_name=company.name, date=date)
82 )
83 return False
84 return period_ids[0]51 return period_ids[0]
8552
86def get_bank_accounts(pool, cursor, uid, account_number, log, fail=False):53def get_bank_accounts(pool, cursor, uid, account_number, log, fail=False):
@@ -119,7 +86,8 @@
119 return False86 return False
12087
121def get_or_create_partner(pool, cr, uid, name, address, postal_code, city,88def get_or_create_partner(pool, cr, uid, name, address, postal_code, city,
122 country_code, log, context=None):89 country_code, log, supplier=False, customer=False,
90 context=None):
123 '''91 '''
124 Get or create the partner belonging to the account holders name <name>92 Get or create the partner belonging to the account holders name <name>
12593
@@ -141,11 +109,11 @@
141 cr, uid, [('code', '=', country_code.upper())],109 cr, uid, [('code', '=', country_code.upper())],
142 context=context)110 context=context)
143 country_id = country_ids and country_ids[0] or False111 country_id = country_ids and country_ids[0] or False
144 criteria.append(('address.country_id', '=', country_id))112 criteria.append(('country_id', '=', country_id))
145 if city:113 if city:
146 criteria.append(('address.city', 'ilike', city))114 criteria.append(('city', 'ilike', city))
147 if postal_code:115 if postal_code:
148 criteria.append(('address.zip', 'ilike', postal_code))116 criteria.append(('zip', 'ilike', postal_code))
149 partner_search_ids = partner_obj.search(117 partner_search_ids = partner_obj.search(
150 cr, uid, criteria, context=context)118 cr, uid, criteria, context=context)
151 key = name.lower()119 key = name.lower()
@@ -164,16 +132,20 @@
164 user.company_id.partner_id.country.id or132 user.company_id.partner_id.country.id or
165 False133 False
166 )134 )
167 partner_id = partner_obj.create(cr, uid, dict(135 partner_id = partner_obj.create(
168 name=name, active=True,136 cr, uid, {
169 comment='Generated from Bank Statements Import',137 'name': name,
170 address=[(0,0,{138 'active': True,
139 'comment': 'Generated from Bank Statements Import',
171 'street': address and address[0] or '',140 'street': address and address[0] or '',
172 'street2': len(address) > 1 and address[1] or '',141 'street2': len(address) > 1 and address[1] or '',
173 'city': city,142 'city': city,
174 'zip': postal_code or '',143 'zip': postal_code or '',
175 'country_id': country_id,144 'country_id': country_id,
176 })]), context=context)145 'is_company': True,
146 'supplier': supplier,
147 'customer': customer,
148 }, context=context)
177 else:149 else:
178 if len(partner_ids) > 1:150 if len(partner_ids) > 1:
179 log.append(151 log.append(
180152
=== modified file 'account_banking_fi_patu/__init__.py'
--- account_banking_fi_patu/__init__.py 2010-06-30 07:11:08 +0000
+++ account_banking_fi_patu/__init__.py 2013-05-06 14:07:28 +0000
@@ -12,16 +12,16 @@
12# garantees and support are strongly adviced to contract EduSense BV12# garantees and support are strongly adviced to contract EduSense BV
13#13#
14# This program is free software: you can redistribute it and/or modify14# This program is free software: you can redistribute it and/or modify
15# it under the terms of the GNU General Public License as published by15# it under the terms of the GNU Affero General Public License as published by
16# the Free Software Foundation, either version 3 of the License, or16# the Free Software Foundation, either version 3 of the License, or
17# (at your option) any later version.17# (at your option) any later version.
18#18#
19# This program is distributed in the hope that it will be useful,19# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of20# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.22# GNU Affero General Public License for more details.
23#23#
24# You should have received a copy of the GNU General Public License24# You should have received a copy of the GNU Affero General Public License
25# along with this program. If not, see <http://www.gnu.org/licenses/>.25# along with this program. If not, see <http://www.gnu.org/licenses/>.
26#26#
27##############################################################################27##############################################################################
2828
=== renamed file 'account_banking_fi_patu/__terp__.py' => 'account_banking_fi_patu/__openerp__.py'
--- account_banking_fi_patu/__terp__.py 2011-05-05 10:29:28 +0000
+++ account_banking_fi_patu/__openerp__.py 2013-05-06 14:07:28 +0000
@@ -11,23 +11,23 @@
11# garantees and support are strongly adviced to contract EduSense BV11# garantees and support are strongly adviced to contract EduSense BV
12#12#
13# This program is free software: you can redistribute it and/or modify13# This program is free software: you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by14# it under the terms of the GNU Affero General Public License as published by
15# the Free Software Foundation, either version 3 of the License, or15# the Free Software Foundation, either version 3 of the License, or
16# (at your option) any later version.16# (at your option) any later version.
17#17#
18# This program is distributed in the hope that it will be useful,18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.21# GNU Affero General Public License for more details.
22#22#
23# You should have received a copy of the GNU General Public License23# You should have received a copy of the GNU Affero General Public License
24# along with this program. If not, see <http://www.gnu.org/licenses/>.24# along with this program. If not, see <http://www.gnu.org/licenses/>.
25#25#
26##############################################################################26##############################################################################
27{27{
28 'name': 'Account Banking PATU module',28 'name': 'Account Banking PATU module',
29 'version': '0.62',29 'version': '0.62',
30 'license': 'GPL-3',30 'license': 'AGPL-3',
31 'author': 'Sami Haahtinen',31 'author': 'Sami Haahtinen',
32 'website': 'http://ressukka.net',32 'website': 'http://ressukka.net',
33 'category': 'Account Banking',33 'category': 'Account Banking',
3434
=== modified file 'account_banking_fi_patu/patu.py'
--- account_banking_fi_patu/patu.py 2012-01-17 08:48:10 +0000
+++ account_banking_fi_patu/patu.py 2013-05-06 14:07:28 +0000
@@ -6,16 +6,16 @@
6# All Rights Reserved6# All Rights Reserved
7#7#
8# This program is free software: you can redistribute it and/or modify8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by9# it under the terms of the GNU Affero General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.11# (at your option) any later version.
12#12#
13# This program is distributed in the hope that it will be useful,13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.16# GNU Affero General Public License for more details.
17#17#
18# You should have received a copy of the GNU General Public License18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#20#
21##############################################################################21##############################################################################
2222
=== modified file 'account_banking_nl_abnamro/__init__.py'
--- account_banking_nl_abnamro/__init__.py 2011-04-26 21:00:12 +0000
+++ account_banking_nl_abnamro/__init__.py 2013-05-06 14:07:28 +0000
@@ -1,31 +1,2 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>)
5# and Therp BV (<http://therp.nl>)
6# All Rights Reserved
7#
8# WARNING: This program as such is intended to be used by professional
9# programmers who take the whole responsability of assessing all potential
10# consequences resulting from its eventual inadequacies and bugs
11# End users who are looking for a ready-to-use solution with commercial
12# garantees and support are strongly adviced to contract EduSense BV
13# or Therp BV
14#
15# This program is free software: you can redistribute it and/or modify
16# it under the terms of the GNU General Public License as published by
17# the Free Software Foundation, either version 3 of the License, or
18# (at your option) any later version.
19#
20# This program is distributed in the hope that it will be useful,
21# but WITHOUT ANY WARRANTY; without even the implied warranty of
22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23# GNU General Public License for more details.
24#
25# You should have received a copy of the GNU General Public License
26# along with this program. If not, see <http://www.gnu.org/licenses/>.
27#
28##############################################################################
29import abnamro2import abnamro
30
31# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
323
=== modified file 'account_banking_nl_abnamro/__openerp__.py'
--- account_banking_nl_abnamro/__openerp__.py 2013-02-26 21:06:36 +0000
+++ account_banking_nl_abnamro/__openerp__.py 2013-05-06 14:07:28 +0000
@@ -1,43 +1,33 @@
1# -*- coding: utf-8 -*-
1##############################################################################2##############################################################################
2#3#
3# Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>)4# Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>)
4# and Therp BV (<http://therp.nl>)5# and Therp BV (<http://therp.nl>)
5# All Rights Reserved6# All Rights Reserved
6#7#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract EduSense BV
12# or Therp BV
13#
14# This program is free software: you can redistribute it and/or modify8# This program is free software: you can redistribute it and/or modify
15# it under the terms of the GNU General Public License as published by9# it under the terms of the GNU Affero General Public License as
16# the Free Software Foundation, either version 3 of the License, or10# published by the Free Software Foundation, either version 3 of the
17# (at your option) any later version.11# License, or (at your option) any later version.
18#12#
19# This program is distributed in the hope that it will be useful,13# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of14# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.16# GNU Affero General Public License for more details.
23#17#
24# You should have received a copy of the GNU General Public License18# You should have received a copy of the GNU Affero General Public License
25# along with this program. If not, see <http://www.gnu.org/licenses/>.19# along with this program. If not, see <http://www.gnu.org/licenses/>.
26#20#
27##############################################################################21##############################################################################
22
28{23{
29 'name': 'abnamro (NL) Bank Statements Import',24 'name': 'abnamro (NL) Bank Statements Import',
30 'version': '0.1',25 'version': '0.1',
31 'license': 'GPL-3',26 'license': 'AGPL-3',
32 'author': 'Therp BV / EduSense BV',27 'author': ['Therp BV', 'EduSense BV'],
33 'website': 'https://launchpad.net/account-banking',28 'website': 'https://launchpad.net/banking-addons',
34 'category': 'Account Banking',29 'category': 'Banking addons',
35 'depends': ['account_banking'],30 'depends': ['account_banking'],
36 'init_xml': [],
37 'update_xml': [
38 #'security/ir.model.access.csv',
39 ],
40 'demo_xml': [],
41 'description': '''31 'description': '''
42Import filter for abnamro (NL) bank transaction files (txt/tab format).32Import filter for abnamro (NL) bank transaction files (txt/tab format).
4333
@@ -48,6 +38,5 @@
48Imported bank transfers are organized in statements covering periods of one week,38Imported bank transfers are organized in statements covering periods of one week,
49even if the imported files cover a different period.39even if the imported files cover a different period.
50 ''',40 ''',
51 'active': False,41 'installable': True,
52 'installable': False,
53}42}
5443
=== removed file 'account_banking_nl_abnamro/__terp__.py'
--- account_banking_nl_abnamro/__terp__.py 2011-05-05 10:29:28 +0000
+++ account_banking_nl_abnamro/__terp__.py 1970-01-01 00:00:00 +0000
@@ -1,53 +0,0 @@
1##############################################################################
2#
3# Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>)
4# and Therp BV (<http://therp.nl>)
5# All Rights Reserved
6#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract EduSense BV
12# or Therp BV
13#
14# This program is free software: you can redistribute it and/or modify
15# it under the terms of the GNU General Public License as published by
16# the Free Software Foundation, either version 3 of the License, or
17# (at your option) any later version.
18#
19# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.
23#
24# You should have received a copy of the GNU General Public License
25# along with this program. If not, see <http://www.gnu.org/licenses/>.
26#
27##############################################################################
28{
29 'name': 'abnamro (NL) Bank Statements Import',
30 'version': '0.62',
31 'license': 'GPL-3',
32 'author': 'Therp BV / EduSense BV',
33 'website': 'https://launchpad.net/account-banking',
34 'category': 'Account Banking',
35 'depends': ['account_banking'],
36 'init_xml': [],
37 'update_xml': [
38 #'security/ir.model.access.csv',
39 ],
40 'demo_xml': [],
41 'description': '''
42Import filter for abnamro (NL) bank transaction files (txt/tab format).
43
44No formal specifications of the file layout are released by abnamro. You can
45help improve the performance of this import filter on
46https://launchpad.net/account-banking.
47
48Imported bank transfers are organized in statements covering periods of one week,
49even if the imported files cover a different period.
50 ''',
51 'active': False,
52 'installable': True,
53}
540
=== modified file 'account_banking_nl_abnamro/abnamro.py'
--- account_banking_nl_abnamro/abnamro.py 2013-04-17 14:24:33 +0000
+++ account_banking_nl_abnamro/abnamro.py 2013-05-06 14:07:28 +0000
@@ -1,21 +1,22 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>)4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>)
5# 2011 Therp BV (<http://therp.nl>)5# 2011 Therp BV (<http://therp.nl>)
6#
6# All Rights Reserved7# All Rights Reserved
7#8#
8# This program is free software: you can redistribute it and/or modify9# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by10# it under the terms of the GNU Affero General Public License as
10# the Free Software Foundation, either version 3 of the License, or11# published by the Free Software Foundation, either version 3 of the
11# (at your option) any later version.12# License, or (at your option) any later version.
12#13#
13# This program is distributed in the hope that it will be useful,14# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of15# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.17# GNU Affero General Public License for more details.
17#18#
18# You should have received a copy of the GNU General Public License19# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.20# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#21#
21##############################################################################22##############################################################################
@@ -28,11 +29,11 @@
28Every transaction is bound to a Bank Statement. As such, this module generates29Every transaction is bound to a Bank Statement. As such, this module generates
29Bank Statements along with Bank Transactions.30Bank Statements along with Bank Transactions.
30'''31'''
31from account_banking.parsers import models32from openerp.addons.account_banking.parsers import models
32from account_banking.parsers.convert import str2date33from openerp.addons.account_banking.parsers.convert import str2date
33from account_banking.sepa import postalcode34from openerp.addons.account_banking.sepa import postalcode
34from tools.translate import _35from openerp.tools.translate import _
35from osv import osv36from openerp.osv import orm
3637
37import re38import re
38import csv39import csv
@@ -120,7 +121,7 @@
120 self.error_message = _('No remote account for transaction type '121 self.error_message = _('No remote account for transaction type '
121 '%s') % self.transfer_type122 '%s') % self.transfer_type
122 if self.error_message:123 if self.error_message:
123 raise osv.except_osv(_('Error !'), _(self.error_message))124 raise orm.except_orm(_('Error !'), _(self.error_message))
124 return not self.error_message125 return not self.error_message
125126
126 def parse_message(self):127 def parse_message(self):
@@ -223,7 +224,7 @@
223 remote_account = account_match.group(1).zfill(10)224 remote_account = account_match.group(1).zfill(10)
224 remote_owner = account_match.group(2).strip() or ''225 remote_owner = account_match.group(2).strip() or ''
225 else:226 else:
226 raise osv.except_osv(227 raise orm.except_orm(
227 _('Error !'),228 _('Error !'),
228 _('unable to parse GIRO string: %s') % field)229 _('unable to parse GIRO string: %s') % field)
229 elif field.startswith('BEA '):230 elif field.startswith('BEA '):
230231
=== modified file 'account_banking_nl_clieop/__init__.py'
--- account_banking_nl_clieop/__init__.py 2010-01-26 20:55:24 +0000
+++ account_banking_nl_clieop/__init__.py 2013-05-06 14:07:28 +0000
@@ -11,16 +11,16 @@
11# garantees and support are strongly adviced to contract EduSense BV11# garantees and support are strongly adviced to contract EduSense BV
12#12#
13# This program is free software: you can redistribute it and/or modify13# This program is free software: you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by14# it under the terms of the GNU Affero General Public License as published by
15# the Free Software Foundation, either version 3 of the License, or15# the Free Software Foundation, either version 3 of the License, or
16# (at your option) any later version.16# (at your option) any later version.
17#17#
18# This program is distributed in the hope that it will be useful,18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.21# GNU Affero General Public License for more details.
22#22#
23# You should have received a copy of the GNU General Public License23# You should have received a copy of the GNU Affero General Public License
24# along with this program. If not, see <http://www.gnu.org/licenses/>.24# along with this program. If not, see <http://www.gnu.org/licenses/>.
25#25#
26##############################################################################26##############################################################################
2727
=== renamed file 'account_banking_nl_clieop/__terp__.py' => 'account_banking_nl_clieop/__openerp__.py'
--- account_banking_nl_clieop/__terp__.py 2013-05-06 14:07:27 +0000
+++ account_banking_nl_clieop/__openerp__.py 2013-05-06 14:07:28 +0000
@@ -3,48 +3,39 @@
3# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).3# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
4# All Rights Reserved4# All Rights Reserved
5#5#
6# WARNING: This program as such is intended to be used by professional
7# programmers who take the whole responsability of assessing all potential
8# consequences resulting from its eventual inadequacies and bugs
9# End users who are looking for a ready-to-use solution with commercial
10# garantees and support are strongly adviced to contract EduSense BV
11#
12# This program is free software: you can redistribute it and/or modify6# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by7# it under the terms of the GNU Affero General Public License as published by
14# the Free Software Foundation, either version 3 of the License, or8# the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.9# (at your option) any later version.
16#10#
17# This program is distributed in the hope that it will be useful,11# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of12# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.14# GNU Affero General Public License for more details.
21#15#
22# You should have received a copy of the GNU General Public License16# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.17# along with this program. If not, see <http://www.gnu.org/licenses/>.
24#18#
25##############################################################################19##############################################################################
26{20{
27 'name': 'Account Banking NL ClieOp',21 'name': 'Account Banking NL ClieOp',
28 'version': '0.92',22 'version': '0.92',
29 'license': 'GPL-3',23 'license': 'AGPL-3',
30 'author': 'EduSense BV',24 'author': 'EduSense BV',
31 'website': 'http://www.edusense.nl',25 'website': 'http://www.edusense.nl',
32 'category': 'Account Banking',26 'category': 'Account Banking',
33 'depends': ['account_banking_payment'],27 'depends': ['account_banking_payment'],
34 'init_xml': [],28 'data': [
35 'update_xml': [
36 'account_banking_nl_clieop.xml',29 'account_banking_nl_clieop.xml',
37 'wizard/export_clieop_view.xml',30 'wizard/export_clieop_view.xml',
38 'data/banking_export_clieop.xml',31 'data/banking_export_clieop.xml',
39 'security/ir.model.access.csv',32 'security/ir.model.access.csv',
40 ],33 ],
41 'demo_xml': [],
42 'description': '''34 'description': '''
43 Module to export payment orders in ClieOp format.35 Module to export payment orders in ClieOp format.
4436
45 ClieOp format is used by Dutch banks to batch national bank transfers.37 ClieOp format is used by Dutch banks to batch national bank transfers.
46 This module uses the account_banking logic.38 This module uses the account_banking logic.
47 ''',39 ''',
48 'active': False,40 'installable': False,
49 'installable': True,
50}41}
5142
=== modified file 'account_banking_nl_clieop/account_banking_nl_clieop.py'
--- account_banking_nl_clieop/account_banking_nl_clieop.py 2012-12-30 10:55:49 +0000
+++ account_banking_nl_clieop/account_banking_nl_clieop.py 2013-05-06 14:07:28 +0000
@@ -4,16 +4,16 @@
4# All Rights Reserved4# All Rights Reserved
5#5#
6# This program is free software: you can redistribute it and/or modify6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by7# it under the terms of the GNU Affero General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.9# (at your option) any later version.
10#10#
11# This program is distributed in the hope that it will be useful,11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.14# GNU Affero General Public License for more details.
15#15#
16# You should have received a copy of the GNU General Public License16# You should have received a copy of the GNU Affero General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#18#
19##############################################################################19##############################################################################
2020
=== modified file 'account_banking_nl_clieop/migrations/0.63/post-fill-ir_model_id.py'
--- account_banking_nl_clieop/migrations/0.63/post-fill-ir_model_id.py 2011-07-24 18:58:32 +0000
+++ account_banking_nl_clieop/migrations/0.63/post-fill-ir_model_id.py 2013-05-06 14:07:28 +0000
@@ -4,16 +4,16 @@
4# Copyright (C) 2011 Therp BV (<http://therp.nl>)4# Copyright (C) 2011 Therp BV (<http://therp.nl>)
5#5#
6# This program is free software: you can redistribute it and/or modify6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by7# it under the terms of the GNU Affero General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.9# (at your option) any later version.
10#10#
11# This program is distributed in the hope that it will be useful,11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.14# GNU Affero General Public License for more details.
15#15#
16# You should have received a copy of the GNU General Public License16# You should have received a copy of the GNU Affero General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#18#
19##############################################################################19##############################################################################
2020
=== modified file 'account_banking_nl_clieop/migrations/0.64/post-set-payment-order-type.py'
--- account_banking_nl_clieop/migrations/0.64/post-set-payment-order-type.py 2011-12-27 12:00:52 +0000
+++ account_banking_nl_clieop/migrations/0.64/post-set-payment-order-type.py 2013-05-06 14:07:28 +0000
@@ -4,16 +4,16 @@
4# Copyright (C) 2011 Therp BV (<http://therp.nl>)4# Copyright (C) 2011 Therp BV (<http://therp.nl>)
5#5#
6# This program is free software: you can redistribute it and/or modify6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by7# it under the terms of the GNU Affero General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.9# (at your option) any later version.
10#10#
11# This program is distributed in the hope that it will be useful,11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.14# GNU Affero General Public License for more details.
15#15#
16# You should have received a copy of the GNU General Public License16# You should have received a copy of the GNU Affero General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#18#
19##############################################################################19##############################################################################
2020
=== modified file 'account_banking_nl_clieop/wizard/__init__.py'
--- account_banking_nl_clieop/wizard/__init__.py 2010-01-26 20:55:24 +0000
+++ account_banking_nl_clieop/wizard/__init__.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking_nl_clieop/wizard/clieop.py'
--- account_banking_nl_clieop/wizard/clieop.py 2013-01-28 10:19:32 +0000
+++ account_banking_nl_clieop/wizard/clieop.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking_nl_clieop/wizard/export_clieop.py'
--- account_banking_nl_clieop/wizard/export_clieop.py 2013-01-02 15:14:53 +0000
+++ account_banking_nl_clieop/wizard/export_clieop.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking_nl_girotel/__init__.py'
--- account_banking_nl_girotel/__init__.py 2010-07-16 15:28:32 +0000
+++ account_banking_nl_girotel/__init__.py 2013-05-06 14:07:28 +0000
@@ -11,16 +11,16 @@
11# garantees and support are strongly adviced to contract EduSense BV11# garantees and support are strongly adviced to contract EduSense BV
12#12#
13# This program is free software: you can redistribute it and/or modify13# This program is free software: you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by14# it under the terms of the GNU Affero General Public License as published by
15# the Free Software Foundation, either version 3 of the License, or15# the Free Software Foundation, either version 3 of the License, or
16# (at your option) any later version.16# (at your option) any later version.
17#17#
18# This program is distributed in the hope that it will be useful,18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.21# GNU Affero General Public License for more details.
22#22#
23# You should have received a copy of the GNU General Public License23# You should have received a copy of the GNU Affero General Public License
24# along with this program. If not, see <http://www.gnu.org/licenses/>.24# along with this program. If not, see <http://www.gnu.org/licenses/>.
25#25#
26##############################################################################26##############################################################################
2727
=== renamed file 'account_banking_nl_girotel/__terp__.py' => 'account_banking_nl_girotel/__openerp__.py'
--- account_banking_nl_girotel/__terp__.py 2011-05-05 10:29:28 +0000
+++ account_banking_nl_girotel/__openerp__.py 2013-05-06 14:07:28 +0000
@@ -3,44 +3,35 @@
3# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).3# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
4# All Rights Reserved4# All Rights Reserved
5#5#
6# WARNING: This program as such is intended to be used by professional
7# programmers who take the whole responsability of assessing all potential
8# consequences resulting from its eventual inadequacies and bugs
9# End users who are looking for a ready-to-use solution with commercial
10# garantees and support are strongly adviced to contract EduSense BV
11#
12# This program is free software: you can redistribute it and/or modify6# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by7# it under the terms of the GNU Affero General Public License as published by
14# the Free Software Foundation, either version 3 of the License, or8# the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.9# (at your option) any later version.
16#10#
17# This program is distributed in the hope that it will be useful,11# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of12# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.14# GNU Affero General Public License for more details.
21#15#
22# You should have received a copy of the GNU General Public License16# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.17# along with this program. If not, see <http://www.gnu.org/licenses/>.
24#18#
25##############################################################################19##############################################################################
26{20{
27 'name': 'Account Banking - Girotel',21 'name': 'Account Banking - Girotel',
28 'version': '0.62',22 'version': '0.62',
29 'license': 'GPL-3',23 'license': 'AGPL-3',
30 'author': 'EduSense BV',24 'author': 'EduSense BV',
31 'website': 'http://www.edusense.nl',25 'website': 'http://www.edusense.nl',
32 'category': 'Account Banking',26 'category': 'Account Banking',
33 'depends': ['account_banking'],27 'depends': ['account_banking'],
34 'init_xml': [],28 'data': [
35 'update_xml': [
36 #'security/ir.model.access.csv',29 #'security/ir.model.access.csv',
37 ],30 ],
38 'demo_xml': [],
39 'description': '''31 'description': '''
40 Module to import Dutch Girotel format transation files.32 Module to import Dutch Girotel format transation files.
4133
42 This modules contains no logic, just an import filter for account_banking.34 This modules contains no logic, just an import filter for account_banking.
43 ''',35 ''',
44 'active': False,
45 'installable': True,36 'installable': True,
46}37}
4738
=== modified file 'account_banking_nl_girotel/girotel.py'
--- account_banking_nl_girotel/girotel.py 2012-07-09 17:04:14 +0000
+++ account_banking_nl_girotel/girotel.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking_nl_ing/__init__.py'
--- account_banking_nl_ing/__init__.py 2011-12-11 16:09:20 +0000
+++ account_banking_nl_ing/__init__.py 2013-05-06 14:07:28 +0000
@@ -1,4 +1,2 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2import ing2import ing
3
4# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
53
=== modified file 'account_banking_nl_ing/__openerp__.py'
--- account_banking_nl_ing/__openerp__.py 2013-02-26 21:06:36 +0000
+++ account_banking_nl_ing/__openerp__.py 2013-05-06 14:07:28 +0000
@@ -8,39 +8,29 @@
8# 8#
9# All Rights Reserved9# All Rights Reserved
10#10#
11# WARNING: This program as such is intended to be used by professional
12# programmers who take the whole responsability of assessing all potential
13# consequences resulting from its eventual inadequacies and bugs
14# End users who are looking for a ready-to-use solution with commercial
15# garantees and support are strongly adviced to contract EduSense BV
16# or Therp BV
17#
18# This program is free software: you can redistribute it and/or modify11# This program is free software: you can redistribute it and/or modify
19# it under the terms of the GNU General Public License as published by12# it under the terms of the GNU Affero General Public License as
20# the Free Software Foundation, either version 3 of the License, or13# published by the Free Software Foundation, either version 3 of the
21# (at your option) any later version.14# License, or (at your option) any later version.
22#15#
23# This program is distributed in the hope that it will be useful,16# This program is distributed in the hope that it will be useful,
24# but WITHOUT ANY WARRANTY; without even the implied warranty of17# but WITHOUT ANY WARRANTY; without even the implied warranty of
25# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26# GNU General Public License for more details.19# GNU Affero General Public License for more details.
27#20#
28# You should have received a copy of the GNU General Public License21# You should have received a copy of the GNU Affero General Public License
29# along with this program. If not, see <http://www.gnu.org/licenses/>.22# along with this program. If not, see <http://www.gnu.org/licenses/>.
30#23#
31##############################################################################24##############################################################################
25
32{26{
33 'name': 'ING (NL) Bank Statements Import',27 'name': 'ING (NL) Bank Statements Import',
34 'version': '0.1.140',28 'version': '0.1.140',
35 'license': 'GPL-3',29 'license': 'AGPL-3',
36 'author': ['Smile', 'Therp BV', 'EduSense BV'],30 'author': ['Smile', 'Therp BV', 'EduSense BV'],
37 'website': 'https://launchpad.net/banking-addons',31 'website': 'https://launchpad.net/banking-addons',
38 'category': 'Banking addons',32 'category': 'Banking addons',
39 'depends': ['account_banking'],33 'depends': ['account_banking'],
40 'init_xml': [],
41 'update_xml': [
42 ],
43 'demo_xml': [],
44 'description': '''34 'description': '''
45Module to import Dutch ING bank format transaction files. The format covered35Module to import Dutch ING bank format transaction files. The format covered
46is the CSV format with either 'dd-mm-yyyy' or 'yyyymmdd' date syntax.36is the CSV format with either 'dd-mm-yyyy' or 'yyyymmdd' date syntax.
@@ -57,6 +47,5 @@
5747
58This modules contains no logic, just an import filter for account_banking.48This modules contains no logic, just an import filter for account_banking.
59 ''',49 ''',
60 'active': False,50 'installable': True,
61 'installable': False,
62}51}
6352
=== removed file 'account_banking_nl_ing/__terp__.py'
--- account_banking_nl_ing/__terp__.py 2011-12-21 11:26:36 +0000
+++ account_banking_nl_ing/__terp__.py 1970-01-01 00:00:00 +0000
@@ -1,58 +0,0 @@
1##############################################################################
2#
3# Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>)
4# and Therp BV (<http://therp.nl>)
5# All Rights Reserved
6#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract EduSense BV
12# or Therp BV
13#
14# This program is free software: you can redistribute it and/or modify
15# it under the terms of the GNU General Public License as published by
16# the Free Software Foundation, either version 3 of the License, or
17# (at your option) any later version.
18#
19# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.
23#
24# You should have received a copy of the GNU General Public License
25# along with this program. If not, see <http://www.gnu.org/licenses/>.
26#
27##############################################################################
28{
29 'name': 'ING (NL) Bank Statements Import',
30 'version': '0.1.89',
31 'license': 'GPL-3',
32 'author': 'Smile / Therp BV / EduSense BV',
33 'website': 'https://launchpad.net/banking-addons',
34 'category': 'Banking addons',
35 'depends': ['account_banking'],
36 'init_xml': [],
37 'update_xml': [
38 ],
39 'demo_xml': [],
40 'description': '''
41
42Module to import Dutch ING bank format transation files (CSV format).
43
44As the ING bank does not provide detailed specification concerning possible
45values and their meaning for the fields in the CSV file format, the statements
46are parsed according to an educated guess based on incomplete information.
47You can contact the banking-addons developers through their launchpad page and
48help improve the performance of this import filter on
49https://launchpad.net/banking-addons.
50
51Note that imported bank transfers are organized in statements covering periods
52of one week, even if the imported files cover a different period.
53
54This modules contains no logic, just an import filter for account_banking.
55 ''',
56 'active': False,
57 'installable': True,
58}
590
=== modified file 'account_banking_nl_ing/ing.py'
--- account_banking_nl_ing/ing.py 2012-10-04 08:56:19 +0000
+++ account_banking_nl_ing/ing.py 2013-05-06 14:07:28 +0000
@@ -1,4 +1,4 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# Copyright (C) 2011 Smile (<http://smile.fr>).4# Copyright (C) 2011 Smile (<http://smile.fr>).
@@ -10,25 +10,25 @@
10# All Rights Reserved10# All Rights Reserved
11#11#
12# This program is free software: you can redistribute it and/or modify12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by13# it under the terms of the GNU Affero General Public License as
14# the Free Software Foundation, either version 3 of the License, or14# published by the Free Software Foundation, either version 3 of the
15# (at your option) any later version.15# License, or (at your option) any later version.
16#16#
17# This program is distributed in the hope that it will be useful,17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.20# GNU Affero General Public License for more details.
21#21#
22# You should have received a copy of the GNU General Public License22# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24#24#
25##############################################################################25##############################################################################
2626
27from datetime import datetime27from datetime import datetime
28from account_banking.parsers import models28from openerp.addons.account_banking.parsers import models
29from account_banking.parsers.convert import str2date29from openerp.addons.account_banking.parsers.convert import str2date
30from account_banking.sepa import postalcode30from openerp.addons.account_banking.sepa import postalcode
31from tools.translate import _31from openerp.tools.translate import _
3232
33import re33import re
34import csv34import csv
3535
=== modified file 'account_banking_nl_multibank/__init__.py'
--- account_banking_nl_multibank/__init__.py 2010-01-26 20:55:24 +0000
+++ account_banking_nl_multibank/__init__.py 2013-05-06 14:07:28 +0000
@@ -11,16 +11,16 @@
11# garantees and support are strongly adviced to contract EduSense BV11# garantees and support are strongly adviced to contract EduSense BV
12#12#
13# This program is free software: you can redistribute it and/or modify13# This program is free software: you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by14# it under the terms of the GNU Affero General Public License as published by
15# the Free Software Foundation, either version 3 of the License, or15# the Free Software Foundation, either version 3 of the License, or
16# (at your option) any later version.16# (at your option) any later version.
17#17#
18# This program is distributed in the hope that it will be useful,18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.21# GNU Affero General Public License for more details.
22#22#
23# You should have received a copy of the GNU General Public License23# You should have received a copy of the GNU Affero General Public License
24# along with this program. If not, see <http://www.gnu.org/licenses/>.24# along with this program. If not, see <http://www.gnu.org/licenses/>.
25#25#
26##############################################################################26##############################################################################
2727
=== renamed file 'account_banking_nl_multibank/__terp__.py' => 'account_banking_nl_multibank/__openerp__.py'
--- account_banking_nl_multibank/__terp__.py 2011-05-05 10:29:28 +0000
+++ account_banking_nl_multibank/__openerp__.py 2013-05-06 14:07:28 +0000
@@ -1,46 +1,36 @@
1# -*- coding: utf-8 -*-
1##############################################################################2##############################################################################
2#3#
3# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).4# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
4# All Rights Reserved5# All Rights Reserved
5#6#
6# WARNING: This program as such is intended to be used by professional
7# programmers who take the whole responsability of assessing all potential
8# consequences resulting from its eventual inadequacies and bugs
9# End users who are looking for a ready-to-use solution with commercial
10# garantees and support are strongly adviced to contract EduSense BV
11#
12# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as
14# the Free Software Foundation, either version 3 of the License, or9# published by the Free Software Foundation, either version 3 of the
15# (at your option) any later version.10# License, or (at your option) any later version.
16#11#
17# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.15# GNU Affero General Public License for more details.
21#16#
22# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
24#19#
25##############################################################################20##############################################################################
21
26{22{
27 'name': 'Account Banking',23 'name': 'Account Banking',
28 'version': '0.62',24 'version': '0.62',
29 'license': 'GPL-3',25 'license': 'AGPL-3',
30 'author': 'EduSense BV',26 'author': 'EduSense BV',
31 'website': 'http://www.edusense.nl',27 'website': 'http://www.edusense.nl',
32 'category': 'Account Banking',28 'category': 'Account Banking',
33 'depends': ['account_banking'],29 'depends': ['account_banking'],
34 'init_xml': [],
35 'update_xml': [
36 #'security/ir.model.access.csv',
37 ],
38 'demo_xml': [],
39 'description': '''30 'description': '''
40 Module to import Dutch Multibank format transation files.31 Module to import Dutch Multibank format transation files.
4132
42 This modules contains no logic, just an import filter for account_banking.33 This modules contains no logic, just an import filter for account_banking.
43 ''',34 ''',
44 'active': False,
45 'installable': True,35 'installable': True,
46}36}
4737
=== modified file 'account_banking_nl_multibank/multibank.py'
--- account_banking_nl_multibank/multibank.py 2012-01-17 08:48:10 +0000
+++ account_banking_nl_multibank/multibank.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking_nl_triodos/__init__.py'
--- account_banking_nl_triodos/__init__.py 2011-04-26 21:00:12 +0000
+++ account_banking_nl_triodos/__init__.py 2013-05-06 14:07:28 +0000
@@ -13,16 +13,16 @@
13# or Therp BV13# or Therp BV
14#14#
15# This program is free software: you can redistribute it and/or modify15# This program is free software: you can redistribute it and/or modify
16# it under the terms of the GNU General Public License as published by16# it under the terms of the GNU Affero General Public License as published by
17# the Free Software Foundation, either version 3 of the License, or17# the Free Software Foundation, either version 3 of the License, or
18# (at your option) any later version.18# (at your option) any later version.
19#19#
20# This program is distributed in the hope that it will be useful,20# This program is distributed in the hope that it will be useful,
21# but WITHOUT ANY WARRANTY; without even the implied warranty of21# but WITHOUT ANY WARRANTY; without even the implied warranty of
22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23# GNU General Public License for more details.23# GNU Affero General Public License for more details.
24#24#
25# You should have received a copy of the GNU General Public License25# You should have received a copy of the GNU Affero General Public License
26# along with this program. If not, see <http://www.gnu.org/licenses/>.26# along with this program. If not, see <http://www.gnu.org/licenses/>.
27#27#
28##############################################################################28##############################################################################
2929
=== modified file 'account_banking_nl_triodos/__openerp__.py'
--- account_banking_nl_triodos/__openerp__.py 2013-02-26 21:06:36 +0000
+++ account_banking_nl_triodos/__openerp__.py 2013-05-06 14:07:28 +0000
@@ -4,40 +4,28 @@
4# and Therp BV (<http://therp.nl>)4# and Therp BV (<http://therp.nl>)
5# All Rights Reserved5# All Rights Reserved
6#6#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract EduSense BV
12# or Therp BV
13#
14# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
15# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
16# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
17# (at your option) any later version.10# (at your option) any later version.
18#11#
19# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.15# GNU Affero General Public License for more details.
23#16#
24# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
25# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
26#19#
27##############################################################################20##############################################################################
28{21{
29 'name': 'Triodos (NL) Bank Statements Import',22 'name': 'Triodos (NL) Bank Statements Import',
30 'version': '0.92',23 'version': '0.92',
31 'license': 'GPL-3',24 'license': 'AGPL-3',
32 'author': 'Therp BV / EduSense BV',25 'author': ['Therp BV', 'EduSense BV'],
33 'website': 'https://launchpad.net/account-banking',26 'website': 'https://launchpad.net/account-banking',
34 'category': 'Account Banking',27 'category': 'Account Banking',
35 'depends': ['account_banking'],28 'depends': ['account_banking'],
36 'init_xml': [],
37 'update_xml': [
38 #'security/ir.model.access.csv',
39 ],
40 'demo_xml': [],
41 'description': '''29 'description': '''
42Module to import Dutch Triodos bank format transation files (CSV format).30Module to import Dutch Triodos bank format transation files (CSV format).
4331
@@ -53,6 +41,5 @@
5341
54This modules contains no logic, just an import filter for account_banking.42This modules contains no logic, just an import filter for account_banking.
55 ''',43 ''',
56 'active': False,44 'installable': True,
57 'installable': False,
58}45}
5946
=== removed file 'account_banking_nl_triodos/__terp__.py'
--- account_banking_nl_triodos/__terp__.py 2011-05-05 10:29:28 +0000
+++ account_banking_nl_triodos/__terp__.py 1970-01-01 00:00:00 +0000
@@ -1,58 +0,0 @@
1##############################################################################
2#
3# Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>)
4# and Therp BV (<http://therp.nl>)
5# All Rights Reserved
6#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract EduSense BV
12# or Therp BV
13#
14# This program is free software: you can redistribute it and/or modify
15# it under the terms of the GNU General Public License as published by
16# the Free Software Foundation, either version 3 of the License, or
17# (at your option) any later version.
18#
19# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.
23#
24# You should have received a copy of the GNU General Public License
25# along with this program. If not, see <http://www.gnu.org/licenses/>.
26#
27##############################################################################
28{
29 'name': 'Triodos (NL) Bank Statements Import',
30 'version': '0.62',
31 'license': 'GPL-3',
32 'author': 'Therp BV / EduSense BV',
33 'website': 'https://launchpad.net/account-banking',
34 'category': 'Account Banking',
35 'depends': ['account_banking'],
36 'init_xml': [],
37 'update_xml': [
38 #'security/ir.model.access.csv',
39 ],
40 'demo_xml': [],
41 'description': '''
42Module to import Dutch Triodos bank format transation files (CSV format).
43
44As the Triodos bank does not provide detailed specification concerning possible
45values and their meaning for the fields in the CSV file format, the statements
46are parsed according to an educated guess based on incomplete information.
47You can contact the account-banking developers through their launchpad page and
48help improve the performance of this import filter on
49https://launchpad.net/account-banking.
50
51Note that imported bank transfers are organized in statements covering periods
52of one week, even if the imported files cover a different period.
53
54This modules contains no logic, just an import filter for account_banking.
55 ''',
56 'active': False,
57 'installable': True,
58}
590
=== modified file 'account_banking_nl_triodos/triodos.py'
--- account_banking_nl_triodos/triodos.py 2012-01-17 08:48:10 +0000
+++ account_banking_nl_triodos/triodos.py 2013-05-06 14:07:28 +0000
@@ -6,16 +6,16 @@
6# All Rights Reserved6# All Rights Reserved
7#7#
8# This program is free software: you can redistribute it and/or modify8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by9# it under the terms of the GNU Affero General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.11# (at your option) any later version.
12#12#
13# This program is distributed in the hope that it will be useful,13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.16# GNU Affero General Public License for more details.
17#17#
18# You should have received a copy of the GNU General Public License18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#20#
21##############################################################################21##############################################################################
2222
=== modified file 'account_banking_uk_hsbc/__openerp__.py'
--- account_banking_uk_hsbc/__openerp__.py 2013-02-26 21:06:36 +0000
+++ account_banking_uk_hsbc/__openerp__.py 2013-05-06 14:07:28 +0000
@@ -26,15 +26,13 @@
26 'website': 'http://www.credativ.co.uk',26 'website': 'http://www.credativ.co.uk',
27 'category': 'Account Banking',27 'category': 'Account Banking',
28 'depends': ['account_banking'],28 'depends': ['account_banking'],
29 'init_xml': [],29 'data': [
30 'update_xml': [
31 'account_banking_uk_hsbc.xml',30 'account_banking_uk_hsbc.xml',
32 'hsbc_clientid_view.xml',31 'hsbc_clientid_view.xml',
33 'data/banking_export_hsbc.xml',32 'data/banking_export_hsbc.xml',
34 'wizard/export_hsbc_view.xml',33 'wizard/export_hsbc_view.xml',
35 'security/ir.model.access.csv',34 'security/ir.model.access.csv',
36 ],35 ],
37 'demo_xml': [],
38 'description': '''36 'description': '''
39 Module to import HSBC format transation files (S.W.I.F.T MT940) and to export payments for HSBC.net (PAYMUL).37 Module to import HSBC format transation files (S.W.I.F.T MT940) and to export payments for HSBC.net (PAYMUL).
4038
@@ -47,6 +45,5 @@
4745
48 Initial release of this module was co-sponsored by Canonical.46 Initial release of this module was co-sponsored by Canonical.
49 ''',47 ''',
50 'active': False,48 'installable': True,
51 'installable': False,
52}49}
5350
=== modified file 'account_banking_uk_hsbc/account_banking_uk_hsbc.py'
--- account_banking_uk_hsbc/account_banking_uk_hsbc.py 2012-03-27 14:55:03 +0000
+++ account_banking_uk_hsbc/account_banking_uk_hsbc.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking_uk_hsbc/wizard/__init__.py'
--- account_banking_uk_hsbc/wizard/__init__.py 2011-10-24 15:26:13 +0000
+++ account_banking_uk_hsbc/wizard/__init__.py 2013-05-06 14:07:28 +0000
@@ -6,16 +6,16 @@
6# All Rights Reserved6# All Rights Reserved
7#7#
8# This program is free software: you can redistribute it and/or modify8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by9# it under the terms of the GNU Affero General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.11# (at your option) any later version.
12#12#
13# This program is distributed in the hope that it will be useful,13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.16# GNU Affero General Public License for more details.
17#17#
18# You should have received a copy of the GNU General Public License18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#20#
21##############################################################################21##############################################################################
2222
=== modified file 'account_banking_uk_hsbc/wizard/export_hsbc.py'
--- account_banking_uk_hsbc/wizard/export_hsbc.py 2012-03-22 12:07:57 +0000
+++ account_banking_uk_hsbc/wizard/export_hsbc.py 2013-05-06 14:07:28 +0000
@@ -6,16 +6,16 @@
6# All Rights Reserved6# All Rights Reserved
7#7#
8# This program is free software: you can redistribute it and/or modify8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by9# it under the terms of the GNU Affero General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.11# (at your option) any later version.
12#12#
13# This program is distributed in the hope that it will be useful,13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.16# GNU Affero General Public License for more details.
17#17#
18# You should have received a copy of the GNU General Public License18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#20#
21##############################################################################21##############################################################################
2222
=== modified file 'account_banking_uk_hsbc/wizard/paymul.py'
--- account_banking_uk_hsbc/wizard/paymul.py 2012-03-22 12:07:57 +0000
+++ account_banking_uk_hsbc/wizard/paymul.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_banking_uk_hsbc/wizard/paymul_test.py'
--- account_banking_uk_hsbc/wizard/paymul_test.py 2011-10-24 15:26:13 +0000
+++ account_banking_uk_hsbc/wizard/paymul_test.py 2013-05-06 14:07:28 +0000
@@ -5,16 +5,16 @@
5# All Rights Reserved5# All Rights Reserved
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11#11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
=== modified file 'account_direct_debit/__openerp__.py'
--- account_direct_debit/__openerp__.py 2013-02-26 21:06:36 +0000
+++ account_direct_debit/__openerp__.py 2013-05-06 14:07:28 +0000
@@ -4,43 +4,35 @@
4# Copyright (C) 2011 Smile (<http://smile.fr>).4# Copyright (C) 2011 Smile (<http://smile.fr>).
5# All Rights Reserved5# All Rights Reserved
6#6#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract EduSense BV
12#
13# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
15# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
16# (at your option) any later version.10# (at your option) any later version.
17#11#
18# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.15# GNU Affero General Public License for more details.
22#16#
23# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
24# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
25#19#
26##############################################################################20##############################################################################
27{21{
28 'name': 'Direct Debit',22 'name': 'Direct Debit',
29 'version': '6.1.1.134',23 'version': '6.1.1.134',
30 'license': 'GPL-3',24 'license': 'AGPL-3',
31 'author': 'Therp BV / Smile',25 'author': 'Therp BV / Smile',
32 'website': 'https://launchpad.net/banking-addons',26 'website': 'https://launchpad.net/banking-addons',
33 'category': 'Banking addons',27 'category': 'Banking addons',
34 'depends': ['account_banking'],28 'depends': ['account_banking'],
35 'init_xml': [],29 'data': [
36 'update_xml': [
37 'view/account_payment.xml',30 'view/account_payment.xml',
38 'view/account_invoice.xml',31 'view/account_invoice.xml',
39 'workflow/account_invoice.xml',32 'workflow/account_invoice.xml',
40 'workflow/account_payment.xml',33 'workflow/account_payment.xml',
41 'data/account_payment_term.xml',34 'data/account_payment_term.xml',
42 ],35 ],
43 'demo_xml': [],
44 'description': '''36 'description': '''
45This module adds support for direct debit orders, analogous to payment orders.37This module adds support for direct debit orders, analogous to payment orders.
46A new entry in the Accounting/Payment menu allow you to create a direct debit38A new entry in the Accounting/Payment menu allow you to create a direct debit
@@ -57,6 +49,5 @@
57banking institutions. The banking addons are a continuation of Account Banking49banking institutions. The banking addons are a continuation of Account Banking
58Framework by Edusense BV. See https://launchpad.net/banking-addons.50Framework by Edusense BV. See https://launchpad.net/banking-addons.
59 ''',51 ''',
60 'active': False,
61 'installable': False,52 'installable': False,
62}53}
6354
=== modified file 'account_payment_shortcut/__openerp__.py'
--- account_payment_shortcut/__openerp__.py 2013-02-26 21:06:36 +0000
+++ account_payment_shortcut/__openerp__.py 2013-05-06 14:07:28 +0000
@@ -4,41 +4,30 @@
4# 2011 Smile BV (<http://smile.fr>).4# 2011 Smile BV (<http://smile.fr>).
5# All Rights Reserved5# All Rights Reserved
6#6#
7# WARNING: This program as such is intended to be used by professional
8# programmers who take the whole responsability of assessing all potential
9# consequences resulting from its eventual inadequacies and bugs
10# End users who are looking for a ready-to-use solution with commercial
11# garantees and support are strongly adviced to contract EduSense BV
12#
13# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU Affero General Public License as published by
15# the Free Software Foundation, either version 3 of the License, or9# the Free Software Foundation, either version 3 of the License, or
16# (at your option) any later version.10# (at your option) any later version.
17#11#
18# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.15# GNU Affero General Public License for more details.
22#16#
23# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU Affero General Public License
24# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
25#19#
26##############################################################################20##############################################################################
27{21{
28 'name': 'Account Payment Invoice Selection Shortcut',22 'name': 'Account Payment Invoice Selection Shortcut',
29 'version': '6.1.1.134',23 'version': '6.1.1.134',
30 'license': 'GPL-3',24 'license': 'AGPL-3',
31 'author': 'Smile / Therp BV',25 'author': 'Smile / Therp BV',
32 'website': 'https://launchpad.net/banking-addons',26 'website': 'https://launchpad.net/banking-addons',
33 'category': 'Banking addons',27 'category': 'Banking addons',
34 'depends': ['account_payment'],28 'depends': ['account_payment'],
35 'init_xml': [],
36 'update_xml': [
37 ],
38 'demo_xml': [],
39 'description': '''29 'description': '''
40When composing a payment order, select all candidates by default (in the second step of the "Select invoices to pay" wizard).30When composing a payment order, select all candidates by default (in the second step of the "Select invoices to pay" wizard).
41 ''',31 ''',
42 'active': False,
43 'installable': False,32 'installable': False,
44}33}

Subscribers

People subscribed via source and target branches

to status/vote changes: