Merge lp:~therp-nl/banking-addons/ba7.0-MIG-import into lp:banking-addons
- ba7.0-MIG-import
- Merge into banking-addons-70
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 |
Related bugs: |
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
Description of the change
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote : | # |
- 199. By Stefan Rijnhart (Opener)
-
[RFR] Refactor out wildcard imports
[RFR] Use API to get period - 200. By Stefan Rijnhart (Opener)
-
[RFR] Update comment
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_
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
- 201. By Stefan Rijnhart (Opener)
-
[MRG] Merged with prerequisite branch and resolved conflicts
Stefan Rijnhart (Opener) (stefan-opener) wrote : | # |
Hi Guewen,
thanks for the review! I resolved the conflict with the prerequisite branch.
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
Thanks, LGTM
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
- 202. By Stefan Rijnhart (Opener)
-
[FIX] Variable substitution inside call to _()
Stefan Rijnhart (Opener) (stefan-opener) wrote : | # |
Thanks, fixed that rightaway
Preview Diff
1 | === modified file 'account_banking/__init__.py' | |||
2 | --- account_banking/__init__.py 2012-01-16 16:15:55 +0000 | |||
3 | +++ account_banking/__init__.py 2013-05-06 14:07:28 +0000 | |||
4 | @@ -11,16 +11,16 @@ | |||
5 | 11 | # garantees and support are strongly adviced to contract EduSense BV | 11 | # garantees and support are strongly adviced to contract EduSense BV |
6 | 12 | # | 12 | # |
7 | 13 | # This program is free software: you can redistribute it and/or modify | 13 | # This program is free software: you can redistribute it and/or modify |
9 | 14 | # it under the terms of the GNU General Public License as published by | 14 | # it under the terms of the GNU Affero General Public License as published by |
10 | 15 | # the Free Software Foundation, either version 3 of the License, or | 15 | # the Free Software Foundation, either version 3 of the License, or |
11 | 16 | # (at your option) any later version. | 16 | # (at your option) any later version. |
12 | 17 | # | 17 | # |
13 | 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, |
14 | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | 21 | # GNU General Public License for more details. | 21 | # GNU Affero General Public License for more details. |
18 | 22 | # | 22 | # |
20 | 23 | # You should have received a copy of the GNU General Public License | 23 | # You should have received a copy of the GNU Affero General Public License |
21 | 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/>. |
22 | 25 | # | 25 | # |
23 | 26 | ############################################################################## | 26 | ############################################################################## |
24 | 27 | 27 | ||
25 | === modified file 'account_banking/__openerp__.py' | |||
26 | --- account_banking/__openerp__.py 2013-05-06 14:07:27 +0000 | |||
27 | +++ account_banking/__openerp__.py 2013-05-06 14:07:28 +0000 | |||
28 | @@ -1,3 +1,4 @@ | |||
29 | 1 | # -*- coding: utf-8 -*- | ||
30 | 1 | ############################################################################## | 2 | ############################################################################## |
31 | 2 | # | 3 | # |
32 | 3 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). |
33 | @@ -8,30 +9,25 @@ | |||
34 | 8 | # | 9 | # |
35 | 9 | # All Rights Reserved | 10 | # All Rights Reserved |
36 | 10 | # | 11 | # |
37 | 11 | # WARNING: This program as such is intended to be used by professional | ||
38 | 12 | # programmers who take the whole responsability of assessing all potential | ||
39 | 13 | # consequences resulting from its eventual inadequacies and bugs | ||
40 | 14 | # End users who are looking for a ready-to-use solution with commercial | ||
41 | 15 | # garantees and support are strongly adviced to contract EduSense BV | ||
42 | 16 | # | ||
43 | 17 | # This program is free software: you can redistribute it and/or modify | 12 | # This program is free software: you can redistribute it and/or modify |
47 | 18 | # it under the terms of the GNU General Public License as published by | 13 | # it under the terms of the GNU Affero General Public License as |
48 | 19 | # the Free Software Foundation, either version 3 of the License, or | 14 | # published by the Free Software Foundation, either version 3 of the |
49 | 20 | # (at your option) any later version. | 15 | # License, or (at your option) any later version. |
50 | 21 | # | 16 | # |
51 | 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, |
52 | 23 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
53 | 24 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
55 | 25 | # GNU General Public License for more details. | 20 | # GNU Affero General Public License for more details. |
56 | 26 | # | 21 | # |
58 | 27 | # You should have received a copy of the GNU General Public License | 22 | # You should have received a copy of the GNU Affero General Public License |
59 | 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/>. |
60 | 29 | # | 24 | # |
61 | 30 | ############################################################################## | 25 | ############################################################################## |
62 | 26 | |||
63 | 31 | { | 27 | { |
64 | 32 | 'name': 'Account Banking', | 28 | 'name': 'Account Banking', |
65 | 33 | 'version': '0.1.136', | 29 | 'version': '0.1.136', |
67 | 34 | 'license': 'GPL-3', | 30 | 'license': 'AGPL-3', |
68 | 35 | 'author': 'Banking addons community', | 31 | 'author': 'Banking addons community', |
69 | 36 | 'website': 'https://launchpad.net/banking-addons', | 32 | 'website': 'https://launchpad.net/banking-addons', |
70 | 37 | 'category': 'Banking addons', | 33 | 'category': 'Banking addons', |
71 | @@ -39,8 +35,7 @@ | |||
72 | 39 | 'account_voucher', | 35 | 'account_voucher', |
73 | 40 | 'account_iban_preserve_domestic', | 36 | 'account_iban_preserve_domestic', |
74 | 41 | ], | 37 | ], |
77 | 42 | 'init_xml': [], | 38 | 'data': [ |
76 | 43 | 'update_xml': [ | ||
78 | 44 | 'security/ir.model.access.csv', | 39 | 'security/ir.model.access.csv', |
79 | 45 | 'data/account_banking_data.xml', | 40 | 'data/account_banking_data.xml', |
80 | 46 | 'wizard/bank_import_view.xml', | 41 | 'wizard/bank_import_view.xml', |
81 | @@ -48,7 +43,6 @@ | |||
82 | 48 | 'wizard/banking_transaction_wizard.xml', | 43 | 'wizard/banking_transaction_wizard.xml', |
83 | 49 | 'workflow/account_invoice.xml', | 44 | 'workflow/account_invoice.xml', |
84 | 50 | ], | 45 | ], |
85 | 51 | 'demo_xml': [], | ||
86 | 52 | 'external_dependencies': { | 46 | 'external_dependencies': { |
87 | 53 | 'python' : ['BeautifulSoup'], | 47 | 'python' : ['BeautifulSoup'], |
88 | 54 | }, | 48 | }, |
89 | @@ -107,6 +101,5 @@ | |||
90 | 107 | + No special configuration needed for the parsers, new parsers are | 101 | + No special configuration needed for the parsers, new parsers are |
91 | 108 | recognized and made available at server (re)start. | 102 | recognized and made available at server (re)start. |
92 | 109 | ''', | 103 | ''', |
95 | 110 | 'active': False, | 104 | 'installable': True, |
94 | 111 | 'installable': False, | ||
96 | 112 | } | 105 | } |
97 | 113 | 106 | ||
98 | === modified file 'account_banking/account_banking.py' | |||
99 | --- account_banking/account_banking.py 2013-05-06 14:07:27 +0000 | |||
100 | +++ account_banking/account_banking.py 2013-05-06 14:07:28 +0000 | |||
101 | @@ -1,20 +1,24 @@ | |||
103 | 1 | # -*- encoding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
104 | 2 | ############################################################################## | 2 | ############################################################################## |
105 | 3 | # | 3 | # |
106 | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). |
107 | 5 | # (C) 2011 - 2013 Therp BV (<http://therp.nl>). | ||
108 | 6 | # | ||
109 | 7 | # All other contributions are (C) by their respective contributors | ||
110 | 8 | # | ||
111 | 5 | # All Rights Reserved | 9 | # All Rights Reserved |
112 | 6 | # | 10 | # |
113 | 7 | # This program is free software: you can redistribute it and/or modify | 11 | # This program is free software: you can redistribute it and/or modify |
117 | 8 | # it under the terms of the GNU General Public License as published by | 12 | # it under the terms of the GNU Affero General Public License as |
118 | 9 | # the Free Software Foundation, either version 3 of the License, or | 13 | # published by the Free Software Foundation, either version 3 of the |
119 | 10 | # (at your option) any later version. | 14 | # License, or (at your option) any later version. |
120 | 11 | # | 15 | # |
121 | 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, |
122 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
123 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
125 | 15 | # GNU General Public License for more details. | 19 | # GNU Affero General Public License for more details. |
126 | 16 | # | 20 | # |
128 | 17 | # You should have received a copy of the GNU General Public License | 21 | # You should have received a copy of the GNU Affero General Public License |
129 | 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/>. |
130 | 19 | # | 23 | # |
131 | 20 | ############################################################################## | 24 | ############################################################################## |
132 | @@ -57,20 +61,20 @@ | |||
133 | 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'. |
134 | 58 | Rejected payments from the bank receive on import the status 'rejected'. | 62 | Rejected payments from the bank receive on import the status 'rejected'. |
135 | 59 | ''' | 63 | ''' |
144 | 60 | import time | 64 | |
145 | 61 | import sepa | 65 | from openerp.osv import orm, fields |
146 | 62 | from osv import osv, fields | 66 | from openerp.tools.translate import _ |
147 | 63 | from tools.translate import _ | 67 | from openerp import netsvc, SUPERUSER_ID |
148 | 64 | from wizard.banktools import get_or_create_bank | 68 | from openerp.addons.decimal_precision import decimal_precision as dp |
149 | 65 | import decimal_precision as dp | 69 | from openerp.addons.account_banking import sepa |
150 | 66 | import netsvc | 70 | from openerp.addons.account_banking.wizard.banktools import get_or_create_bank |
143 | 67 | from openerp import SUPERUSER_ID | ||
151 | 68 | 71 | ||
152 | 69 | def warning(title, message): | 72 | def warning(title, message): |
153 | 70 | '''Convenience routine''' | 73 | '''Convenience routine''' |
154 | 71 | return {'warning': {'title': title, 'message': message}} | 74 | return {'warning': {'title': title, 'message': message}} |
155 | 72 | 75 | ||
157 | 73 | class account_banking_account_settings(osv.osv): | 76 | |
158 | 77 | class account_banking_account_settings(orm.Model): | ||
159 | 74 | '''Default Journal for Bank Account''' | 78 | '''Default Journal for Bank Account''' |
160 | 75 | _name = 'account.banking.account.settings' | 79 | _name = 'account.banking.account.settings' |
161 | 76 | _description = __doc__ | 80 | _description = __doc__ |
162 | @@ -122,13 +126,6 @@ | |||
163 | 122 | ), | 126 | ), |
164 | 123 | ), | 127 | ), |
165 | 124 | 128 | ||
166 | 125 | #'multi_currency': fields.boolean( | ||
167 | 126 | # 'Multi Currency Bank Account', required=True, | ||
168 | 127 | # help=('Select this if your bank account is able to handle ' | ||
169 | 128 | # 'multiple currencies in parallel without coercing to ' | ||
170 | 129 | # 'a single currency.' | ||
171 | 130 | # ), | ||
172 | 131 | #), | ||
173 | 132 | } | 129 | } |
174 | 133 | 130 | ||
175 | 134 | def _default_company(self, cr, uid, context=None): | 131 | def _default_company(self, cr, uid, context=None): |
176 | @@ -162,7 +159,8 @@ | |||
177 | 162 | if not company_id: | 159 | if not company_id: |
178 | 163 | company_id = self._default_company(cr, uid, context=context) | 160 | company_id = self._default_company(cr, uid, context=context) |
179 | 164 | partner_id = self.pool.get('res.company').read( | 161 | partner_id = self.pool.get('res.company').read( |
181 | 165 | cr, uid, company_id, ['partner_id'], context=context)['partner_id'][0] | 162 | cr, uid, company_id, ['partner_id'], |
182 | 163 | context=context)['partner_id'][0] | ||
183 | 166 | bank_ids = self.pool.get('res.partner.bank').search( | 164 | bank_ids = self.pool.get('res.partner.bank').search( |
184 | 167 | cr, uid, [('partner_id', '=', partner_id)], context=context) | 165 | cr, uid, [('partner_id', '=', partner_id)], context=context) |
185 | 168 | return bank_ids and bank_ids[0] or False | 166 | return bank_ids and bank_ids[0] or False |
186 | @@ -177,7 +175,8 @@ | |||
187 | 177 | 'res.partner', context=localcontext) | 175 | 'res.partner', context=localcontext) |
188 | 178 | return account_def and account_def.id or False | 176 | return account_def and account_def.id or False |
189 | 179 | 177 | ||
191 | 180 | def _default_credit_account_id(self, cr, uid, context=None, company_id=False): | 178 | def _default_credit_account_id( |
192 | 179 | self, cr, uid, context=None, company_id=False): | ||
193 | 181 | localcontext = context and context.copy() or {} | 180 | localcontext = context and context.copy() or {} |
194 | 182 | localcontext['force_company'] = ( | 181 | localcontext['force_company'] = ( |
195 | 183 | company_id or self._default_company(cr, uid, context=context)) | 182 | company_id or self._default_company(cr, uid, context=context)) |
196 | @@ -187,9 +186,9 @@ | |||
197 | 187 | return account_def and account_def.id or False | 186 | return account_def and account_def.id or False |
198 | 188 | 187 | ||
199 | 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): |
201 | 190 | domain = [('journal_id','=',journal_id)] | 189 | domain = [('journal_id', '=', journal_id)] |
202 | 191 | if partner_bank_id: | 190 | if partner_bank_id: |
204 | 192 | domain.append(('partner_bank_id','=',partner_bank_id)) | 191 | domain.append(('partner_bank_id', '=', partner_bank_id)) |
205 | 193 | return self.search(cr, uid, domain, context=context) | 192 | return self.search(cr, uid, domain, context=context) |
206 | 194 | 193 | ||
207 | 195 | def onchange_partner_bank_id( | 194 | def onchange_partner_bank_id( |
208 | @@ -225,11 +224,11 @@ | |||
209 | 225 | 'default_debit_account_id': _default_debit_account_id, | 224 | 'default_debit_account_id': _default_debit_account_id, |
210 | 226 | 'default_credit_account_id': _default_credit_account_id, | 225 | 'default_credit_account_id': _default_credit_account_id, |
211 | 227 | 'partner_bank_id': _default_partner_bank_id, | 226 | 'partner_bank_id': _default_partner_bank_id, |
212 | 228 | #'multi_currency': lambda *a: False, | ||
213 | 229 | } | 227 | } |
214 | 230 | account_banking_account_settings() | 228 | account_banking_account_settings() |
215 | 231 | 229 | ||
217 | 232 | class account_banking_imported_file(osv.osv): | 230 | |
218 | 231 | class account_banking_imported_file(orm.Model): | ||
219 | 233 | '''Imported Bank Statements File''' | 232 | '''Imported Bank Statements File''' |
220 | 234 | _name = 'account.banking.imported.file' | 233 | _name = 'account.banking.imported.file' |
221 | 235 | _description = __doc__ | 234 | _description = __doc__ |
222 | @@ -267,12 +266,13 @@ | |||
223 | 267 | ), | 266 | ), |
224 | 268 | } | 267 | } |
225 | 269 | _defaults = { | 268 | _defaults = { |
227 | 270 | 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), | 269 | 'date': fields.date.context_today, |
228 | 271 | 'user_id': lambda self, cursor, uid, context: uid, | 270 | 'user_id': lambda self, cursor, uid, context: uid, |
229 | 272 | } | 271 | } |
230 | 273 | account_banking_imported_file() | 272 | account_banking_imported_file() |
231 | 274 | 273 | ||
233 | 275 | class account_bank_statement(osv.osv): | 274 | |
234 | 275 | class account_bank_statement(orm.Model): | ||
235 | 276 | ''' | 276 | ''' |
236 | 277 | Extensions from account_bank_statement: | 277 | Extensions from account_bank_statement: |
237 | 278 | 1. Removed period_id (transformed to optional boolean) - as it is no | 278 | 1. Removed period_id (transformed to optional boolean) - as it is no |
238 | @@ -285,45 +285,6 @@ | |||
239 | 285 | ''' | 285 | ''' |
240 | 286 | _inherit = 'account.bank.statement' | 286 | _inherit = 'account.bank.statement' |
241 | 287 | _order = 'id' | 287 | _order = 'id' |
242 | 288 | _abf_others = [] | ||
243 | 289 | _abf_others_loaded = False | ||
244 | 290 | |||
245 | 291 | def __init__(self, *args, **kwargs): | ||
246 | 292 | ''' | ||
247 | 293 | See where we stand in the order of things | ||
248 | 294 | ''' | ||
249 | 295 | super(account_bank_statement, self).__init__(*args, **kwargs) | ||
250 | 296 | if not self._abf_others_loaded: | ||
251 | 297 | self._abf_others_loaded = True | ||
252 | 298 | self._abf_others = [x for x in self.__class__.__mro__ | ||
253 | 299 | if x.__module__.split('.')[0] not in [ | ||
254 | 300 | 'osv', 'account', 'account_banking', | ||
255 | 301 | '__builtin__' | ||
256 | 302 | ] | ||
257 | 303 | ] | ||
258 | 304 | |||
259 | 305 | #def _currency(self, cursor, user, ids, name, args, context=None): | ||
260 | 306 | # ''' | ||
261 | 307 | # Calculate currency from contained transactions | ||
262 | 308 | # ''' | ||
263 | 309 | # res = {} | ||
264 | 310 | # res_currency_obj = self.pool.get('res.currency') | ||
265 | 311 | # res_users_obj = self.pool.get('res.users') | ||
266 | 312 | # default_currency = res_users_obj.browse(cursor, user, | ||
267 | 313 | # user, context=context).company_id.currency_id | ||
268 | 314 | # for statement in self.browse(cursor, user, ids, context=context): | ||
269 | 315 | # currency = statement.journal_id.currency | ||
270 | 316 | # if not currency: | ||
271 | 317 | # currency = default_currency | ||
272 | 318 | # res[statement.id] = currency.id | ||
273 | 319 | # currency_names = {} | ||
274 | 320 | # for currency_id, currency_name in res_currency_obj.name_get(cursor, | ||
275 | 321 | # user, res.values(), context=context): | ||
276 | 322 | # currency_names[currency_id] = currency_name | ||
277 | 323 | # for statement_id in res.keys(): | ||
278 | 324 | # currency_id = res[statement_id] | ||
279 | 325 | # res[statement_id] = (currency_id, currency_names[currency_id]) | ||
280 | 326 | # return res | ||
281 | 327 | 288 | ||
282 | 328 | _columns = { | 289 | _columns = { |
283 | 329 | 'period_id': fields.many2one('account.period', 'Period', | 290 | 'period_id': fields.many2one('account.period', 'Period', |
284 | @@ -331,13 +292,10 @@ | |||
285 | 331 | 'banking_id': fields.many2one('account.banking.imported.file', | 292 | 'banking_id': fields.many2one('account.banking.imported.file', |
286 | 332 | 'Imported File', readonly=True, | 293 | 'Imported File', readonly=True, |
287 | 333 | ), | 294 | ), |
288 | 334 | # 'currency': fields.function(_currency, method=True, string='Currency', | ||
289 | 335 | # type='many2one', relation='res.currency'), | ||
290 | 336 | } | 295 | } |
291 | 337 | 296 | ||
292 | 338 | _defaults = { | 297 | _defaults = { |
295 | 339 | 'period_id': lambda *a: False, | 298 | 'period_id': False, |
294 | 340 | # 'currency': _currency, | ||
296 | 341 | } | 299 | } |
297 | 342 | 300 | ||
298 | 343 | def _check_company_id(self, cr, uid, ids, context=None): | 301 | def _check_company_id(self, cr, uid, ids, context=None): |
299 | @@ -346,19 +304,21 @@ | |||
300 | 346 | move of period_id to the statement line | 304 | move of period_id to the statement line |
301 | 347 | """ | 305 | """ |
302 | 348 | for statement in self.browse(cr, uid, ids, context=context): | 306 | for statement in self.browse(cr, uid, ids, context=context): |
303 | 349 | if (statement.period_id and | ||
304 | 350 | statement.company_id.id != statement.period_id.company_id.id): | ||
305 | 351 | return False | ||
306 | 352 | for line in statement.line_ids: | 307 | for line in statement.line_ids: |
307 | 353 | if (line.period_id and | 308 | if (line.period_id and |
308 | 354 | statement.company_id.id != line.period_id.company_id.id): | 309 | statement.company_id.id != line.period_id.company_id.id): |
309 | 355 | return False | 310 | return False |
311 | 356 | return True | 311 | if not statement.period_id: |
312 | 312 | statement.write({'period_id': line.period_id.id}) | ||
313 | 313 | return super(account_bank_statement, self)._check_company_id( | ||
314 | 314 | cr, uid, ids, context=context) | ||
315 | 357 | 315 | ||
316 | 358 | # Redefine the constraint, or it still refer to the original method | 316 | # Redefine the constraint, or it still refer to the original method |
317 | 359 | _constraints = [ | 317 | _constraints = [ |
320 | 360 | (_check_company_id, 'The journal and period chosen have to belong to the same company.', ['journal_id','period_id']), | 318 | (_check_company_id, |
321 | 361 | ] | 319 | 'The journal and period chosen have to belong to the same company.', |
322 | 320 | ['journal_id','period_id']), | ||
323 | 321 | ] | ||
324 | 362 | 322 | ||
325 | 363 | def _get_period(self, cursor, uid, date, context=None): | 323 | def _get_period(self, cursor, uid, date, context=None): |
326 | 364 | ''' | 324 | ''' |
327 | @@ -368,231 +328,141 @@ | |||
328 | 368 | periods = period_obj.find(cursor, uid, dt=date, context=context) | 328 | periods = period_obj.find(cursor, uid, dt=date, context=context) |
329 | 369 | return periods and periods[0] or False | 329 | return periods and periods[0] or False |
330 | 370 | 330 | ||
336 | 371 | #def compute(self, cursor, uid, ids, context=None): | 331 | def _prepare_move( |
337 | 372 | # ''' | 332 | self, cr, uid, st_line, st_line_number, context=None): |
338 | 373 | # Compute start and end balance with mixed currencies. | 333 | """ |
339 | 374 | # ''' | 334 | Add the statement line's period to the move, overwriting |
340 | 375 | # return None | 335 | the period on the statement |
341 | 336 | """ | ||
342 | 337 | res = super(account_bank_statement, self)._prepare_move( | ||
343 | 338 | cr, uid, st_line, st_line_number, context=context) | ||
344 | 339 | if context and context.get('period_id'): | ||
345 | 340 | res['period_id'] = context['period_id'] | ||
346 | 341 | return res | ||
347 | 342 | |||
348 | 343 | def _prepare_move_line_vals( | ||
349 | 344 | self, cr, uid, st_line, move_id, debit, credit, currency_id=False, | ||
350 | 345 | amount_currency=False, account_id=False, analytic_id=False, | ||
351 | 346 | partner_id=False, context=None): | ||
352 | 347 | """ | ||
353 | 348 | Add the statement line's period to the move lines, overwriting | ||
354 | 349 | the period on the statement | ||
355 | 350 | """ | ||
356 | 351 | res = super(account_bank_statement, self)._prepare_move_line_vals( | ||
357 | 352 | cr, uid, st_line, move_id, debit, credit, currency_id=currency_id, | ||
358 | 353 | amount_currency=amount_currency, account_id=account_id, | ||
359 | 354 | analytic_id=analytic_id, partner_id=partner_id, context=context) | ||
360 | 355 | if context and context.get('period_id'): | ||
361 | 356 | res['period_id'] = context['period_id'] | ||
362 | 357 | return res | ||
363 | 376 | 358 | ||
364 | 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, |
365 | 378 | company_currency_id, st_line_number, | 360 | company_currency_id, st_line_number, |
366 | 379 | context=None): | 361 | context=None): |
367 | 380 | # This is largely a copy of the original code in account | ||
368 | 381 | # Modifications are marked with AB | ||
369 | 382 | # Modifications by account_voucher are merged below. | ||
370 | 383 | # As there is no valid inheritance mechanism for large actions, this | ||
371 | 384 | # is the only option to add functionality to existing actions. | ||
372 | 385 | # WARNING: when the original code changes, this trigger has to be | ||
373 | 386 | # updated in sync. | ||
374 | 387 | |||
375 | 388 | if context is None: | 362 | if context is None: |
376 | 389 | context = {} | 363 | context = {} |
377 | 390 | res_currency_obj = self.pool.get('res.currency') | ||
378 | 391 | account_move_obj = self.pool.get('account.move') | 364 | account_move_obj = self.pool.get('account.move') |
379 | 392 | account_move_line_obj = self.pool.get('account.move.line') | 365 | account_move_line_obj = self.pool.get('account.move.line') |
380 | 393 | account_bank_statement_line_obj = self.pool.get( | 366 | account_bank_statement_line_obj = self.pool.get( |
381 | 394 | 'account.bank.statement.line') | 367 | 'account.bank.statement.line') |
382 | 395 | st_line = account_bank_statement_line_obj.browse( | 368 | st_line = account_bank_statement_line_obj.browse( |
383 | 396 | cr, uid, st_line_id, context=context) | 369 | cr, uid, st_line_id, context=context) |
384 | 370 | |||
385 | 371 | # Take period from statement line and write to context | ||
386 | 372 | # this will be picked up by the _prepare_move* methods | ||
387 | 397 | period_id = self._get_period( | 373 | period_id = self._get_period( |
391 | 398 | cr, uid, st_line.date, context=context) # AB | 374 | cr, uid, st_line.date, context=context) |
392 | 399 | # Start account voucher | 375 | localctx = context.copy() |
393 | 400 | # Post the voucher and update links between statement and moves | 376 | localctx['period_id'] = period_id |
394 | 377 | |||
395 | 378 | # Write date & period on the voucher, delegate to account_voucher's | ||
396 | 379 | # override of this method. Then post the related move and return. | ||
397 | 401 | if st_line.voucher_id: | 380 | if st_line.voucher_id: |
398 | 402 | voucher_pool = self.pool.get('account.voucher') | 381 | voucher_pool = self.pool.get('account.voucher') |
399 | 403 | wf_service = netsvc.LocalService("workflow") | ||
400 | 404 | voucher_pool.write( | 382 | voucher_pool.write( |
401 | 405 | cr, uid, [st_line.voucher_id.id], { | 383 | cr, uid, [st_line.voucher_id.id], { |
402 | 406 | 'number': st_line_number, | ||
403 | 407 | 'date': st_line.date, | 384 | 'date': st_line.date, |
405 | 408 | 'period_id': period_id, # AB | 385 | 'period_id': period_id, |
406 | 409 | }, context=context) | 386 | }, context=context) |
424 | 410 | if st_line.voucher_id.state == 'cancel': | 387 | |
425 | 411 | voucher_pool.action_cancel_draft( | 388 | res = super(account_bank_statement, self).create_move_from_st_line( |
426 | 412 | cr, uid, [st_line.voucher_id.id], context=context) | 389 | cr, uid, st_line_id, company_currency_id, st_line_number, |
427 | 413 | wf_service.trg_validate( | 390 | context=localctx) |
428 | 414 | uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr) | 391 | |
429 | 415 | v = voucher_pool.browse( | 392 | st_line.refresh() |
430 | 416 | cr, uid, st_line.voucher_id.id, context=context) | 393 | if st_line.voucher_id: |
414 | 417 | account_bank_statement_line_obj.write(cr, uid, [st_line_id], { | ||
415 | 418 | 'move_ids': [(4, v.move_id.id, False)] | ||
416 | 419 | }) | ||
417 | 420 | account_move_line_obj.write( | ||
418 | 421 | cr, uid, [x.id for x in v.move_ids], | ||
419 | 422 | {'statement_id': st_line.statement_id.id}, context=context) | ||
420 | 423 | # End of account_voucher | ||
421 | 424 | st_line.refresh() | ||
422 | 425 | |||
423 | 426 | # AB: The voucher journal isn't automatically posted, so post it (if needed) | ||
431 | 427 | if not st_line.voucher_id.journal_id.entry_posted: | 394 | if not st_line.voucher_id.journal_id.entry_posted: |
454 | 428 | account_move_obj.post(cr, uid, [st_line.voucher_id.move_id.id], context={}) | 395 | account_move_obj.post( |
455 | 429 | return True | 396 | cr, uid, [st_line.voucher_id.move_id.id], context={}) |
434 | 430 | |||
435 | 431 | st = st_line.statement_id | ||
436 | 432 | |||
437 | 433 | context.update({'date': st_line.date}) | ||
438 | 434 | ctxt = context.copy() # AB | ||
439 | 435 | ctxt['company_id'] = st_line.company_id.id # AB | ||
440 | 436 | |||
441 | 437 | move_id = account_move_obj.create(cr, uid, { | ||
442 | 438 | 'journal_id': st.journal_id.id, | ||
443 | 439 | 'period_id': period_id, # AB | ||
444 | 440 | 'date': st_line.date, | ||
445 | 441 | 'name': st_line_number, | ||
446 | 442 | }, context=context) | ||
447 | 443 | account_bank_statement_line_obj.write(cr, uid, [st_line.id], { | ||
448 | 444 | 'move_ids': [(4, move_id, False)] | ||
449 | 445 | }) | ||
450 | 446 | |||
451 | 447 | torec = [] | ||
452 | 448 | if st_line.amount >= 0: | ||
453 | 449 | account_id = st.journal_id.default_credit_account_id.id | ||
456 | 450 | else: | 397 | else: |
558 | 451 | account_id = st.journal_id.default_debit_account_id.id | 398 | # Write stored reconcile_id and pay invoices through workflow |
559 | 452 | 399 | if st_line.reconcile_id: | |
560 | 453 | acc_cur = ((st_line.amount <= 0 and | 400 | move_ids = [move.id for move in st_line.move_ids] |
561 | 454 | st.journal_id.default_debit_account_id) or | 401 | torec = account_move_obj.search( |
562 | 455 | st_line.account_id) | 402 | cr, uid, [ |
563 | 456 | context.update({ | 403 | ('move_id', 'in', move_ids), |
564 | 457 | 'res.currency.compute.account': acc_cur, | 404 | ('account_id', '=', st_line.account_id.id)], |
565 | 458 | }) | 405 | context=context) |
566 | 459 | amount = res_currency_obj.compute(cr, uid, st.currency.id, | 406 | account_move_line_obj.write(cr, uid, torec, { |
567 | 460 | company_currency_id, st_line.amount, context=context) | 407 | (st_line.reconcile_id.line_partial_ids and |
568 | 461 | 408 | 'reconcile_partial_id' or 'reconcile_id'): | |
569 | 462 | val = { | 409 | st_line.reconcile_id.id }, context=context) |
570 | 463 | 'name': st_line.name, | 410 | for move_line in (st_line.reconcile_id.line_id or []) + ( |
571 | 464 | 'date': st_line.date, | 411 | st_line.reconcile_id.line_partial_ids or []): |
572 | 465 | 'ref': st_line.ref, | 412 | netsvc.LocalService("workflow").trg_trigger( |
573 | 466 | 'move_id': move_id, | 413 | uid, 'account.move.line', move_line.id, cr) |
574 | 467 | 'partner_id': (((st_line.partner_id) and st_line.partner_id.id) or | 414 | return res |
474 | 468 | False), | ||
475 | 469 | 'account_id': (st_line.account_id) and st_line.account_id.id, | ||
476 | 470 | 'credit': ((amount>0) and amount) or 0.0, | ||
477 | 471 | 'debit': ((amount<0) and -amount) or 0.0, | ||
478 | 472 | 'statement_id': st.id, | ||
479 | 473 | 'journal_id': st.journal_id.id, | ||
480 | 474 | 'period_id': period_id, # AB | ||
481 | 475 | 'currency_id': st.currency.id, | ||
482 | 476 | 'analytic_account_id': (st_line.analytic_account_id and | ||
483 | 477 | st_line.analytic_account_id.id or | ||
484 | 478 | False), | ||
485 | 479 | } | ||
486 | 480 | |||
487 | 481 | if st.currency.id <> company_currency_id: | ||
488 | 482 | amount_cur = res_currency_obj.compute(cr, uid, company_currency_id, | ||
489 | 483 | st.currency.id, amount, context=context) | ||
490 | 484 | val['amount_currency'] = -amount_cur | ||
491 | 485 | |||
492 | 486 | if (st_line.account_id and st_line.account_id.currency_id and | ||
493 | 487 | st_line.account_id.currency_id.id <> company_currency_id): | ||
494 | 488 | val['currency_id'] = st_line.account_id.currency_id.id | ||
495 | 489 | amount_cur = res_currency_obj.compute(cr, uid, company_currency_id, | ||
496 | 490 | st_line.account_id.currency_id.id, amount, context=context) | ||
497 | 491 | val['amount_currency'] = -amount_cur | ||
498 | 492 | |||
499 | 493 | move_line_id = account_move_line_obj.create( | ||
500 | 494 | cr, uid, val, context=context) | ||
501 | 495 | torec.append(move_line_id) | ||
502 | 496 | |||
503 | 497 | # Fill the secondary amount/currency | ||
504 | 498 | # if currency is not the same than the company | ||
505 | 499 | amount_currency = False | ||
506 | 500 | currency_id = False | ||
507 | 501 | if st.currency.id <> company_currency_id: | ||
508 | 502 | amount_currency = st_line.amount | ||
509 | 503 | currency_id = st.currency.id | ||
510 | 504 | account_move_line_obj.create(cr, uid, { | ||
511 | 505 | 'name': st_line.name, | ||
512 | 506 | 'date': st_line.date, | ||
513 | 507 | 'ref': st_line.ref, | ||
514 | 508 | 'move_id': move_id, | ||
515 | 509 | 'partner_id': (((st_line.partner_id) and st_line.partner_id.id) or | ||
516 | 510 | False), | ||
517 | 511 | 'account_id': account_id, | ||
518 | 512 | 'credit': ((amount < 0) and -amount) or 0.0, | ||
519 | 513 | 'debit': ((amount > 0) and amount) or 0.0, | ||
520 | 514 | 'statement_id': st.id, | ||
521 | 515 | 'journal_id': st.journal_id.id, | ||
522 | 516 | 'period_id': period_id, # AB | ||
523 | 517 | 'amount_currency': amount_currency, | ||
524 | 518 | 'currency_id': currency_id, | ||
525 | 519 | }, context=context) | ||
526 | 520 | |||
527 | 521 | for line in account_move_line_obj.browse(cr, uid, [x.id for x in | ||
528 | 522 | account_move_obj.browse(cr, uid, move_id, | ||
529 | 523 | context=context).line_id], | ||
530 | 524 | context=context): | ||
531 | 525 | if line.state <> 'valid': | ||
532 | 526 | raise osv.except_osv(_('Error !'), | ||
533 | 527 | _('Journal Item "%s" is not valid') % line.name) | ||
534 | 528 | |||
535 | 529 | # Bank statements will not consider boolean on journal entry_posted | ||
536 | 530 | account_move_obj.post(cr, uid, [move_id], context=context) | ||
537 | 531 | |||
538 | 532 | """ | ||
539 | 533 | Account-banking: | ||
540 | 534 | - Write stored reconcile_id | ||
541 | 535 | - Pay invoices through workflow | ||
542 | 536 | |||
543 | 537 | Does not apply to voucher integration, but only to | ||
544 | 538 | payments and payment orders | ||
545 | 539 | """ | ||
546 | 540 | if st_line.reconcile_id: | ||
547 | 541 | account_move_line_obj.write(cr, uid, torec, { | ||
548 | 542 | (st_line.reconcile_id.line_partial_ids and | ||
549 | 543 | 'reconcile_partial_id' or 'reconcile_id'): | ||
550 | 544 | st_line.reconcile_id.id }, context=context) | ||
551 | 545 | for move_line in (st_line.reconcile_id.line_id or []) + ( | ||
552 | 546 | st_line.reconcile_id.line_partial_ids or []): | ||
553 | 547 | netsvc.LocalService("workflow").trg_trigger( | ||
554 | 548 | uid, 'account.move.line', move_line.id, cr) | ||
555 | 549 | #""" End account-banking """ | ||
556 | 550 | |||
557 | 551 | return move_id | ||
575 | 552 | 415 | ||
576 | 553 | def button_confirm_bank(self, cr, uid, ids, context=None): | 416 | def button_confirm_bank(self, cr, uid, ids, context=None): |
578 | 554 | if context is None: context = {} | 417 | """ |
579 | 418 | Assign journal sequence to statements without a name | ||
580 | 419 | """ | ||
581 | 420 | if context is None: | ||
582 | 421 | context = {} | ||
583 | 555 | obj_seq = self.pool.get('ir.sequence') | 422 | obj_seq = self.pool.get('ir.sequence') |
586 | 556 | if not isinstance(ids, list): ids = [ids] | 423 | if ids and isinstance(ids, (int, long)): |
587 | 557 | noname_ids = self.search(cr, uid, [('id','in',ids),('name','=','/')]) | 424 | ids = [ids] |
588 | 425 | noname_ids = self.search( | ||
589 | 426 | cr, uid, [('id', 'in', ids),('name', '=', '/')], | ||
590 | 427 | context=context) | ||
591 | 558 | for st in self.browse(cr, uid, noname_ids, context=context): | 428 | for st in self.browse(cr, uid, noname_ids, context=context): |
597 | 559 | if st.journal_id.sequence_id: | 429 | if st.journal_id.sequence_id: |
598 | 560 | year = self.pool.get('account.period').browse(cr, uid, self._get_period(cr, uid, st.date)).fiscalyear_id.id | 430 | period_id = self._get_period(cr, uid, st.date) |
599 | 561 | c = {'fiscalyear_id': year} | 431 | year = self.pool.get('account.period').browse( |
600 | 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 |
601 | 563 | self.write(cr, uid, ids, {'name': st_number}) | 433 | c = {'fiscalyear_id': year} |
602 | 434 | st_number = obj_seq.get_id( | ||
603 | 435 | cr, uid, st.journal_id.sequence_id.id, context=c) | ||
604 | 436 | self.write( | ||
605 | 437 | cr, uid, ids, {'name': st_number}, context=context) | ||
606 | 564 | 438 | ||
608 | 565 | return super(account_bank_statement, self).button_confirm_bank(cr, uid, ids, context) | 439 | return super(account_bank_statement, self).button_confirm_bank( |
609 | 440 | cr, uid, ids, context) | ||
610 | 566 | 441 | ||
611 | 567 | account_bank_statement() | 442 | account_bank_statement() |
612 | 568 | 443 | ||
614 | 569 | class account_voucher(osv.osv): | 444 | |
615 | 445 | class account_voucher(orm.Model): | ||
616 | 570 | _inherit = 'account.voucher' | 446 | _inherit = 'account.voucher' |
617 | 571 | 447 | ||
618 | 572 | def _get_period(self, cr, uid, context=None): | 448 | def _get_period(self, cr, uid, context=None): |
620 | 573 | if context is None: context = {} | 449 | if context is None: |
621 | 450 | context = {} | ||
622 | 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'): |
625 | 575 | res = self.pool.get('account.move.line').browse(cr, uid , context.get('move_line_ids'))[0].period_id.id | 452 | return self.pool.get('account.move.line').browse( |
626 | 576 | context['period_id'] = res | 453 | cr, uid , context.get('move_line_ids'))[0].period_id.id |
627 | 577 | return super(account_voucher, self)._get_period(cr, uid, context) | 454 | return super(account_voucher, self)._get_period(cr, uid, context) |
628 | 578 | 455 | ||
629 | 579 | def create(self, cr, uid, values, context=None): | ||
630 | 580 | if values.get('period_id') == False and context.get('move_line_ids'): | ||
631 | 581 | values['period_id'] = self._get_period(cr, uid, context) | ||
632 | 582 | return super(account_voucher, self).create(cr, uid, values, context) | ||
633 | 583 | |||
634 | 584 | account_voucher() | 456 | account_voucher() |
635 | 585 | 457 | ||
637 | 586 | class account_bank_statement_line(osv.osv): | 458 | |
638 | 459 | class account_bank_statement_line(orm.Model): | ||
639 | 587 | ''' | 460 | ''' |
640 | 588 | Extension on basic class: | 461 | Extension on basic class: |
641 | 589 | 1. Extra links to account.period and res.partner.bank for tracing and | 462 | 1. Extra links to account.period and res.partner.bank for tracing and |
642 | 590 | matching. | 463 | matching. |
643 | 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. |
648 | 592 | 3. Extra 'international' flag to indicate the missing of a remote | 465 | 3. Readonly states for most fields except when in draft. |
645 | 593 | account number. Some banks use seperate international banking | ||
646 | 594 | modules that do not integrate with the standard transaction files. | ||
647 | 595 | 4. Readonly states for most fields except when in draft. | ||
649 | 596 | ''' | 466 | ''' |
650 | 597 | _inherit = 'account.bank.statement.line' | 467 | _inherit = 'account.bank.statement.line' |
651 | 598 | _description = 'Bank Transaction' | 468 | _description = 'Bank Transaction' |
652 | @@ -602,26 +472,6 @@ | |||
653 | 602 | periods = self.pool.get('account.period').find(cursor, user, dt=date) | 472 | periods = self.pool.get('account.period').find(cursor, user, dt=date) |
654 | 603 | return periods and periods[0] or False | 473 | return periods and periods[0] or False |
655 | 604 | 474 | ||
656 | 605 | def _seems_international(self, cursor, user, context=None): | ||
657 | 606 | ''' | ||
658 | 607 | Some banks have seperate international banking modules which do not | ||
659 | 608 | translate correctly into the national formats. Instead, they | ||
660 | 609 | leave key fields blank and signal this anomaly with a special | ||
661 | 610 | transfer type. | ||
662 | 611 | With the introduction of SEPA, this may worsen greatly, as SEPA | ||
663 | 612 | payments are considered to be analogous to international payments | ||
664 | 613 | by most local formats. | ||
665 | 614 | ''' | ||
666 | 615 | # Quick and dirty check: if remote bank account is missing, assume | ||
667 | 616 | # international transfer | ||
668 | 617 | return not ( | ||
669 | 618 | context.get('partner_bank_id') and context['partner_bank_id'] | ||
670 | 619 | ) | ||
671 | 620 | # Not so dirty check: check if partner_id is set. If it is, check the | ||
672 | 621 | # default/invoice addresses country. If it is the same as our | ||
673 | 622 | # company's, its local, else international. | ||
674 | 623 | # TODO: to be done | ||
675 | 624 | |||
676 | 625 | def _get_currency(self, cursor, user, context=None): | 475 | def _get_currency(self, cursor, user, context=None): |
677 | 626 | ''' | 476 | ''' |
678 | 627 | Get the default currency (required to allow other modules to function, | 477 | Get the default currency (required to allow other modules to function, |
679 | @@ -633,30 +483,6 @@ | |||
680 | 633 | return res_users_obj.browse(cursor, user, user, | 483 | return res_users_obj.browse(cursor, user, user, |
681 | 634 | context=context).company_id.currency_id.id | 484 | context=context).company_id.currency_id.id |
682 | 635 | 485 | ||
683 | 636 | #def _reconcile_amount(self, cursor, user, ids, name, args, context=None): | ||
684 | 637 | # ''' | ||
685 | 638 | # Redefinition from the original: don't use the statements currency, but | ||
686 | 639 | # the transactions currency. | ||
687 | 640 | # ''' | ||
688 | 641 | # if not ids: | ||
689 | 642 | # return {} | ||
690 | 643 | |||
691 | 644 | # res_currency_obj = self.pool.get('res.currency') | ||
692 | 645 | # res_users_obj = self.pool.get('res.users') | ||
693 | 646 | |||
694 | 647 | # res = {} | ||
695 | 648 | # company_currency_id = res_users_obj.browse(cursor, user, user, | ||
696 | 649 | # context=context).company_id.currency_id.id | ||
697 | 650 | |||
698 | 651 | # for line in self.browse(cursor, user, ids, context=context): | ||
699 | 652 | # if line.reconcile_id: | ||
700 | 653 | # res[line.id] = res_currency_obj.compute(cursor, user, | ||
701 | 654 | # company_currency_id, line.currency.id, | ||
702 | 655 | # line.reconcile_id.total_entry, context=context) | ||
703 | 656 | # else: | ||
704 | 657 | # res[line.id] = 0.0 | ||
705 | 658 | # return res | ||
706 | 659 | |||
707 | 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): |
708 | 661 | res = {} | 487 | res = {} |
709 | 662 | for st_line in self.browse(cr, uid, ids, context): | 488 | for st_line in self.browse(cr, uid, ids, context): |
710 | @@ -674,7 +500,7 @@ | |||
711 | 674 | return res | 500 | return res |
712 | 675 | 501 | ||
713 | 676 | _columns = { | 502 | _columns = { |
715 | 677 | # Redefines | 503 | # Redefines. Todo: refactor away to view attrs |
716 | 678 | 'amount': fields.float('Amount', readonly=True, | 504 | 'amount': fields.float('Amount', readonly=True, |
717 | 679 | digits_compute=dp.get_precision('Account'), | 505 | digits_compute=dp.get_precision('Account'), |
718 | 680 | states={'draft': [('readonly', False)]}), | 506 | states={'draft': [('readonly', False)]}), |
719 | @@ -684,8 +510,6 @@ | |||
720 | 684 | states={'draft': [('readonly', False)]}), | 510 | states={'draft': [('readonly', False)]}), |
721 | 685 | 'date': fields.date('Date', required=True, readonly=True, | 511 | 'date': fields.date('Date', required=True, readonly=True, |
722 | 686 | states={'draft': [('readonly', False)]}), | 512 | states={'draft': [('readonly', False)]}), |
723 | 687 | #'reconcile_amount': fields.function(_reconcile_amount, | ||
724 | 688 | # string='Amount reconciled', method=True, type='float'), | ||
725 | 689 | 513 | ||
726 | 690 | # New columns | 514 | # New columns |
727 | 691 | 'trans': fields.char('Bank Transaction ID', size=15, required=False, | 515 | 'trans': fields.char('Bank Transaction ID', size=15, required=False, |
728 | @@ -700,12 +524,6 @@ | |||
729 | 700 | states={'confirmed': [('readonly', True)]}), | 524 | states={'confirmed': [('readonly', True)]}), |
730 | 701 | 'currency': fields.many2one('res.currency', 'Currency', required=True, | 525 | 'currency': fields.many2one('res.currency', 'Currency', required=True, |
731 | 702 | states={'confirmed': [('readonly', True)]}), | 526 | states={'confirmed': [('readonly', True)]}), |
732 | 703 | |||
733 | 704 | # Not used yet, but usefull in the future. | ||
734 | 705 | 'international': fields.boolean('International Transaction', | ||
735 | 706 | required=False, | ||
736 | 707 | states={'confirmed': [('readonly', True)]}, | ||
737 | 708 | ), | ||
738 | 709 | 'reconcile_id': fields.many2one( | 527 | 'reconcile_id': fields.many2one( |
739 | 710 | 'account.move.reconcile', 'Reconciliation', readonly=True | 528 | 'account.move.reconcile', 'Reconciliation', readonly=True |
740 | 711 | ), | 529 | ), |
741 | @@ -717,14 +535,13 @@ | |||
742 | 717 | 535 | ||
743 | 718 | _defaults = { | 536 | _defaults = { |
744 | 719 | 'period_id': _get_period, | 537 | 'period_id': _get_period, |
745 | 720 | 'international': _seems_international, | ||
746 | 721 | 'currency': _get_currency, | 538 | 'currency': _get_currency, |
747 | 722 | } | 539 | } |
748 | 723 | 540 | ||
749 | 724 | account_bank_statement_line() | 541 | account_bank_statement_line() |
750 | 725 | 542 | ||
751 | 726 | 543 | ||
753 | 727 | class res_partner_bank(osv.osv): | 544 | class res_partner_bank(orm.Model): |
754 | 728 | ''' | 545 | ''' |
755 | 729 | This is a hack to circumvent the very limited but widely used base_iban | 546 | This is a hack to circumvent the very limited but widely used base_iban |
756 | 730 | dependency. The usage of __mro__ requires inside information of | 547 | dependency. The usage of __mro__ requires inside information of |
757 | @@ -754,15 +571,13 @@ | |||
758 | 754 | self._founder.__init__(*args, **kwargs) | 571 | self._founder.__init__(*args, **kwargs) |
759 | 755 | mro = self.__class__.__mro__ | 572 | mro = self.__class__.__mro__ |
760 | 756 | for i in range(len(mro)): | 573 | for i in range(len(mro)): |
762 | 757 | if mro[i].__module__.startswith('base.'): | 574 | if mro[i].__module__.startswith('openerp.addons.base.'): |
763 | 758 | self._founder = mro[i] | 575 | self._founder = mro[i] |
764 | 759 | break | 576 | break |
765 | 760 | 577 | ||
766 | 761 | def init(self, cr): | 578 | def init(self, cr): |
767 | 762 | ''' | 579 | ''' |
768 | 763 | Update existing iban accounts to comply to new regime | 580 | Update existing iban accounts to comply to new regime |
769 | 764 | Note that usage of the ORM is not possible here, as the ORM cannot | ||
770 | 765 | search on values not provided by the client. | ||
771 | 766 | ''' | 581 | ''' |
772 | 767 | 582 | ||
773 | 768 | partner_bank_obj = self.pool.get('res.partner.bank') | 583 | partner_bank_obj = self.pool.get('res.partner.bank') |
774 | @@ -795,10 +610,11 @@ | |||
775 | 795 | Create dual function IBAN account for SEPA countries | 610 | Create dual function IBAN account for SEPA countries |
776 | 796 | ''' | 611 | ''' |
777 | 797 | if vals.get('state') == 'iban': | 612 | if vals.get('state') == 'iban': |
779 | 798 | iban = vals.get('acc_number',False) or vals.get('acc_number_domestic',False) | 613 | iban = (vals.get('acc_number') |
780 | 614 | or vals.get('acc_number_domestic', False)) | ||
781 | 799 | vals['acc_number'], vals['acc_number_domestic'] = ( | 615 | vals['acc_number'], vals['acc_number_domestic'] = ( |
782 | 800 | self._correct_IBAN(iban)) | 616 | self._correct_IBAN(iban)) |
784 | 801 | return self._founder.create(cursor, uid, vals, context) | 617 | return self._founder.create(self, cursor, uid, vals, context) |
785 | 802 | 618 | ||
786 | 803 | def write(self, cr, uid, ids, vals, context=None): | 619 | def write(self, cr, uid, ids, vals, context=None): |
787 | 804 | ''' | 620 | ''' |
788 | @@ -818,7 +634,7 @@ | |||
789 | 818 | self._correct_IBAN(account['acc_number'])) | 634 | self._correct_IBAN(account['acc_number'])) |
790 | 819 | else: | 635 | else: |
791 | 820 | vals['acc_number_domestic'] = False | 636 | vals['acc_number_domestic'] = False |
793 | 821 | self._founder.write(cr, uid, account['id'], vals, context) | 637 | self._founder.write(self, cr, uid, account['id'], vals, context) |
794 | 822 | return True | 638 | return True |
795 | 823 | 639 | ||
796 | 824 | def search(self, cursor, uid, args, *rest, **kwargs): | 640 | def search(self, cursor, uid, args, *rest, **kwargs): |
797 | @@ -880,10 +696,9 @@ | |||
798 | 880 | # Extend search filter | 696 | # Extend search filter |
799 | 881 | newargs = extended_search_expression(args) | 697 | newargs = extended_search_expression(args) |
800 | 882 | 698 | ||
805 | 883 | # Original search (_founder) | 699 | # Original search |
806 | 884 | results = self._founder.search(cursor, uid, newargs, | 700 | results = super(res_partner_bank, self).search( |
807 | 885 | *rest, **kwargs | 701 | cursor, uid, newargs, *rest, **kwargs) |
804 | 886 | ) | ||
808 | 887 | return results | 702 | return results |
809 | 888 | 703 | ||
810 | 889 | def read( | 704 | def read( |
811 | @@ -894,7 +709,7 @@ | |||
812 | 894 | ''' | 709 | ''' |
813 | 895 | if fields and 'state' not in fields: | 710 | if fields and 'state' not in fields: |
814 | 896 | fields.append('state') | 711 | fields.append('state') |
816 | 897 | records = self._founder.read(cr, uid, ids, fields, context, load) | 712 | records = self._founder.read(self, cr, uid, ids, fields, context, load) |
817 | 898 | is_list = True | 713 | is_list = True |
818 | 899 | if not isinstance(records, list): | 714 | if not isinstance(records, list): |
819 | 900 | records = [records,] | 715 | records = [records,] |
820 | @@ -954,6 +769,9 @@ | |||
821 | 954 | Trigger to find IBAN. When found: | 769 | Trigger to find IBAN. When found: |
822 | 955 | 1. Reformat BBAN | 770 | 1. Reformat BBAN |
823 | 956 | 2. Autocomplete bank | 771 | 2. Autocomplete bank |
824 | 772 | |||
825 | 773 | TODO: prevent unnecessary assignment of country_ids and | ||
826 | 774 | browsing of the country | ||
827 | 957 | ''' | 775 | ''' |
828 | 958 | if not acc_number: | 776 | if not acc_number: |
829 | 959 | return {} | 777 | return {} |
830 | @@ -1013,6 +831,7 @@ | |||
831 | 1013 | if country_ids: | 831 | if country_ids: |
832 | 1014 | country = country_obj.browse( | 832 | country = country_obj.browse( |
833 | 1015 | cursor, uid, country_ids[0], context=context) | 833 | cursor, uid, country_ids[0], context=context) |
834 | 834 | values['country_id'] = country_ids[0] | ||
835 | 1016 | if country and country.code in sepa.IBAN.countries: | 835 | if country and country.code in sepa.IBAN.countries: |
836 | 1017 | try: | 836 | try: |
837 | 1018 | info = sepa.online.account_info(country.code, acc_number) | 837 | info = sepa.online.account_info(country.code, acc_number) |
838 | @@ -1027,9 +846,8 @@ | |||
839 | 1027 | info.bic or iban_acc.BIC_searchkey, | 846 | info.bic or iban_acc.BIC_searchkey, |
840 | 1028 | name = info.bank | 847 | name = info.bank |
841 | 1029 | ) | 848 | ) |
845 | 1030 | values['country_id'] = country_id or \ | 849 | if country_id: |
846 | 1031 | country_ids and country_ids[0] or \ | 850 | values['country_id'] = country_id |
844 | 1032 | False | ||
847 | 1033 | values['bank'] = bank_id or False | 851 | values['bank'] = bank_id or False |
848 | 1034 | if info.bic: | 852 | if info.bic: |
849 | 1035 | values['bank_bic'] = info.bic | 853 | values['bank_bic'] = info.bic |
850 | @@ -1038,8 +856,8 @@ | |||
851 | 1038 | if info is None: | 856 | if info is None: |
852 | 1039 | result.update(warning( | 857 | result.update(warning( |
853 | 1040 | _('Invalid data'), | 858 | _('Invalid data'), |
856 | 1041 | _('The account number appears to be invalid for %(country)s') | 859 | _('The account number appears to be invalid for %s') |
857 | 1042 | % {'country': country.name} | 860 | % country.name |
858 | 1043 | )) | 861 | )) |
859 | 1044 | except NotImplementedError: | 862 | except NotImplementedError: |
860 | 1045 | if country.code in sepa.IBAN.countries: | 863 | if country.code in sepa.IBAN.countries: |
861 | @@ -1049,8 +867,8 @@ | |||
862 | 1049 | else: | 867 | else: |
863 | 1050 | result.update(warning( | 868 | result.update(warning( |
864 | 1051 | _('Invalid format'), | 869 | _('Invalid format'), |
867 | 1052 | _('The account number has the wrong format for %(country)s') | 870 | _('The account number has the wrong format for %s') |
868 | 1053 | % {'country': country.name} | 871 | % country.name |
869 | 1054 | )) | 872 | )) |
870 | 1055 | return result | 873 | return result |
871 | 1056 | 874 | ||
872 | @@ -1083,15 +901,10 @@ | |||
873 | 1083 | _("The IBAN number doesn't seem to be correct") | 901 | _("The IBAN number doesn't seem to be correct") |
874 | 1084 | ) | 902 | ) |
875 | 1085 | 903 | ||
876 | 1086 | _constraints = [ | ||
877 | 1087 | # Cannot have this as a constraint as it is rejecting valid numbers from GB and DE | ||
878 | 1088 | # It works much better without this constraint! | ||
879 | 1089 | #(check_iban, _("The IBAN number doesn't seem to be correct"), ["acc_number"]) | ||
880 | 1090 | ] | ||
881 | 1091 | |||
882 | 1092 | res_partner_bank() | 904 | res_partner_bank() |
883 | 1093 | 905 | ||
885 | 1094 | class res_bank(osv.osv): | 906 | |
886 | 907 | class res_bank(orm.Model): | ||
887 | 1095 | ''' | 908 | ''' |
888 | 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 |
889 | 1097 | online SWIFT database. Allow hand filled names to overrule SWIFT names. | 910 | online SWIFT database. Allow hand filled names to overrule SWIFT names. |
890 | @@ -1134,7 +947,8 @@ | |||
891 | 1134 | 947 | ||
892 | 1135 | res_bank() | 948 | res_bank() |
893 | 1136 | 949 | ||
895 | 1137 | class invoice(osv.osv): | 950 | |
896 | 951 | class invoice(orm.Model): | ||
897 | 1138 | ''' | 952 | ''' |
898 | 1139 | Create other reference types as well. | 953 | Create other reference types as well. |
899 | 1140 | 954 | ||
900 | @@ -1147,6 +961,9 @@ | |||
901 | 1147 | 961 | ||
902 | 1148 | Don't forget to redefine the column "reference_type" as below or | 962 | Don't forget to redefine the column "reference_type" as below or |
903 | 1149 | your method will never be triggered. | 963 | your method will never be triggered. |
904 | 964 | |||
905 | 965 | TODO: move 'structured' part to account_banking_payment module | ||
906 | 966 | where it belongs | ||
907 | 1150 | ''' | 967 | ''' |
908 | 1151 | _inherit = 'account.invoice' | 968 | _inherit = 'account.invoice' |
909 | 1152 | 969 | ||
910 | @@ -1176,13 +993,16 @@ | |||
911 | 1176 | 993 | ||
912 | 1177 | invoice() | 994 | invoice() |
913 | 1178 | 995 | ||
915 | 1179 | class account_move_line(osv.osv): | 996 | |
916 | 997 | class account_move_line(orm.Model): | ||
917 | 1180 | _inherit = "account.move.line" | 998 | _inherit = "account.move.line" |
918 | 1181 | 999 | ||
919 | 1182 | def get_balance(self, cr, uid, ids, context=None): | 1000 | def get_balance(self, cr, uid, ids, context=None): |
920 | 1183 | """ | 1001 | """ |
921 | 1184 | Return the balance of any set of move lines. | 1002 | Return the balance of any set of move lines. |
923 | 1185 | Surely this exists somewhere in account base, but I missed it. | 1003 | |
924 | 1004 | Not to be confused with the 'balance' field on this model, which | ||
925 | 1005 | returns the account balance that the move line applies to. | ||
926 | 1186 | """ | 1006 | """ |
927 | 1187 | total = 0.0 | 1007 | total = 0.0 |
928 | 1188 | if not ids: | 1008 | if not ids: |
929 | 1189 | 1009 | ||
930 | === modified file 'account_banking/account_banking_view.xml' | |||
931 | --- account_banking/account_banking_view.xml 2013-05-06 14:07:27 +0000 | |||
932 | +++ account_banking/account_banking_view.xml 2013-05-06 14:07:28 +0000 | |||
933 | @@ -134,16 +134,7 @@ | |||
934 | 134 | </tree> | 134 | </tree> |
935 | 135 | </field> | 135 | </field> |
936 | 136 | </record> | 136 | </record> |
947 | 137 | <record id="view_account_banking_imported_line_search" model="ir.ui.view"> | 137 | |
938 | 138 | <field name="name">account.banking.imported.line.search</field> | ||
939 | 139 | <field name="model">account.bank.imported.line</field> | ||
940 | 140 | <field name="type">search</field> | ||
941 | 141 | <field name="arch" type="xml"> | ||
942 | 142 | <search string="Search Bank Statement files"> | ||
943 | 143 | <field name="company_id" /> | ||
944 | 144 | </search> | ||
945 | 145 | </field> | ||
946 | 146 | </record> | ||
948 | 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"> |
949 | 148 | <field name="name">Imported Bank Statements Files</field> | 139 | <field name="name">Imported Bank Statements Files</field> |
950 | 149 | <field name="type">ir.actions.act_window</field> | 140 | <field name="type">ir.actions.act_window</field> |
951 | @@ -193,7 +184,12 @@ | |||
952 | 193 | <field name="model">account.bank.statement</field> | 184 | <field name="model">account.bank.statement</field> |
953 | 194 | <field name="type">tree</field> | 185 | <field name="type">tree</field> |
954 | 195 | <field name="arch" type="xml"> | 186 | <field name="arch" type="xml"> |
956 | 196 | <field name="period_id" position="replace"/> | 187 | <!-- Remove period from bank statement --> |
957 | 188 | <field name="period_id" position="replace"> | ||
958 | 189 | <!-- Add invisible column for identification of import file | ||
959 | 190 | --> | ||
960 | 191 | <field name="banking_id" invisible="True" /> | ||
961 | 192 | </field> | ||
962 | 197 | </field> | 193 | </field> |
963 | 198 | </record> | 194 | </record> |
964 | 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"> |
965 | @@ -204,92 +200,52 @@ | |||
966 | 204 | <field name="type">form</field> | 200 | <field name="type">form</field> |
967 | 205 | <field name="arch" type="xml"> | 201 | <field name="arch" type="xml"> |
968 | 206 | <data> | 202 | <data> |
969 | 203 | <page string="Transactions" position="after"> | ||
970 | 204 | <page string="Journal Entries" name="move_live_ids"> | ||
971 | 205 | <field colspan="4" name="move_line_ids" nolabel="1"/> | ||
972 | 206 | </page> | ||
973 | 207 | </page> | ||
974 | 207 | <field name="period_id" position="replace"/> | 208 | <field name="period_id" position="replace"/> |
976 | 208 | <xpath expr="/form/notebook/page[@string='Transaction']/field/tree" position="attributes"> | 209 | |
977 | 210 | <xpath expr="//page[@string='Transactions']/field/tree" | ||
978 | 211 | position="attributes"> | ||
979 | 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> |
980 | 210 | </xpath> | 213 | </xpath> |
1059 | 211 | <xpath expr="/form/notebook/page[@string='Transaction']/field/tree/field[@name='name']" position="replace"> | 214 | |
1060 | 212 | <field name="name" required="1"/> | 215 | <xpath expr="//field[@name='line_ids']/tree/field[@name='name']" |
1061 | 213 | </xpath> | 216 | position="attributes"> |
1062 | 214 | <xpath expr="/form/notebook/page[@string='Transaction']/field/form/field[@name='name']" position="replace"> | 217 | <attribute name="required">1</attribute> |
1063 | 215 | <field name="name" required="1"/> | 218 | </xpath> |
1064 | 216 | </xpath> | 219 | |
1065 | 217 | </data> | 220 | <xpath expr="//field[@name='line_ids']/form//field[@name='name']" |
1066 | 218 | </field> | 221 | position="attributes"> |
1067 | 219 | </record> | 222 | <attribute name="required">1</attribute> |
1068 | 220 | <record id="view_banking_bank_statement_form_2" model="ir.ui.view"> | 223 | </xpath> |
1069 | 221 | <field name="name">account.bank.statement.form.banking-2</field> | 224 | |
1070 | 222 | <field name="inherit_id" ref="account.view_bank_statement_form" /> | 225 | <!-- Add invisible field for identification of import file |
1071 | 223 | <field name="model">account.bank.statement</field> | 226 | on bank statements |
1072 | 224 | <field name="type">form</field> | 227 | --> |
1073 | 225 | <field name="arch" type="xml"> | 228 | <field name="balance_end_real" position="after"> |
1074 | 226 | <xpath expr="/form/notebook/page[@string='Transaction']/field/tree/field[@name='ref']" position="after"> | 229 | <field name="banking_id" invisible="True"/> |
1075 | 227 | <field name="period_id"/> | 230 | </field> |
1076 | 228 | </xpath> | 231 | |
1077 | 229 | </field> | 232 | <!-- Show bank accounts in account_bank_statement_line to |
1078 | 230 | </record> | 233 | enable manualcoupling of bank account numbers to |
1079 | 231 | <record id="view_banking_bank_statement_form_3" model="ir.ui.view"> | 234 | statement lines and harvest info for future matching |
1080 | 232 | <field name="name">account.bank.statement.form.banking-3</field> | 235 | in the process. |
1081 | 233 | <field name="inherit_id" ref="account.view_bank_statement_form" /> | 236 | --> |
1082 | 234 | <field name="model">account.bank.statement</field> | 237 | <xpath expr="//field[@name='line_ids']/tree/field[@name='partner_id']" |
1083 | 235 | <field name="type">form</field> | 238 | position="after"> |
1006 | 236 | <field name="arch" type="xml"> | ||
1007 | 237 | <data> | ||
1008 | 238 | <xpath expr="/form/notebook/page[@string='Transaction']/field/form/field[@name='ref']" position="after"> | ||
1009 | 239 | <field name="period_id"/> | ||
1010 | 240 | <field name="match_type"/> | ||
1011 | 241 | <field name="match_multi"/> | ||
1012 | 242 | <field name="duplicate"/> | ||
1013 | 243 | </xpath> | ||
1014 | 244 | </data> | ||
1015 | 245 | </field> | ||
1016 | 246 | </record> | ||
1017 | 247 | |||
1018 | 248 | <!-- Add invisible column on bank statements tree for identification | ||
1019 | 249 | of import file | ||
1020 | 250 | --> | ||
1021 | 251 | <record id="view_banking_bank_statement_tree_2" model="ir.ui.view"> | ||
1022 | 252 | <field name="name">account.bank.statement.tree.banking-2</field> | ||
1023 | 253 | <field name="inherit_id" ref="account.view_bank_statement_tree" /> | ||
1024 | 254 | <field name="model">account.bank.statement</field> | ||
1025 | 255 | <field name="type">tree</field> | ||
1026 | 256 | <field name="arch" type="xml"> | ||
1027 | 257 | <field name="state" position="after"> | ||
1028 | 258 | <field name="banking_id" invisible="True" /> | ||
1029 | 259 | </field> | ||
1030 | 260 | </field> | ||
1031 | 261 | </record> | ||
1032 | 262 | |||
1033 | 263 | <!-- Add invisible field for identification of import file on bank statements | ||
1034 | 264 | --> | ||
1035 | 265 | <record id="view_banking_bank_statement_form_4" model="ir.ui.view"> | ||
1036 | 266 | <field name="name">account.bank.statement.form.banking-4</field> | ||
1037 | 267 | <field name="inherit_id" ref="account.view_bank_statement_form" /> | ||
1038 | 268 | <field name="model">account.bank.statement</field> | ||
1039 | 269 | <field name="type">form</field> | ||
1040 | 270 | <field name="arch" type="xml"> | ||
1041 | 271 | <field name="balance_end_real" position="after"> | ||
1042 | 272 | <field name="banking_id" invisible="True"/> | ||
1043 | 273 | </field> | ||
1044 | 274 | </field> | ||
1045 | 275 | </record> | ||
1046 | 276 | |||
1047 | 277 | <!-- Show bank accounts in account_bank_statement_line to enable manual | ||
1048 | 278 | coupling of bank account numbers to statement lines and harvest info | ||
1049 | 279 | for future matching in the process. | ||
1050 | 280 | --> | ||
1051 | 281 | <record id="view_banking_bank_statement_form_5" model="ir.ui.view"> | ||
1052 | 282 | <field name="name">account.bank.statement.form.banking-5</field> | ||
1053 | 283 | <field name="inherit_id" ref="account.view_bank_statement_form" /> | ||
1054 | 284 | <field name="model">account.bank.statement</field> | ||
1055 | 285 | <field name="type">form</field> | ||
1056 | 286 | <field name="arch" type="xml"> | ||
1057 | 287 | <data> | ||
1058 | 288 | <xpath expr="/form/notebook/page/field[@name='line_ids']/tree/field[@name='partner_id']" position="after"> | ||
1084 | 289 | <!-- TODO set partner_id when partner_bank_id changes --> | 239 | <!-- TODO set partner_id when partner_bank_id changes --> |
1085 | 290 | <field name="partner_bank_id"/> | 240 | <field name="partner_bank_id"/> |
1086 | 291 | </xpath> | 241 | </xpath> |
1088 | 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']" |
1089 | 243 | position="after"> | ||
1090 | 244 | <field name="partner_bank_id"/> | ||
1091 | 245 | </xpath> | ||
1092 | 246 | |||
1093 | 247 | <xpath expr="//field[@name='line_ids']/tree/field[@name='amount']" | ||
1094 | 248 | position="after"> | ||
1095 | 293 | <field name="match_type"/> | 249 | <field name="match_type"/> |
1096 | 294 | <field name="residual"/> | 250 | <field name="residual"/> |
1097 | 295 | <button name="match_wizard" states="draft" | 251 | <button name="match_wizard" states="draft" |
1098 | @@ -310,7 +266,9 @@ | |||
1099 | 310 | <field name="invoice_id"/> | 266 | <field name="invoice_id"/> |
1100 | 311 | <field name="reconcile_id"/> | 267 | <field name="reconcile_id"/> |
1101 | 312 | </xpath> | 268 | </xpath> |
1103 | 313 | <xpath expr="/form/notebook/page/field[@name='line_ids']/form/field[@name='amount']" position="after"> | 269 | |
1104 | 270 | <xpath expr="//field[@name='line_ids']/form//field[@name='amount']" | ||
1105 | 271 | position="after"> | ||
1106 | 314 | <field name="state"/> | 272 | <field name="state"/> |
1107 | 315 | <field name="invoice_id"/> | 273 | <field name="invoice_id"/> |
1108 | 316 | <field name="reconcile_id"/> | 274 | <field name="reconcile_id"/> |
1109 | @@ -318,30 +276,7 @@ | |||
1110 | 318 | </data> | 276 | </data> |
1111 | 319 | </field> | 277 | </field> |
1112 | 320 | </record> | 278 | </record> |
1113 | 321 | <record id="view_banking_bank_statement_form_6" model="ir.ui.view"> | ||
1114 | 322 | <field name="name">account.bank.statement.form.banking-6</field> | ||
1115 | 323 | <field name="inherit_id" ref="account.view_bank_statement_form" /> | ||
1116 | 324 | <field name="model">account.bank.statement</field> | ||
1117 | 325 | <field name="type">form</field> | ||
1118 | 326 | <field name="arch" type="xml"> | ||
1119 | 327 | <xpath expr="/form/notebook/page/field[@name='line_ids']/form/field[@name='partner_id']" position="after"> | ||
1120 | 328 | <field name="partner_bank_id"/> | ||
1121 | 329 | </xpath> | ||
1122 | 330 | </field> | ||
1123 | 331 | </record> | ||
1124 | 332 | 279 | ||
1125 | 333 | <!-- Set trigger on IBAN and acc_number fields in res_partner_bank form --> | ||
1126 | 334 | <!--record id="view_partner_bank_account_banking_form_1" model="ir.ui.view"> | ||
1127 | 335 | <field name="name">res.partner.bank.form.banking-1</field> | ||
1128 | 336 | <field name="model">res.partner.bank</field> | ||
1129 | 337 | <field name="inherit_id" ref="base_iban.view_partner_bank_iban_form"/> | ||
1130 | 338 | <field name="type">form</field> | ||
1131 | 339 | <field name="arch" type="xml"> | ||
1132 | 340 | <field name="iban" position="replace"> | ||
1133 | 341 | <field name="iban" on_change="onchange_iban(iban)" /> | ||
1134 | 342 | </field> | ||
1135 | 343 | </field> | ||
1136 | 344 | </record--> | ||
1137 | 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"> |
1138 | 346 | <field name="name">res.partner.bank.form.banking-2</field> | 281 | <field name="name">res.partner.bank.form.banking-2</field> |
1139 | 347 | <field name="model">res.partner.bank</field> | 282 | <field name="model">res.partner.bank</field> |
1140 | @@ -360,53 +295,6 @@ | |||
1141 | 360 | </field> | 295 | </field> |
1142 | 361 | </record> | 296 | </record> |
1143 | 362 | 297 | ||
1144 | 363 | <!-- Set trigger on IBAN and acc_number field in res_partner form --> | ||
1145 | 364 | <!--record id="view_partner_account_banking_form_1" model="ir.ui.view"> | ||
1146 | 365 | <field name="name">res.partner.form.banking-1</field> | ||
1147 | 366 | <field name="model">res.partner</field> | ||
1148 | 367 | <field name="inherit_id" ref="base_iban.view_partner_iban_form"/> | ||
1149 | 368 | <field name="type">form</field> | ||
1150 | 369 | <field name="arch" type="xml"> | ||
1151 | 370 | <field name="iban" position="replace"> | ||
1152 | 371 | <field name="iban" on_change="onchange_iban(iban)" /> | ||
1153 | 372 | </field> | ||
1154 | 373 | </field> | ||
1155 | 374 | </record--> | ||
1156 | 375 | <record id="view_partner_account_banking_form_2" model="ir.ui.view"> | ||
1157 | 376 | <field name="name">res.partner.form.banking-2</field> | ||
1158 | 377 | <field name="model">res.partner</field> | ||
1159 | 378 | <field name="inherit_id" ref="account.view_partner_property_form"/> | ||
1160 | 379 | <field name="priority" eval="24"/> | ||
1161 | 380 | <field name="type">form</field> | ||
1162 | 381 | <field name="arch" type="xml"> | ||
1163 | 382 | <data> | ||
1164 | 383 | <field name="acc_number" position="attributes"> | ||
1165 | 384 | <attribute name="on_change">onchange_acc_number(acc_number, acc_number_domestic, state, partner_id, country_id)</attribute> | ||
1166 | 385 | </field> | ||
1167 | 386 | <field name="acc_number_domestic" position="attributes"> | ||
1168 | 387 | <attribute name="on_change">onchange_domestic(acc_number_domestic, partner_id, country_id)</attribute> | ||
1169 | 388 | </field> | ||
1170 | 389 | </data> | ||
1171 | 390 | </field> | ||
1172 | 391 | </record> | ||
1173 | 392 | <record id="view_partner_account_banking_form_3" model="ir.ui.view"> | ||
1174 | 393 | <field name="name">res.partner.form.banking-3</field> | ||
1175 | 394 | <field name="model">res.partner</field> | ||
1176 | 395 | <field name="inherit_id" ref="account.view_partner_property_form"/> | ||
1177 | 396 | <field name="priority" eval="24"/> | ||
1178 | 397 | <field name="type">form</field> | ||
1179 | 398 | <field name="arch" type="xml"> | ||
1180 | 399 | <data> | ||
1181 | 400 | <field name="acc_number" position="attributes"> | ||
1182 | 401 | <attribute name="on_change">onchange_acc_number(acc_number, acc_number_domestic, state, partner_id, country_id)</attribute> | ||
1183 | 402 | </field> | ||
1184 | 403 | <field name="acc_number_domestic" position="attributes"> | ||
1185 | 404 | <attribute name="on_change">onchange_domestic(acc_number_domestic, partner_id, country_id)</attribute> | ||
1186 | 405 | </field> | ||
1187 | 406 | </data> | ||
1188 | 407 | </field> | ||
1189 | 408 | </record> | ||
1190 | 409 | |||
1191 | 410 | <!-- Set trigger on BIC in res_bank form --> | 298 | <!-- Set trigger on BIC in res_bank form --> |
1192 | 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"> |
1193 | 412 | <field name="name">res.bank.form.banking-1</field> | 300 | <field name="name">res.bank.form.banking-1</field> |
1194 | @@ -438,25 +326,25 @@ | |||
1195 | 438 | <field domain="[('journal_id','=',parent.journal_id)]" name="account_id"/> | 326 | <field domain="[('journal_id','=',parent.journal_id)]" name="account_id"/> |
1196 | 439 | <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]"/> | 327 | <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]"/> |
1197 | 440 | <field name="amount"/> | 328 | <field name="amount"/> |
1217 | 441 | <field name="match_type"/> | 329 | <field name="match_type"/> |
1218 | 442 | <field name="residual"/> | 330 | <field name="residual"/> |
1219 | 443 | <button name="match_wizard" states="draft" | 331 | <button name="match_wizard" states="draft" |
1220 | 444 | string="Match" | 332 | string="Match" |
1221 | 445 | icon="terp-gtk-jump-to-ltr" | 333 | icon="terp-gtk-jump-to-ltr" |
1222 | 446 | type="object"/> | 334 | type="object"/> |
1223 | 447 | <field name="match_multi" invisible="1"/> | 335 | <field name="match_multi" invisible="1"/> |
1224 | 448 | <field name="duplicate" invisible="1"/> | 336 | <field name="duplicate" invisible="1"/> |
1225 | 449 | <field name="state"/> | 337 | <field name="state"/> |
1226 | 450 | <button name="confirm" states="draft" | 338 | <button name="confirm" states="draft" |
1227 | 451 | string="Confirm transaction" | 339 | string="Confirm transaction" |
1228 | 452 | icon="gtk-ok" | 340 | icon="gtk-ok" |
1229 | 453 | type="object"/> | 341 | type="object"/> |
1230 | 454 | <button name="cancel" states="confirmed" | 342 | <button name="cancel" states="confirmed" |
1231 | 455 | string="Cancel transaction" | 343 | string="Cancel transaction" |
1232 | 456 | icon="gtk-cancel" | 344 | icon="gtk-cancel" |
1233 | 457 | type="object"/> | 345 | type="object"/> |
1234 | 458 | <field name="invoice_id"/> | 346 | <field name="invoice_id"/> |
1235 | 459 | <field name="reconcile_id"/> | 347 | <field name="reconcile_id"/> |
1236 | 460 | </tree> | 348 | </tree> |
1237 | 461 | </field> | 349 | </field> |
1238 | 462 | </record> | 350 | </record> |
1239 | 463 | 351 | ||
1240 | === modified file 'account_banking/banking_import_transaction.py' | |||
1241 | --- account_banking/banking_import_transaction.py 2013-05-06 14:07:27 +0000 | |||
1242 | +++ account_banking/banking_import_transaction.py 2013-05-06 14:07:28 +0000 | |||
1243 | @@ -1,45 +1,42 @@ | |||
1244 | 1 | # -*- encoding: utf-8 -*- | ||
1245 | 2 | ############################################################################## | 1 | ############################################################################## |
1246 | 3 | # | 2 | # |
1247 | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). | 3 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). |
1252 | 5 | # Contributions by Kaspars Vilkens (KNdati): | 4 | # (C) 2011 Therp BV (<http://therp.nl>). |
1253 | 6 | # lenghty discussions, bugreports and bugfixes | 5 | # (C) 2011 Smile (<http://smile.fr>). |
1254 | 7 | # Refractoring (C) 2011 Therp BV (<http://therp.nl>). | 6 | # |
1255 | 8 | # (C) 2011 Smile (<http://smile.fr>). | 7 | # All other contributions are (C) by their respective contributors |
1256 | 9 | # | 8 | # |
1257 | 10 | # All Rights Reserved | 9 | # All Rights Reserved |
1258 | 11 | # | 10 | # |
1259 | 12 | # This program is free software: you can redistribute it and/or modify | 11 | # This program is free software: you can redistribute it and/or modify |
1263 | 13 | # it under the terms of the GNU General Public License as published by | 12 | # it under the terms of the GNU Affero General Public License as |
1264 | 14 | # the Free Software Foundation, either version 3 of the License, or | 13 | # published by the Free Software Foundation, either version 3 of the |
1265 | 15 | # (at your option) any later version. | 14 | # License, or (at your option) any later version. |
1266 | 16 | # | 15 | # |
1267 | 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, |
1268 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1269 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1271 | 20 | # GNU General Public License for more details. | 19 | # GNU Affero General Public License for more details. |
1272 | 21 | # | 20 | # |
1274 | 22 | # You should have received a copy of the GNU General Public License | 21 | # You should have received a copy of the GNU Affero General Public License |
1275 | 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/>. |
1276 | 24 | # | 23 | # |
1277 | 25 | ############################################################################## | 24 | ############################################################################## |
1278 | 26 | 25 | ||
1279 | 27 | from osv import osv, fields | ||
1280 | 28 | import netsvc | ||
1281 | 29 | import base64 | ||
1282 | 30 | import datetime | 26 | import datetime |
1291 | 31 | from tools import config | 27 | from openerp.osv import orm, fields |
1292 | 32 | from tools.translate import _ | 28 | from openerp import netsvc |
1293 | 33 | from parsers import models | 29 | from openerp.tools.translate import _ |
1294 | 34 | from parsers.convert import * | 30 | from openerp.addons.decimal_precision import decimal_precision as dp |
1295 | 35 | # from account_banking.struct import struct | 31 | from openerp.addons.account_banking.parsers import models |
1296 | 36 | from account_banking import sepa | 32 | from openerp.addons.account_banking.parsers import convert |
1297 | 37 | from wizard.banktools import * | 33 | from openerp.addons.account_banking import sepa |
1298 | 38 | import decimal_precision as dp | 34 | from openerp.addons.account_banking.wizard import banktools |
1299 | 39 | 35 | ||
1300 | 40 | bt = models.mem_bank_transaction | 36 | bt = models.mem_bank_transaction |
1301 | 41 | 37 | ||
1303 | 42 | class banking_import_transaction(osv.osv): | 38 | |
1304 | 39 | class banking_import_transaction(orm.Model): | ||
1305 | 43 | """ orm representation of mem_bank_transaction() for interactive and posthoc | 40 | """ orm representation of mem_bank_transaction() for interactive and posthoc |
1306 | 44 | configuration of reconciliation in the bank statement view. | 41 | configuration of reconciliation in the bank statement view. |
1307 | 45 | 42 | ||
1308 | @@ -245,8 +242,8 @@ | |||
1309 | 245 | candidates = [ | 242 | candidates = [ |
1310 | 246 | x for x in move_lines | 243 | x for x in move_lines |
1311 | 247 | if x.partner_id.id in partner_ids and | 244 | if x.partner_id.id in partner_ids and |
1314 | 248 | (str2date(x.date, '%Y-%m-%d') <= | 245 | (convert.str2date(x.date, '%Y-%m-%d') <= |
1315 | 249 | (str2date(trans.execution_date, '%Y-%m-%d') + | 246 | (convert.str2date(trans.execution_date, '%Y-%m-%d') + |
1316 | 250 | self.payment_window)) | 247 | self.payment_window)) |
1317 | 251 | and (not _cached(x) or _remaining(x)) | 248 | and (not _cached(x) or _remaining(x)) |
1318 | 252 | ] | 249 | ] |
1319 | @@ -267,8 +264,8 @@ | |||
1320 | 267 | candidates = [ | 264 | candidates = [ |
1321 | 268 | x for x in candidates or move_lines | 265 | x for x in candidates or move_lines |
1322 | 269 | if (x.invoice and has_id_match(x.invoice, ref, msg) and | 266 | if (x.invoice and has_id_match(x.invoice, ref, msg) and |
1325 | 270 | str2date(x.invoice.date_invoice, '%Y-%m-%d') <= | 267 | convert.str2date(x.invoice.date_invoice, '%Y-%m-%d') <= |
1326 | 271 | (str2date(trans.execution_date, '%Y-%m-%d') + | 268 | (convert.str2date(trans.execution_date, '%Y-%m-%d') + |
1327 | 272 | self.payment_window) | 269 | self.payment_window) |
1328 | 273 | and (not _cached(x) or _remaining(x))) | 270 | and (not _cached(x) or _remaining(x))) |
1329 | 274 | ] | 271 | ] |
1330 | @@ -280,8 +277,8 @@ | |||
1331 | 280 | x for x in move_lines | 277 | x for x in move_lines |
1332 | 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)) - |
1333 | 282 | trans.transferred_amount) | 279 | trans.transferred_amount) |
1336 | 283 | and str2date(x.date, '%Y-%m-%d') <= | 280 | and convert.str2date(x.date, '%Y-%m-%d') <= |
1337 | 284 | (str2date(trans.execution_date, '%Y-%m-%d') + | 281 | (convert.str2date(trans.execution_date, '%Y-%m-%d') + |
1338 | 285 | self.payment_window) | 282 | self.payment_window) |
1339 | 286 | and (not _cached(x) or _remaining(x))) | 283 | and (not _cached(x) or _remaining(x))) |
1340 | 287 | ] | 284 | ] |
1341 | @@ -296,8 +293,8 @@ | |||
1342 | 296 | best = [x for x in candidates | 293 | best = [x for x in candidates |
1343 | 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)) - |
1344 | 298 | trans.transferred_amount) | 295 | trans.transferred_amount) |
1347 | 299 | and str2date(x.date, '%Y-%m-%d') <= | 296 | and convert.str2date(x.date, '%Y-%m-%d') <= |
1348 | 300 | (str2date(trans.execution_date, '%Y-%m-%d') + | 297 | (convert.str2date(trans.execution_date, '%Y-%m-%d') + |
1349 | 301 | self.payment_window)) | 298 | self.payment_window)) |
1350 | 302 | ] | 299 | ] |
1351 | 303 | if len(best) == 1: | 300 | if len(best) == 1: |
1352 | @@ -315,8 +312,8 @@ | |||
1353 | 315 | # transfers first | 312 | # transfers first |
1354 | 316 | paid = [x for x in move_lines | 313 | paid = [x for x in move_lines |
1355 | 317 | if x.invoice and has_id_match(x.invoice, ref, msg) | 314 | if x.invoice and has_id_match(x.invoice, ref, msg) |
1358 | 318 | and str2date(x.invoice.date_invoice, '%Y-%m-%d') | 315 | and convert.str2date(x.invoice.date_invoice, '%Y-%m-%d') |
1359 | 319 | <= str2date(trans.execution_date, '%Y-%m-%d') | 316 | <= convert.str2date(trans.execution_date, '%Y-%m-%d') |
1360 | 320 | and (_cached(x) and not _remaining(x)) | 317 | and (_cached(x) and not _remaining(x)) |
1361 | 321 | ] | 318 | ] |
1362 | 322 | if paid: | 319 | if paid: |
1363 | @@ -406,7 +403,7 @@ | |||
1364 | 406 | transaction = self.browse(cr, uid, transaction_id, context) | 403 | transaction = self.browse(cr, uid, transaction_id, context) |
1365 | 407 | if not transaction.move_line_id: | 404 | if not transaction.move_line_id: |
1366 | 408 | if transaction.match_type == 'invoice': | 405 | if transaction.match_type == 'invoice': |
1368 | 409 | raise osv.except_osv( | 406 | raise orm.except_orm( |
1369 | 410 | _("Cannot link transaction %s with invoice") % | 407 | _("Cannot link transaction %s with invoice") % |
1370 | 411 | transaction.statement_line_id.name, | 408 | transaction.statement_line_id.name, |
1371 | 412 | (transaction.invoice_ids and | 409 | (transaction.invoice_ids and |
1372 | @@ -416,7 +413,7 @@ | |||
1373 | 416 | transaction.statement_line_id.name | 413 | transaction.statement_line_id.name |
1374 | 417 | ))) | 414 | ))) |
1375 | 418 | else: | 415 | else: |
1377 | 419 | raise osv.except_osv( | 416 | raise orm.except_orm( |
1378 | 420 | _("Cannot link transaction %s with accounting entry") % | 417 | _("Cannot link transaction %s with accounting entry") % |
1379 | 421 | transaction.statement_line_id.name, | 418 | transaction.statement_line_id.name, |
1380 | 422 | (transaction.move_line_ids and | 419 | (transaction.move_line_ids and |
1381 | @@ -475,7 +472,6 @@ | |||
1382 | 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, |
1383 | 476 | 'company_id': st_line.company_id.id, | 473 | 'company_id': st_line.company_id.id, |
1384 | 477 | 'type':voucher_type, | 474 | 'type':voucher_type, |
1385 | 478 | 'company_id': st_line.company_id.id, | ||
1386 | 479 | 'account_id': account_id, | 475 | 'account_id': account_id, |
1387 | 480 | 'amount': abs(st_line.amount), | 476 | 'amount': abs(st_line.amount), |
1388 | 481 | 'writeoff_amount': writeoff, | 477 | 'writeoff_amount': writeoff, |
1389 | @@ -552,7 +548,7 @@ | |||
1390 | 552 | def _legacy_clear_up_writeoff(self, cr, uid, transaction, context=None): | 548 | def _legacy_clear_up_writeoff(self, cr, uid, transaction, context=None): |
1391 | 553 | """ | 549 | """ |
1392 | 554 | Legacy method to support upgrades older installations of the | 550 | Legacy method to support upgrades older installations of the |
1394 | 555 | interactive wizard branch. To be removed after 6.2 | 551 | interactive wizard branch. To be removed after 7.0 |
1395 | 556 | clear up the writeoff move | 552 | clear up the writeoff move |
1396 | 557 | """ | 553 | """ |
1397 | 558 | if transaction.writeoff_move_line_id: | 554 | if transaction.writeoff_move_line_id: |
1398 | @@ -649,7 +645,7 @@ | |||
1399 | 649 | if not transaction.match_type: | 645 | if not transaction.match_type: |
1400 | 650 | continue | 646 | continue |
1401 | 651 | if transaction.match_type not in self.cancel_map: | 647 | if transaction.match_type not in self.cancel_map: |
1403 | 652 | raise osv.except_osv( | 648 | raise orm.except_orm( |
1404 | 653 | _("Cannot cancel type %s" % transaction.match_type), | 649 | _("Cannot cancel type %s" % transaction.match_type), |
1405 | 654 | _("No method found to cancel this type")) | 650 | _("No method found to cancel this type")) |
1406 | 655 | self.cancel_map[transaction.match_type]( | 651 | self.cancel_map[transaction.match_type]( |
1407 | @@ -670,7 +666,7 @@ | |||
1408 | 670 | if not transaction.match_type: | 666 | if not transaction.match_type: |
1409 | 671 | continue | 667 | continue |
1410 | 672 | if transaction.match_type not in self.confirm_map: | 668 | if transaction.match_type not in self.confirm_map: |
1412 | 673 | raise osv.except_osv( | 669 | raise orm.except_orm( |
1413 | 674 | _("Cannot reconcile"), | 670 | _("Cannot reconcile"), |
1414 | 675 | _("Cannot reconcile type %s. No method found to " + | 671 | _("Cannot reconcile type %s. No method found to " + |
1415 | 676 | "reconcile this type") % | 672 | "reconcile this type") % |
1416 | @@ -678,7 +674,7 @@ | |||
1417 | 678 | ) | 674 | ) |
1418 | 679 | if (transaction.residual and transaction.writeoff_account_id): | 675 | if (transaction.residual and transaction.writeoff_account_id): |
1419 | 680 | if transaction.match_type not in ('invoice', 'move', 'manual'): | 676 | if transaction.match_type not in ('invoice', 'move', 'manual'): |
1421 | 681 | raise osv.except_osv( | 677 | raise orm.except_orm( |
1422 | 682 | _("Cannot reconcile"), | 678 | _("Cannot reconcile"), |
1423 | 683 | _("Bank transaction %s: write off not implemented for " + | 679 | _("Bank transaction %s: write off not implemented for " + |
1424 | 684 | "this match type.") % | 680 | "this match type.") % |
1425 | @@ -689,12 +685,6 @@ | |||
1426 | 689 | self.confirm_map[transaction.match_type]( | 685 | self.confirm_map[transaction.match_type]( |
1427 | 690 | self, cr, uid, transaction.id, context) | 686 | self, cr, uid, transaction.id, context) |
1428 | 691 | 687 | ||
1429 | 692 | """ | ||
1430 | 693 | account_ids = [ | ||
1431 | 694 | x.id for x in bank_account_ids | ||
1432 | 695 | if x.partner_id.id == move_line.partner_id.id | ||
1433 | 696 | ][0] | ||
1434 | 697 | """ | ||
1435 | 698 | return True | 688 | return True |
1436 | 699 | 689 | ||
1437 | 700 | signal_duplicate_keys = [ | 690 | signal_duplicate_keys = [ |
1438 | @@ -727,7 +717,7 @@ | |||
1439 | 727 | me['transferred_amount'] - trans.transferred_amount): | 717 | me['transferred_amount'] - trans.transferred_amount): |
1440 | 728 | dupes.append(trans.id) | 718 | dupes.append(trans.id) |
1441 | 729 | if len(dupes) < 1: | 719 | if len(dupes) < 1: |
1443 | 730 | raise osv.except_osv(_('Cannot check for duplicate'), | 720 | raise orm.except_orm(_('Cannot check for duplicate'), |
1444 | 731 | _("Cannot check for duplicate. " | 721 | _("Cannot check for duplicate. " |
1445 | 732 | "I can't find myself.")) | 722 | "I can't find myself.")) |
1446 | 733 | if len(dupes) > 1: | 723 | if len(dupes) > 1: |
1447 | @@ -833,7 +823,6 @@ | |||
1448 | 833 | has_payment = bool(payment_line_obj) | 823 | has_payment = bool(payment_line_obj) |
1449 | 834 | statement_line_obj = self.pool.get('account.bank.statement.line') | 824 | statement_line_obj = self.pool.get('account.bank.statement.line') |
1450 | 835 | statement_obj = self.pool.get('account.bank.statement') | 825 | statement_obj = self.pool.get('account.bank.statement') |
1451 | 836 | payment_order_obj = self.pool.get('payment.order') | ||
1452 | 837 | imported_statement_ids = [] | 826 | imported_statement_ids = [] |
1453 | 838 | 827 | ||
1454 | 839 | # Results | 828 | # Results |
1455 | @@ -886,7 +875,7 @@ | |||
1456 | 886 | 875 | ||
1457 | 887 | if (transaction.statement_line_id and | 876 | if (transaction.statement_line_id and |
1458 | 888 | transaction.statement_line_id.state == 'confirmed'): | 877 | transaction.statement_line_id.state == 'confirmed'): |
1460 | 889 | raise osv.except_osv( | 878 | raise orm.except_orm( |
1461 | 890 | _("Cannot perform match"), | 879 | _("Cannot perform match"), |
1462 | 891 | _("Cannot perform match on a confirmed transction")) | 880 | _("Cannot perform match on a confirmed transction")) |
1463 | 892 | 881 | ||
1464 | @@ -934,7 +923,7 @@ | |||
1465 | 934 | account_info = info[transaction.local_account][currency_code] | 923 | account_info = info[transaction.local_account][currency_code] |
1466 | 935 | else: | 924 | else: |
1467 | 936 | # Pull account info/currency | 925 | # Pull account info/currency |
1469 | 937 | account_info = get_company_bank_account( | 926 | account_info = banktools.get_company_bank_account( |
1470 | 938 | self.pool, cr, uid, transaction.local_account, | 927 | self.pool, cr, uid, transaction.local_account, |
1471 | 939 | transaction.local_currency, company, results['log'] | 928 | transaction.local_currency, company, results['log'] |
1472 | 940 | ) | 929 | ) |
1473 | @@ -991,10 +980,9 @@ | |||
1474 | 991 | continue | 980 | continue |
1475 | 992 | 981 | ||
1476 | 993 | # Link accounting period | 982 | # Link accounting period |
1481 | 994 | period_id = get_period( | 983 | period_id = banktools.get_period( |
1482 | 995 | self.pool, cr, uid, | 984 | self.pool, cr, uid, transaction.effective_date, |
1483 | 996 | str2date(transaction.effective_date,'%Y-%m-%d'), company, | 985 | company, results['log']) |
1480 | 997 | results['log']) | ||
1484 | 998 | if not period_id: | 986 | if not period_id: |
1485 | 999 | results['trans_skipped_cnt'] += 1 | 987 | results['trans_skipped_cnt'] += 1 |
1486 | 1000 | if not injected: | 988 | if not injected: |
1487 | @@ -1053,7 +1041,7 @@ | |||
1488 | 1053 | partner_banks = [] | 1041 | partner_banks = [] |
1489 | 1054 | else: | 1042 | else: |
1490 | 1055 | # Link remote partner, import account when needed | 1043 | # Link remote partner, import account when needed |
1492 | 1056 | partner_banks = get_bank_accounts( | 1044 | partner_banks = banktools.get_bank_accounts( |
1493 | 1057 | self.pool, cr, uid, transaction.remote_account, | 1045 | self.pool, cr, uid, transaction.remote_account, |
1494 | 1058 | results['log'], fail=True | 1046 | results['log'], fail=True |
1495 | 1059 | ) | 1047 | ) |
1496 | @@ -1072,14 +1060,17 @@ | |||
1497 | 1072 | country_code = company.partner_id.country.code | 1060 | country_code = company.partner_id.country.code |
1498 | 1073 | else: | 1061 | else: |
1499 | 1074 | country_code = None | 1062 | country_code = None |
1501 | 1075 | partner_id = get_or_create_partner( | 1063 | partner_id = banktools.get_or_create_partner( |
1502 | 1076 | self.pool, cr, uid, transaction.remote_owner, | 1064 | self.pool, cr, uid, transaction.remote_owner, |
1503 | 1077 | transaction.remote_owner_address, | 1065 | transaction.remote_owner_address, |
1504 | 1078 | transaction.remote_owner_postalcode, | 1066 | transaction.remote_owner_postalcode, |
1505 | 1079 | transaction.remote_owner_city, | 1067 | transaction.remote_owner_city, |
1507 | 1080 | country_code, results['log'], context=context) | 1068 | country_code, results['log'], |
1508 | 1069 | customer=transaction.transferred_amount > 0, | ||
1509 | 1070 | supplier=transaction.transferred_amount < 0, | ||
1510 | 1071 | context=context) | ||
1511 | 1081 | if transaction.remote_account: | 1072 | if transaction.remote_account: |
1513 | 1082 | partner_bank_id = create_bank_account( | 1073 | partner_bank_id = banktools.create_bank_account( |
1514 | 1083 | self.pool, cr, uid, partner_id, | 1074 | self.pool, cr, uid, partner_id, |
1515 | 1084 | transaction.remote_account, | 1075 | transaction.remote_account, |
1516 | 1085 | transaction.remote_owner, | 1076 | transaction.remote_owner, |
1517 | @@ -1356,7 +1347,8 @@ | |||
1518 | 1356 | 'account.bank.statement.line', 'Statement line', | 1347 | 'account.bank.statement.line', 'Statement line', |
1519 | 1357 | ondelete='CASCADE'), | 1348 | ondelete='CASCADE'), |
1520 | 1358 | 'statement_id': fields.many2one( | 1349 | 'statement_id': fields.many2one( |
1522 | 1359 | 'account.bank.statement', 'Statement'), | 1350 | 'account.bank.statement', 'Statement', |
1523 | 1351 | ondelete='CASCADE'), | ||
1524 | 1360 | 'parent_id': fields.many2one( | 1352 | 'parent_id': fields.many2one( |
1525 | 1361 | 'banking.import.transaction', 'Split off from this transaction'), | 1353 | 'banking.import.transaction', 'Split off from this transaction'), |
1526 | 1362 | # match fields | 1354 | # match fields |
1527 | @@ -1394,7 +1386,7 @@ | |||
1528 | 1394 | "or reconcile it with the payment(s)"), | 1386 | "or reconcile it with the payment(s)"), |
1529 | 1395 | ), | 1387 | ), |
1530 | 1396 | 'writeoff_amount': fields.float('Difference Amount'), | 1388 | 'writeoff_amount': fields.float('Difference Amount'), |
1532 | 1397 | # Legacy field: to be removed after 6.2 | 1389 | # Legacy field: to be removed after 7.0 |
1533 | 1398 | 'writeoff_move_line_id': fields.many2one( | 1390 | 'writeoff_move_line_id': fields.many2one( |
1534 | 1399 | 'account.move.line', 'Write off move line'), | 1391 | 'account.move.line', 'Write off move line'), |
1535 | 1400 | 'writeoff_analytic_id': fields.many2one( | 1392 | 'writeoff_analytic_id': fields.many2one( |
1536 | @@ -1412,7 +1404,8 @@ | |||
1537 | 1412 | 1404 | ||
1538 | 1413 | banking_import_transaction() | 1405 | banking_import_transaction() |
1539 | 1414 | 1406 | ||
1541 | 1415 | class account_bank_statement_line(osv.osv): | 1407 | |
1542 | 1408 | class account_bank_statement_line(orm.Model): | ||
1543 | 1416 | _inherit = 'account.bank.statement.line' | 1409 | _inherit = 'account.bank.statement.line' |
1544 | 1417 | _columns = { | 1410 | _columns = { |
1545 | 1418 | 'import_transaction_id': fields.many2one( | 1411 | 'import_transaction_id': fields.many2one( |
1546 | @@ -1483,21 +1476,20 @@ | |||
1547 | 1483 | """ | 1476 | """ |
1548 | 1484 | statement_pool = self.pool.get('account.bank.statement') | 1477 | statement_pool = self.pool.get('account.bank.statement') |
1549 | 1485 | obj_seq = self.pool.get('ir.sequence') | 1478 | obj_seq = self.pool.get('ir.sequence') |
1550 | 1486 | move_pool = self.pool.get('account.move') | ||
1551 | 1487 | import_transaction_obj = self.pool.get('banking.import.transaction') | 1479 | import_transaction_obj = self.pool.get('banking.import.transaction') |
1552 | 1488 | 1480 | ||
1553 | 1489 | for st_line in self.browse(cr, uid, ids, context): | 1481 | for st_line in self.browse(cr, uid, ids, context): |
1554 | 1490 | if st_line.state != 'draft': | 1482 | if st_line.state != 'draft': |
1555 | 1491 | continue | 1483 | continue |
1556 | 1492 | if st_line.duplicate: | 1484 | if st_line.duplicate: |
1558 | 1493 | raise osv.except_osv( | 1485 | raise orm.except_orm( |
1559 | 1494 | _('Bank transfer flagged as duplicate'), | 1486 | _('Bank transfer flagged as duplicate'), |
1560 | 1495 | _("You cannot confirm a bank transfer marked as a " | 1487 | _("You cannot confirm a bank transfer marked as a " |
1561 | 1496 | "duplicate (%s.%s)") % | 1488 | "duplicate (%s.%s)") % |
1562 | 1497 | (st_line.statement_id.name, st_line.name,)) | 1489 | (st_line.statement_id.name, st_line.name,)) |
1563 | 1498 | if st_line.analytic_account_id: | 1490 | if st_line.analytic_account_id: |
1564 | 1499 | if not st_line.statement_id.journal_id.analytic_journal_id: | 1491 | if not st_line.statement_id.journal_id.analytic_journal_id: |
1566 | 1500 | raise osv.except_osv( | 1492 | raise orm.except_orm( |
1567 | 1501 | _('No Analytic Journal !'), | 1493 | _('No Analytic Journal !'), |
1568 | 1502 | _("You have to define an analytic journal on the '%s' " | 1494 | _("You have to define an analytic journal on the '%s' " |
1569 | 1503 | "journal!") % (st_line.statement_id.journal_id.name,)) | 1495 | "journal!") % (st_line.statement_id.journal_id.name,)) |
1570 | @@ -1541,7 +1533,6 @@ | |||
1571 | 1541 | ids = [ids] | 1533 | ids = [ids] |
1572 | 1542 | import_transaction_obj = self.pool.get('banking.import.transaction') | 1534 | import_transaction_obj = self.pool.get('banking.import.transaction') |
1573 | 1543 | move_pool = self.pool.get('account.move') | 1535 | move_pool = self.pool.get('account.move') |
1574 | 1544 | transaction_cancel_ids = [] | ||
1575 | 1545 | set_draft_ids = [] | 1536 | set_draft_ids = [] |
1576 | 1546 | move_unlink_ids = [] | 1537 | move_unlink_ids = [] |
1577 | 1547 | # harvest ids for various actions | 1538 | # harvest ids for various actions |
1578 | @@ -1549,7 +1540,7 @@ | |||
1579 | 1549 | if st_line.state != 'confirmed': | 1540 | if st_line.state != 'confirmed': |
1580 | 1550 | continue | 1541 | continue |
1581 | 1551 | if st_line.statement_id.state != 'draft': | 1542 | if st_line.statement_id.state != 'draft': |
1583 | 1552 | raise osv.except_osv( | 1543 | raise orm.except_orm( |
1584 | 1553 | _("Cannot cancel bank transaction"), | 1544 | _("Cannot cancel bank transaction"), |
1585 | 1554 | _("The bank statement that this transaction belongs to has " | 1545 | _("The bank statement that this transaction belongs to has " |
1586 | 1555 | "already been confirmed")) | 1546 | "already been confirmed")) |
1587 | @@ -1584,10 +1575,10 @@ | |||
1588 | 1584 | ids = [ids] | 1575 | ids = [ids] |
1589 | 1585 | for line in self.browse(cr, uid, ids, context=context): | 1576 | for line in self.browse(cr, uid, ids, context=context): |
1590 | 1586 | if line.state == 'confirmed': | 1577 | if line.state == 'confirmed': |
1592 | 1587 | raise osv.except_osv( | 1578 | raise orm.except_orm( |
1593 | 1588 | _('Confirmed Statement Line'), | 1579 | _('Confirmed Statement Line'), |
1594 | 1589 | _("You cannot delete a confirmed Statement Line" | 1580 | _("You cannot delete a confirmed Statement Line" |
1596 | 1590 | ": '%s'" % line.name)) | 1581 | ": '%s'") % line.name) |
1597 | 1591 | return super(account_bank_statement_line, self).unlink( | 1582 | return super(account_bank_statement_line, self).unlink( |
1598 | 1592 | cr, uid, ids, context=context) | 1583 | cr, uid, ids, context=context) |
1599 | 1593 | 1584 | ||
1600 | @@ -1629,7 +1620,8 @@ | |||
1601 | 1629 | 1620 | ||
1602 | 1630 | account_bank_statement_line() | 1621 | account_bank_statement_line() |
1603 | 1631 | 1622 | ||
1605 | 1632 | class account_bank_statement(osv.osv): | 1623 | |
1606 | 1624 | class account_bank_statement(orm.Model): | ||
1607 | 1633 | _inherit = 'account.bank.statement' | 1625 | _inherit = 'account.bank.statement' |
1608 | 1634 | 1626 | ||
1609 | 1635 | def _end_balance(self, cursor, user, ids, name, attr, context=None): | 1627 | def _end_balance(self, cursor, user, ids, name, attr, context=None): |
1610 | @@ -1665,19 +1657,21 @@ | |||
1611 | 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) |
1612 | 1666 | if (not st.journal_id.default_credit_account_id) \ | 1658 | if (not st.journal_id.default_credit_account_id) \ |
1613 | 1667 | or (not st.journal_id.default_debit_account_id): | 1659 | or (not st.journal_id.default_debit_account_id): |
1615 | 1668 | raise osv.except_osv(_('Configuration Error !'), | 1660 | raise orm.except_orm(_('Configuration Error !'), |
1616 | 1669 | _('Please verify that an account is defined in the journal.')) | 1661 | _('Please verify that an account is defined in the journal.')) |
1617 | 1670 | 1662 | ||
1618 | 1671 | # protect against misguided manual changes | 1663 | # protect against misguided manual changes |
1619 | 1672 | for line in st.move_line_ids: | 1664 | for line in st.move_line_ids: |
1620 | 1673 | if line.state != 'valid': | 1665 | if line.state != 'valid': |
1622 | 1674 | raise osv.except_osv(_('Error !'), | 1666 | raise orm.except_orm(_('Error !'), |
1623 | 1675 | _('The account entries lines are not in valid state.')) | 1667 | _('The account entries lines are not in valid state.')) |
1624 | 1676 | 1668 | ||
1625 | 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) |
1626 | 1678 | st.refresh() | 1670 | st.refresh() |
1629 | 1679 | self.log(cr, uid, st.id, _('Statement %s is confirmed, journal ' | 1671 | self.message_post( |
1630 | 1680 | 'items are created.') % (st.name,)) | 1672 | cr, uid, [st.id], |
1631 | 1673 | body=_('Statement %s confirmed, journal items were created.') | ||
1632 | 1674 | % (st.name,), context=context) | ||
1633 | 1681 | return self.write(cr, uid, ids, {'state':'confirm'}, context=context) | 1675 | return self.write(cr, uid, ids, {'state':'confirm'}, context=context) |
1634 | 1682 | 1676 | ||
1635 | 1683 | def button_cancel(self, cr, uid, ids, context=None): | 1677 | def button_cancel(self, cr, uid, ids, context=None): |
1636 | @@ -1696,8 +1690,12 @@ | |||
1637 | 1696 | for st in self.browse(cr, uid, ids, context=context): | 1690 | for st in self.browse(cr, uid, ids, context=context): |
1638 | 1697 | for line in st.line_ids: | 1691 | for line in st.line_ids: |
1639 | 1698 | if line.state == 'confirmed': | 1692 | if line.state == 'confirmed': |
1642 | 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( |
1643 | 1700 | return super(account_bank_statement,self).unlink(cr, uid, ids, context=context) | 1694 | _('Confirmed Statement Lines'), |
1644 | 1695 | _("You cannot delete a Statement with confirmed " | ||
1645 | 1696 | "Statement Lines: '%s'") % st.name) | ||
1646 | 1697 | return super(account_bank_statement, self).unlink( | ||
1647 | 1698 | cr, uid, ids, context=context) | ||
1648 | 1701 | 1699 | ||
1649 | 1702 | _columns = { | 1700 | _columns = { |
1650 | 1703 | # override this field *only* to replace the | 1701 | # override this field *only* to replace the |
1651 | 1704 | 1702 | ||
1652 | === modified file 'account_banking/migrations/0.1.81/post-set-statement-line-state.py' | |||
1653 | --- account_banking/migrations/0.1.81/post-set-statement-line-state.py 2011-12-27 12:00:52 +0000 | |||
1654 | +++ account_banking/migrations/0.1.81/post-set-statement-line-state.py 2013-05-06 14:07:28 +0000 | |||
1655 | @@ -4,16 +4,16 @@ | |||
1656 | 4 | # Copyright (C) 2011 Therp BV (<http://therp.nl>) | 4 | # Copyright (C) 2011 Therp BV (<http://therp.nl>) |
1657 | 5 | # | 5 | # |
1658 | 6 | # This program is free software: you can redistribute it and/or modify | 6 | # This program is free software: you can redistribute it and/or modify |
1660 | 7 | # it under the terms of the GNU General Public License as published by | 7 | # it under the terms of the GNU Affero General Public License as published by |
1661 | 8 | # the Free Software Foundation, either version 3 of the License, or | 8 | # the Free Software Foundation, either version 3 of the License, or |
1662 | 9 | # (at your option) any later version. | 9 | # (at your option) any later version. |
1663 | 10 | # | 10 | # |
1664 | 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, |
1665 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1666 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1668 | 14 | # GNU General Public License for more details. | 14 | # GNU Affero General Public License for more details. |
1669 | 15 | # | 15 | # |
1671 | 16 | # You should have received a copy of the GNU General Public License | 16 | # You should have received a copy of the GNU Affero General Public License |
1672 | 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/>. |
1673 | 18 | # | 18 | # |
1674 | 19 | ############################################################################## | 19 | ############################################################################## |
1675 | 20 | 20 | ||
1676 | === modified file 'account_banking/parsers/__init__.py' | |||
1677 | --- account_banking/parsers/__init__.py 2010-01-26 20:55:24 +0000 | |||
1678 | +++ account_banking/parsers/__init__.py 2013-05-06 14:07:28 +0000 | |||
1679 | @@ -5,16 +5,16 @@ | |||
1680 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1681 | 6 | # | 6 | # |
1682 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1684 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1685 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1686 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1687 | 11 | # | 11 | # |
1688 | 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, |
1689 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1690 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1692 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1693 | 16 | # | 16 | # |
1695 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1696 | 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/>. |
1697 | 19 | # | 19 | # |
1698 | 20 | ############################################################################## | 20 | ############################################################################## |
1699 | 21 | 21 | ||
1700 | === modified file 'account_banking/parsers/convert.py' | |||
1701 | --- account_banking/parsers/convert.py 2011-03-09 12:26:49 +0000 | |||
1702 | +++ account_banking/parsers/convert.py 2013-05-06 14:07:28 +0000 | |||
1703 | @@ -1,20 +1,20 @@ | |||
1705 | 1 | # -*- encoding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
1706 | 2 | ############################################################################## | 2 | ############################################################################## |
1707 | 3 | # | 3 | # |
1708 | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). |
1709 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1710 | 6 | # | 6 | # |
1711 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1713 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1714 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1715 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1716 | 11 | # | 11 | # |
1717 | 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, |
1718 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1719 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1721 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1722 | 16 | # | 16 | # |
1724 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1725 | 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/>. |
1726 | 19 | # | 19 | # |
1727 | 20 | ############################################################################## | 20 | ############################################################################## |
1728 | 21 | 21 | ||
1729 | === modified file 'account_banking/parsers/models.py' | |||
1730 | --- account_banking/parsers/models.py 2012-01-17 08:48:10 +0000 | |||
1731 | +++ account_banking/parsers/models.py 2013-05-06 14:07:28 +0000 | |||
1732 | @@ -5,16 +5,16 @@ | |||
1733 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1734 | 6 | # | 6 | # |
1735 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1737 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1738 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1739 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1740 | 11 | # | 11 | # |
1741 | 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, |
1742 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1743 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1745 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1746 | 16 | # | 16 | # |
1748 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1749 | 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/>. |
1750 | 19 | # | 19 | # |
1751 | 20 | ############################################################################## | 20 | ############################################################################## |
1752 | 21 | 21 | ||
1753 | === modified file 'account_banking/record.py' | |||
1754 | --- account_banking/record.py 2011-03-10 21:54:37 +0000 | |||
1755 | +++ account_banking/record.py 2013-05-06 14:07:28 +0000 | |||
1756 | @@ -5,16 +5,16 @@ | |||
1757 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1758 | 6 | # | 6 | # |
1759 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1761 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1762 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1763 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1764 | 11 | # | 11 | # |
1765 | 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, |
1766 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1767 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1769 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1770 | 16 | # | 16 | # |
1772 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1773 | 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/>. |
1774 | 19 | # | 19 | # |
1775 | 20 | ############################################################################## | 20 | ############################################################################## |
1776 | 21 | 21 | ||
1777 | === modified file 'account_banking/sepa/__init__.py' | |||
1778 | --- account_banking/sepa/__init__.py 2010-06-29 14:58:52 +0000 | |||
1779 | +++ account_banking/sepa/__init__.py 2013-05-06 14:07:28 +0000 | |||
1780 | @@ -5,16 +5,16 @@ | |||
1781 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1782 | 6 | # | 6 | # |
1783 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1785 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1786 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1787 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1788 | 11 | # | 11 | # |
1789 | 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, |
1790 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1791 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1793 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1794 | 16 | # | 16 | # |
1796 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1797 | 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/>. |
1798 | 19 | # | 19 | # |
1799 | 20 | ############################################################################## | 20 | ############################################################################## |
1800 | 21 | 21 | ||
1801 | === modified file 'account_banking/sepa/iban.py' | |||
1802 | --- account_banking/sepa/iban.py 2012-05-03 09:58:01 +0000 | |||
1803 | +++ account_banking/sepa/iban.py 2013-05-06 14:07:28 +0000 | |||
1804 | @@ -5,16 +5,16 @@ | |||
1805 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1806 | 6 | # | 6 | # |
1807 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1809 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1810 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1811 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1812 | 11 | # | 11 | # |
1813 | 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, |
1814 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1815 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1817 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1818 | 16 | # | 16 | # |
1820 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1821 | 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/>. |
1822 | 19 | # | 19 | # |
1823 | 20 | ############################################################################## | 20 | ############################################################################## |
1824 | 21 | 21 | ||
1825 | === modified file 'account_banking/sepa/online.py' | |||
1826 | --- account_banking/sepa/online.py 2012-01-12 09:50:06 +0000 | |||
1827 | +++ account_banking/sepa/online.py 2013-05-06 14:07:28 +0000 | |||
1828 | @@ -5,16 +5,16 @@ | |||
1829 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1830 | 6 | # | 6 | # |
1831 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1833 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1834 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1835 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1836 | 11 | # | 11 | # |
1837 | 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, |
1838 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1839 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1841 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1842 | 16 | # | 16 | # |
1844 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1845 | 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/>. |
1846 | 19 | # | 19 | # |
1847 | 20 | ############################################################################## | 20 | ############################################################################## |
1848 | 21 | 21 | ||
1849 | === modified file 'account_banking/sepa/postalcode.py' | |||
1850 | --- account_banking/sepa/postalcode.py 2012-05-03 10:28:10 +0000 | |||
1851 | +++ account_banking/sepa/postalcode.py 2013-05-06 14:07:28 +0000 | |||
1852 | @@ -5,16 +5,16 @@ | |||
1853 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1854 | 6 | # | 6 | # |
1855 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1857 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1858 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1859 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1860 | 11 | # | 11 | # |
1861 | 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, |
1862 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1863 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1865 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1866 | 16 | # | 16 | # |
1868 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1869 | 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/>. |
1870 | 19 | # | 19 | # |
1871 | 20 | ############################################################################## | 20 | ############################################################################## |
1872 | 21 | 21 | ||
1873 | === modified file 'account_banking/sepa/urlagent.py' | |||
1874 | --- account_banking/sepa/urlagent.py 2010-02-25 23:18:37 +0000 | |||
1875 | +++ account_banking/sepa/urlagent.py 2013-05-06 14:07:28 +0000 | |||
1876 | @@ -5,16 +5,16 @@ | |||
1877 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1878 | 6 | # | 6 | # |
1879 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1881 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1882 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1883 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1884 | 11 | # | 11 | # |
1885 | 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, |
1886 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1887 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1889 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1890 | 16 | # | 16 | # |
1892 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1893 | 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/>. |
1894 | 19 | # | 19 | # |
1895 | 20 | ############################################################################## | 20 | ############################################################################## |
1896 | 21 | 21 | ||
1897 | === modified file 'account_banking/struct.py' | |||
1898 | --- account_banking/struct.py 2010-02-03 23:36:03 +0000 | |||
1899 | +++ account_banking/struct.py 2013-05-06 14:07:28 +0000 | |||
1900 | @@ -5,16 +5,16 @@ | |||
1901 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1902 | 6 | # | 6 | # |
1903 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1905 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1906 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1907 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1908 | 11 | # | 11 | # |
1909 | 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, |
1910 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1911 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1913 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1914 | 16 | # | 16 | # |
1916 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1917 | 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/>. |
1918 | 19 | # | 19 | # |
1919 | 20 | ############################################################################## | 20 | ############################################################################## |
1920 | 21 | 21 | ||
1921 | === modified file 'account_banking/wizard/__init__.py' | |||
1922 | --- account_banking/wizard/__init__.py 2013-05-06 14:07:27 +0000 | |||
1923 | +++ account_banking/wizard/__init__.py 2013-05-06 14:07:28 +0000 | |||
1924 | @@ -5,16 +5,16 @@ | |||
1925 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1926 | 6 | # | 6 | # |
1927 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1929 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1930 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1931 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1932 | 11 | # | 11 | # |
1933 | 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, |
1934 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1935 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1937 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1938 | 16 | # | 16 | # |
1940 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1941 | 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/>. |
1942 | 19 | # | 19 | # |
1943 | 20 | ############################################################################## | 20 | ############################################################################## |
1944 | 21 | 21 | ||
1945 | === modified file 'account_banking/wizard/bank_import.py' | |||
1946 | --- account_banking/wizard/bank_import.py 2013-05-06 14:07:27 +0000 | |||
1947 | +++ account_banking/wizard/bank_import.py 2013-05-06 14:07:28 +0000 | |||
1948 | @@ -5,16 +5,16 @@ | |||
1949 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
1950 | 6 | # | 6 | # |
1951 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
1953 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
1954 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
1955 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
1956 | 11 | # | 11 | # |
1957 | 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, |
1958 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1959 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1961 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
1962 | 16 | # | 16 | # |
1964 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
1965 | 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/>. |
1966 | 19 | # | 19 | # |
1967 | 20 | ############################################################################## | 20 | ############################################################################## |
1968 | @@ -28,19 +28,15 @@ | |||
1969 | 28 | The parsing is done in the parser modules. Every parser module is required to | 28 | The parsing is done in the parser modules. Every parser module is required to |
1970 | 29 | use parser.models as a mean of communication with the business logic. | 29 | use parser.models as a mean of communication with the business logic. |
1971 | 30 | ''' | 30 | ''' |
1975 | 31 | from osv import osv, fields | 31 | from osv import orm, fields |
1973 | 32 | import time | ||
1974 | 33 | import netsvc | ||
1976 | 34 | import base64 | 32 | import base64 |
1977 | 35 | import datetime | 33 | import datetime |
1986 | 36 | from tools import config | 34 | from openerp.tools.translate import _ |
1987 | 37 | from tools.translate import _ | 35 | from openerp.addons.account_banking.parsers import models |
1988 | 38 | from account_banking.parsers import models | 36 | from openerp.addons.account_banking.parsers import convert |
1989 | 39 | from account_banking.parsers.convert import * | 37 | from openerp.addons.account_banking.struct import struct |
1990 | 40 | from account_banking.struct import struct | 38 | from openerp.addons.account_banking.wizard import banktools |
1991 | 41 | from account_banking import sepa | 39 | from openerp.addons.decimal_precision import decimal_precision as dp |
1984 | 42 | from banktools import * | ||
1985 | 43 | import decimal_precision as dp | ||
1992 | 44 | 40 | ||
1993 | 45 | bt = models.mem_bank_transaction | 41 | bt = models.mem_bank_transaction |
1994 | 46 | 42 | ||
1995 | @@ -54,7 +50,8 @@ | |||
1996 | 54 | ''' | 50 | ''' |
1997 | 55 | return models.parser_type.get_parser_types() | 51 | return models.parser_type.get_parser_types() |
1998 | 56 | 52 | ||
2000 | 57 | class banking_import_line(osv.osv_memory): | 53 | |
2001 | 54 | class banking_import_line(orm.TransientModel): | ||
2002 | 58 | _name = 'banking.import.line' | 55 | _name = 'banking.import.line' |
2003 | 59 | _description = 'Bank import lines' | 56 | _description = 'Bank import lines' |
2004 | 60 | _columns = { | 57 | _columns = { |
2005 | @@ -95,10 +92,9 @@ | |||
2006 | 95 | ], 'Transaction type'), | 92 | ], 'Transaction type'), |
2007 | 96 | 'duplicate': fields.boolean('Duplicate'), | 93 | 'duplicate': fields.boolean('Duplicate'), |
2008 | 97 | } | 94 | } |
2009 | 98 | banking_import_line() | ||
2010 | 99 | 95 | ||
2011 | 100 | 96 | ||
2013 | 101 | class banking_import(osv.osv_memory): | 97 | class banking_import(orm.TransientModel): |
2014 | 102 | _name = 'account.banking.bank.import' | 98 | _name = 'account.banking.bank.import' |
2015 | 103 | 99 | ||
2016 | 104 | def import_statements_file(self, cursor, uid, ids, context): | 100 | def import_statements_file(self, cursor, uid, ids, context): |
2017 | @@ -121,7 +117,7 @@ | |||
2018 | 121 | parser_code = banking_import.parser | 117 | parser_code = banking_import.parser |
2019 | 122 | parser = models.create_parser(parser_code) | 118 | parser = models.create_parser(parser_code) |
2020 | 123 | if not parser: | 119 | if not parser: |
2022 | 124 | raise osv.except_osv( | 120 | raise orm.except_orm( |
2023 | 125 | _('ERROR!'), | 121 | _('ERROR!'), |
2024 | 126 | _('Unable to import parser %(parser)s. Parser class not found.') % | 122 | _('Unable to import parser %(parser)s. Parser class not found.') % |
2025 | 127 | {'parser': parser_code} | 123 | {'parser': parser_code} |
2026 | @@ -135,7 +131,7 @@ | |||
2027 | 135 | statements = parser.parse(cursor, data) | 131 | statements = parser.parse(cursor, data) |
2028 | 136 | 132 | ||
2029 | 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()]): |
2031 | 138 | raise osv.except_osv( | 134 | raise orm.except_orm( |
2032 | 139 | _('ERROR!'), | 135 | _('ERROR!'), |
2033 | 140 | _('The imported statements appear to be invalid! Check your file.') | 136 | _('The imported statements appear to be invalid! Check your file.') |
2034 | 141 | ) | 137 | ) |
2035 | @@ -187,7 +183,7 @@ | |||
2036 | 187 | 183 | ||
2037 | 188 | else: | 184 | else: |
2038 | 189 | # Pull account info/currency | 185 | # Pull account info/currency |
2040 | 190 | account_info = get_company_bank_account( | 186 | account_info = banktools.get_company_bank_account( |
2041 | 191 | self.pool, cursor, uid, statement.local_account, | 187 | self.pool, cursor, uid, statement.local_account, |
2042 | 192 | statement.local_currency, company, results.log | 188 | statement.local_currency, company, results.log |
2043 | 193 | ) | 189 | ) |
2044 | @@ -244,7 +240,7 @@ | |||
2045 | 244 | # matching procedure | 240 | # matching procedure |
2046 | 245 | statement_ids = statement_obj.search(cursor, uid, [ | 241 | statement_ids = statement_obj.search(cursor, uid, [ |
2047 | 246 | ('name', '=', statement.id), | 242 | ('name', '=', statement.id), |
2049 | 247 | ('date', '=', date2str(statement.date)), | 243 | ('date', '=', convert.date2str(statement.date)), |
2050 | 248 | ]) | 244 | ]) |
2051 | 249 | if statement_ids: | 245 | if statement_ids: |
2052 | 250 | results.log.append( | 246 | results.log.append( |
2053 | @@ -255,11 +251,14 @@ | |||
2054 | 255 | continue | 251 | continue |
2055 | 256 | 252 | ||
2056 | 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) |
2062 | 258 | period_ids = period_obj.search(cursor, uid, [('company_id','=',company.id), | 254 | period_ids = period_obj.search( |
2063 | 259 | ('date_start','<=',statement.date), | 255 | cursor, uid, [ |
2064 | 260 | ('date_stop','>=',statement.date), | 256 | ('company_id', '=', company.id), |
2065 | 261 | ('special', '=', False)]) | 257 | ('date_start', '<=', statement.date), |
2066 | 262 | 258 | ('date_stop', '>=', statement.date), | |
2067 | 259 | ('special', '=', False), | ||
2068 | 260 | ], context=context) | ||
2069 | 261 | |||
2070 | 263 | if not period_ids: | 262 | if not period_ids: |
2071 | 264 | results.log.append( | 263 | results.log.append( |
2072 | 265 | _('No period found covering statement date %(date)s, ' | 264 | _('No period found covering statement date %(date)s, ' |
2073 | @@ -274,7 +273,7 @@ | |||
2074 | 274 | statement_id = statement_obj.create(cursor, uid, dict( | 273 | statement_id = statement_obj.create(cursor, uid, dict( |
2075 | 275 | name = statement.id, | 274 | name = statement.id, |
2076 | 276 | journal_id = account_info.journal_id.id, | 275 | journal_id = account_info.journal_id.id, |
2078 | 277 | date = date2str(statement.date), | 276 | date = convert.date2str(statement.date), |
2079 | 278 | balance_start = statement.start_balance, | 277 | balance_start = statement.start_balance, |
2080 | 279 | balance_end_real = statement.end_balance, | 278 | balance_end_real = statement.end_balance, |
2081 | 280 | balance_end = statement.end_balance, | 279 | balance_end = statement.end_balance, |
2082 | @@ -302,11 +301,9 @@ | |||
2083 | 302 | values['local_account'] = statement.local_account | 301 | values['local_account'] = statement.local_account |
2084 | 303 | values['local_currency'] = statement.local_currency | 302 | values['local_currency'] = statement.local_currency |
2085 | 304 | 303 | ||
2091 | 305 | transaction_id = import_transaction_obj.create(cursor, uid, values, context=context) | 304 | transaction_id = import_transaction_obj.create( |
2092 | 306 | if transaction_id: | 305 | cursor, uid, values, context=context) |
2093 | 307 | transaction_ids.append(transaction_id) | 306 | transaction_ids.append(transaction_id) |
2089 | 308 | else: | ||
2090 | 309 | osv.except_osv('Failed to create an import transaction resource','') | ||
2094 | 310 | 307 | ||
2095 | 311 | results.stat_loaded_cnt += 1 | 308 | results.stat_loaded_cnt += 1 |
2096 | 312 | 309 | ||
2097 | @@ -422,7 +419,6 @@ | |||
2098 | 422 | 'State', readonly=True), | 419 | 'State', readonly=True), |
2099 | 423 | 'import_id': fields.many2one( | 420 | 'import_id': fields.many2one( |
2100 | 424 | 'account.banking.imported.file', 'Import File'), | 421 | 'account.banking.imported.file', 'Import File'), |
2101 | 425 | # osv_memory does not seem to support one2many | ||
2102 | 426 | 'statement_ids': fields.many2many( | 422 | 'statement_ids': fields.many2many( |
2103 | 427 | 'account.bank.statement', 'rel_wiz_statements', 'wizard_id', | 423 | 'account.bank.statement', 'rel_wiz_statements', 'wizard_id', |
2104 | 428 | 'statement_id', 'Imported Bank Statements'), | 424 | 'statement_id', 'Imported Bank Statements'), |
2105 | @@ -442,7 +438,3 @@ | |||
2106 | 442 | cr, uid, 'bank.import.transaction', context=c), | 438 | cr, uid, 'bank.import.transaction', context=c), |
2107 | 443 | 'parser': _default_parser_type, | 439 | 'parser': _default_parser_type, |
2108 | 444 | } | 440 | } |
2109 | 445 | |||
2110 | 446 | banking_import() | ||
2111 | 447 | |||
2112 | 448 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
2113 | 449 | 441 | ||
2114 | === modified file 'account_banking/wizard/banking_transaction_wizard.py' | |||
2115 | --- account_banking/wizard/banking_transaction_wizard.py 2013-05-06 14:07:27 +0000 | |||
2116 | +++ account_banking/wizard/banking_transaction_wizard.py 2013-05-06 14:07:28 +0000 | |||
2117 | @@ -2,25 +2,26 @@ | |||
2118 | 2 | ############################################################################## | 2 | ############################################################################## |
2119 | 3 | # | 3 | # |
2120 | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). |
2122 | 5 | # (C) 2011 Therp BV (<http://therp.nl>). | 5 | # (C) 2011 - 2013 Therp BV (<http://therp.nl>). |
2123 | 6 | # (C) 2011 Smile (<http://smile.fr>). | 6 | # (C) 2011 Smile (<http://smile.fr>). |
2124 | 7 | # All Rights Reserved | 7 | # All Rights Reserved |
2125 | 8 | # | 8 | # |
2126 | 9 | # This program is free software: you can redistribute it and/or modify | 9 | # This program is free software: you can redistribute it and/or modify |
2128 | 10 | # it under the terms of the GNU General Public License as published by | 10 | # it under the terms of the GNU Affero General Public License as published by |
2129 | 11 | # the Free Software Foundation, either version 3 of the License, or | 11 | # the Free Software Foundation, either version 3 of the License, or |
2130 | 12 | # (at your option) any later version. | 12 | # (at your option) any later version. |
2131 | 13 | # | 13 | # |
2132 | 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, |
2133 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2134 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2136 | 17 | # GNU General Public License for more details. | 17 | # GNU Affero General Public License for more details. |
2137 | 18 | # | 18 | # |
2139 | 19 | # You should have received a copy of the GNU General Public License | 19 | # You should have received a copy of the GNU Affero General Public License |
2140 | 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/>. |
2141 | 21 | # | 21 | # |
2142 | 22 | ############################################################################## | 22 | ############################################################################## |
2144 | 23 | from osv import osv, fields | 23 | |
2145 | 24 | from osv import orm, fields | ||
2146 | 24 | from openerp.tools.translate import _ | 25 | from openerp.tools.translate import _ |
2147 | 25 | 26 | ||
2148 | 26 | """ | 27 | """ |
2149 | @@ -31,7 +32,8 @@ | |||
2150 | 31 | 32 | ||
2151 | 32 | """ | 33 | """ |
2152 | 33 | 34 | ||
2154 | 34 | class banking_transaction_wizard(osv.osv_memory): | 35 | |
2155 | 36 | class banking_transaction_wizard(orm.TransientModel): | ||
2156 | 35 | _name = 'banking.transaction.wizard' | 37 | _name = 'banking.transaction.wizard' |
2157 | 36 | _description = 'Match transaction' | 38 | _description = 'Match transaction' |
2158 | 37 | 39 | ||
2159 | @@ -78,7 +80,7 @@ | |||
2160 | 78 | cr, uid, ids[0], ['import_transaction_id'], | 80 | cr, uid, ids[0], ['import_transaction_id'], |
2161 | 79 | context=context)['import_transaction_id'][0] # many2one tuple | 81 | context=context)['import_transaction_id'][0] # many2one tuple |
2162 | 80 | import_transaction_obj.match(cr, uid, [trans_id], context=context) | 82 | import_transaction_obj.match(cr, uid, [trans_id], context=context) |
2164 | 81 | return True | 83 | return self.create_act_window(cr, uid, ids, context=None) |
2165 | 82 | 84 | ||
2166 | 83 | def write(self, cr, uid, ids, vals, context=None): | 85 | def write(self, cr, uid, ids, vals, context=None): |
2167 | 84 | """ | 86 | """ |
2168 | @@ -162,7 +164,7 @@ | |||
2169 | 162 | # transaction_obj.write( | 164 | # transaction_obj.write( |
2170 | 163 | # cr, uid, wiz.import_transaction_id.id, | 165 | # cr, uid, wiz.import_transaction_id.id, |
2171 | 164 | # { 'invoice_id': False, }, context=context) | 166 | # { 'invoice_id': False, }, context=context) |
2173 | 165 | osv.except_osv( | 167 | orm.except_orm( |
2174 | 166 | _("No entry found for the selected invoice"), | 168 | _("No entry found for the selected invoice"), |
2175 | 167 | _("No entry found for the selected invoice. " + | 169 | _("No entry found for the selected invoice. " + |
2176 | 168 | "Try manual reconciliation.")) | 170 | "Try manual reconciliation.")) |
2177 | @@ -184,7 +186,7 @@ | |||
2178 | 184 | move_line_id = line.id | 186 | move_line_id = line.id |
2179 | 185 | break | 187 | break |
2180 | 186 | if not move_line_id: | 188 | if not move_line_id: |
2182 | 187 | osv.except_osv( | 189 | orm.except_orm( |
2183 | 188 | _("Cannot select for reconcilion"), | 190 | _("Cannot select for reconcilion"), |
2184 | 189 | _("No entry found for the selected invoice. ")) | 191 | _("No entry found for the selected invoice. ")) |
2185 | 190 | else: | 192 | else: |
2186 | @@ -222,7 +224,7 @@ | |||
2187 | 222 | """ | 224 | """ |
2188 | 223 | Just a button that triggers a write. | 225 | Just a button that triggers a write. |
2189 | 224 | """ | 226 | """ |
2191 | 225 | return True | 227 | return self.create_act_window(cr, uid, ids, context=None) |
2192 | 226 | 228 | ||
2193 | 227 | def disable_match(self, cr, uid, ids, context=None): | 229 | def disable_match(self, cr, uid, ids, context=None): |
2194 | 228 | """ | 230 | """ |
2195 | @@ -255,7 +257,7 @@ | |||
2196 | 255 | if x['import_transaction_id']] | 257 | if x['import_transaction_id']] |
2197 | 256 | self.pool.get('banking.import.transaction').clear_and_write( | 258 | self.pool.get('banking.import.transaction').clear_and_write( |
2198 | 257 | cr, uid, trans_ids, context=context) | 259 | cr, uid, trans_ids, context=context) |
2200 | 258 | return True | 260 | return self.create_act_window(cr, uid, ids, context=None) |
2201 | 259 | 261 | ||
2202 | 260 | def reverse_duplicate(self, cr, uid, ids, context=None): | 262 | def reverse_duplicate(self, cr, uid, ids, context=None): |
2203 | 261 | if isinstance(ids, (int, float)): | 263 | if isinstance(ids, (int, float)): |
2204 | @@ -267,7 +269,7 @@ | |||
2205 | 267 | transaction_obj.write( | 269 | transaction_obj.write( |
2206 | 268 | cr, uid, wiz['import_transaction_id'][0], | 270 | cr, uid, wiz['import_transaction_id'][0], |
2207 | 269 | {'duplicate': not wiz['duplicate']}, context=context) | 271 | {'duplicate': not wiz['duplicate']}, context=context) |
2209 | 270 | return True | 272 | return self.create_act_window(cr, uid, ids, context=None) |
2210 | 271 | 273 | ||
2211 | 272 | def _get_default_match_type(self, cr, uid, context=None): | 274 | def _get_default_match_type(self, cr, uid, context=None): |
2212 | 273 | """ | 275 | """ |
2213 | 274 | 276 | ||
2214 | === modified file 'account_banking/wizard/banktools.py' | |||
2215 | --- account_banking/wizard/banktools.py 2013-02-07 09:38:41 +0000 | |||
2216 | +++ account_banking/wizard/banktools.py 2013-05-06 14:07:28 +0000 | |||
2217 | @@ -1,29 +1,27 @@ | |||
2219 | 1 | # -*- encoding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
2220 | 2 | ############################################################################## | 2 | ############################################################################## |
2221 | 3 | # | 3 | # |
2222 | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). |
2223 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
2224 | 6 | # | 6 | # |
2225 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
2227 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
2228 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
2229 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
2230 | 11 | # | 11 | # |
2231 | 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, |
2232 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2233 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2235 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
2236 | 16 | # | 16 | # |
2238 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
2239 | 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/>. |
2240 | 19 | # | 19 | # |
2241 | 20 | ############################################################################## | 20 | ############################################################################## |
2242 | 21 | 21 | ||
2248 | 22 | import datetime | 22 | from openerp.tools.translate import _ |
2249 | 23 | from tools.translate import _ | 23 | from openerp.addons.account_banking import sepa |
2250 | 24 | from account_banking.parsers import convert | 24 | from openerp.addons.account_banking.struct import struct |
2246 | 25 | from account_banking import sepa | ||
2247 | 26 | from account_banking.struct import struct | ||
2251 | 27 | 25 | ||
2252 | 28 | __all__ = [ | 26 | __all__ = [ |
2253 | 29 | 'get_period', | 27 | 'get_period', |
2254 | @@ -33,54 +31,23 @@ | |||
2255 | 33 | 'create_bank_account', | 31 | 'create_bank_account', |
2256 | 34 | ] | 32 | ] |
2257 | 35 | 33 | ||
2306 | 36 | def get_period(pool, cursor, uid, date, company, log): | 34 | def get_period(pool, cr, uid, date, company, log=None): |
2307 | 37 | ''' | 35 | ''' |
2308 | 38 | Get a suitable period for the given date range and the given company. | 36 | Wrapper over account_period.find() to log exceptions of |
2309 | 39 | ''' | 37 | missing periods instead of raising. |
2310 | 40 | fiscalyear_obj = pool.get('account.fiscalyear') | 38 | ''' |
2311 | 41 | period_obj = pool.get('account.period') | 39 | context = {'account_period_prefer_normal': True} |
2312 | 42 | if not date: | 40 | if company: |
2313 | 43 | date = convert.date2str(datetime.datetime.today()) | 41 | context['company_id'] = company.id |
2314 | 44 | 42 | try: | |
2315 | 45 | search_date = convert.date2str(date) | 43 | period_ids = pool.get('account.period').find( |
2316 | 46 | fiscalyear_ids = fiscalyear_obj.search(cursor, uid, [ | 44 | cr, uid, dt=date, context=context) |
2317 | 47 | ('date_start','<=', search_date), ('date_stop','>=', search_date), | 45 | except Exception, e: |
2318 | 48 | ('state','=','draft'), ('company_id','=',company.id) | 46 | if log is None: |
2319 | 49 | ]) | 47 | raise |
2320 | 50 | if not fiscalyear_ids: | 48 | else: |
2321 | 51 | fiscalyear_ids = fiscalyear_obj.search(cursor, uid, [ | 49 | log.append(e) |
2322 | 52 | ('date_start','<=',search_date), ('date_stop','>=',search_date), | 50 | return False |
2275 | 53 | ('state','=','draft'), ('company_id','=',None) | ||
2276 | 54 | ]) | ||
2277 | 55 | if not fiscalyear_ids: | ||
2278 | 56 | log.append( | ||
2279 | 57 | _('No suitable fiscal year found for date %(date)s and company %(company_name)s') | ||
2280 | 58 | % dict(company_name=company.name, date=date) | ||
2281 | 59 | ) | ||
2282 | 60 | return False | ||
2283 | 61 | elif len(fiscalyear_ids) > 1: | ||
2284 | 62 | log.append( | ||
2285 | 63 | _('Multiple overlapping fiscal years found for date %(date)s and company %(company_name)s') | ||
2286 | 64 | % dict(company_name=company.name, date=date) | ||
2287 | 65 | ) | ||
2288 | 66 | return False | ||
2289 | 67 | |||
2290 | 68 | fiscalyear_id = fiscalyear_ids[0] | ||
2291 | 69 | period_ids = period_obj.search(cursor, uid, [ | ||
2292 | 70 | ('date_start','<=',search_date), ('date_stop','>=',search_date), | ||
2293 | 71 | ('fiscalyear_id','=',fiscalyear_id), ('state','=','draft'), | ||
2294 | 72 | ('special', '=', False), | ||
2295 | 73 | ]) | ||
2296 | 74 | if not period_ids: | ||
2297 | 75 | log.append(_('No suitable period found for date %(date)s and company %(company_name)s') | ||
2298 | 76 | % dict(company_name=company.name, date=date) | ||
2299 | 77 | ) | ||
2300 | 78 | return False | ||
2301 | 79 | if len(period_ids) != 1: | ||
2302 | 80 | log.append(_('Multiple overlapping periods for date %(date)s and company %(company_name)s') | ||
2303 | 81 | % dict(company_name=company.name, date=date) | ||
2304 | 82 | ) | ||
2305 | 83 | return False | ||
2323 | 84 | return period_ids[0] | 51 | return period_ids[0] |
2324 | 85 | 52 | ||
2325 | 86 | def get_bank_accounts(pool, cursor, uid, account_number, log, fail=False): | 53 | def get_bank_accounts(pool, cursor, uid, account_number, log, fail=False): |
2326 | @@ -119,7 +86,8 @@ | |||
2327 | 119 | return False | 86 | return False |
2328 | 120 | 87 | ||
2329 | 121 | def get_or_create_partner(pool, cr, uid, name, address, postal_code, city, | 88 | def get_or_create_partner(pool, cr, uid, name, address, postal_code, city, |
2331 | 122 | country_code, log, context=None): | 89 | country_code, log, supplier=False, customer=False, |
2332 | 90 | context=None): | ||
2333 | 123 | ''' | 91 | ''' |
2334 | 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> |
2335 | 125 | 93 | ||
2336 | @@ -141,11 +109,11 @@ | |||
2337 | 141 | cr, uid, [('code', '=', country_code.upper())], | 109 | cr, uid, [('code', '=', country_code.upper())], |
2338 | 142 | context=context) | 110 | context=context) |
2339 | 143 | country_id = country_ids and country_ids[0] or False | 111 | country_id = country_ids and country_ids[0] or False |
2341 | 144 | criteria.append(('address.country_id', '=', country_id)) | 112 | criteria.append(('country_id', '=', country_id)) |
2342 | 145 | if city: | 113 | if city: |
2344 | 146 | criteria.append(('address.city', 'ilike', city)) | 114 | criteria.append(('city', 'ilike', city)) |
2345 | 147 | if postal_code: | 115 | if postal_code: |
2347 | 148 | criteria.append(('address.zip', 'ilike', postal_code)) | 116 | criteria.append(('zip', 'ilike', postal_code)) |
2348 | 149 | partner_search_ids = partner_obj.search( | 117 | partner_search_ids = partner_obj.search( |
2349 | 150 | cr, uid, criteria, context=context) | 118 | cr, uid, criteria, context=context) |
2350 | 151 | key = name.lower() | 119 | key = name.lower() |
2351 | @@ -164,16 +132,20 @@ | |||
2352 | 164 | user.company_id.partner_id.country.id or | 132 | user.company_id.partner_id.country.id or |
2353 | 165 | False | 133 | False |
2354 | 166 | ) | 134 | ) |
2359 | 167 | partner_id = partner_obj.create(cr, uid, dict( | 135 | partner_id = partner_obj.create( |
2360 | 168 | name=name, active=True, | 136 | cr, uid, { |
2361 | 169 | comment='Generated from Bank Statements Import', | 137 | 'name': name, |
2362 | 170 | address=[(0,0,{ | 138 | 'active': True, |
2363 | 139 | 'comment': 'Generated from Bank Statements Import', | ||
2364 | 171 | 'street': address and address[0] or '', | 140 | 'street': address and address[0] or '', |
2365 | 172 | 'street2': len(address) > 1 and address[1] or '', | 141 | 'street2': len(address) > 1 and address[1] or '', |
2366 | 173 | 'city': city, | 142 | 'city': city, |
2367 | 174 | 'zip': postal_code or '', | 143 | 'zip': postal_code or '', |
2368 | 175 | 'country_id': country_id, | 144 | 'country_id': country_id, |
2370 | 176 | })]), context=context) | 145 | 'is_company': True, |
2371 | 146 | 'supplier': supplier, | ||
2372 | 147 | 'customer': customer, | ||
2373 | 148 | }, context=context) | ||
2374 | 177 | else: | 149 | else: |
2375 | 178 | if len(partner_ids) > 1: | 150 | if len(partner_ids) > 1: |
2376 | 179 | log.append( | 151 | log.append( |
2377 | 180 | 152 | ||
2378 | === modified file 'account_banking_fi_patu/__init__.py' | |||
2379 | --- account_banking_fi_patu/__init__.py 2010-06-30 07:11:08 +0000 | |||
2380 | +++ account_banking_fi_patu/__init__.py 2013-05-06 14:07:28 +0000 | |||
2381 | @@ -12,16 +12,16 @@ | |||
2382 | 12 | # garantees and support are strongly adviced to contract EduSense BV | 12 | # garantees and support are strongly adviced to contract EduSense BV |
2383 | 13 | # | 13 | # |
2384 | 14 | # This program is free software: you can redistribute it and/or modify | 14 | # This program is free software: you can redistribute it and/or modify |
2386 | 15 | # it under the terms of the GNU General Public License as published by | 15 | # it under the terms of the GNU Affero General Public License as published by |
2387 | 16 | # the Free Software Foundation, either version 3 of the License, or | 16 | # the Free Software Foundation, either version 3 of the License, or |
2388 | 17 | # (at your option) any later version. | 17 | # (at your option) any later version. |
2389 | 18 | # | 18 | # |
2390 | 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, |
2391 | 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2392 | 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2394 | 22 | # GNU General Public License for more details. | 22 | # GNU Affero General Public License for more details. |
2395 | 23 | # | 23 | # |
2397 | 24 | # You should have received a copy of the GNU General Public License | 24 | # You should have received a copy of the GNU Affero General Public License |
2398 | 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/>. |
2399 | 26 | # | 26 | # |
2400 | 27 | ############################################################################## | 27 | ############################################################################## |
2401 | 28 | 28 | ||
2402 | === renamed file 'account_banking_fi_patu/__terp__.py' => 'account_banking_fi_patu/__openerp__.py' | |||
2403 | --- account_banking_fi_patu/__terp__.py 2011-05-05 10:29:28 +0000 | |||
2404 | +++ account_banking_fi_patu/__openerp__.py 2013-05-06 14:07:28 +0000 | |||
2405 | @@ -11,23 +11,23 @@ | |||
2406 | 11 | # garantees and support are strongly adviced to contract EduSense BV | 11 | # garantees and support are strongly adviced to contract EduSense BV |
2407 | 12 | # | 12 | # |
2408 | 13 | # This program is free software: you can redistribute it and/or modify | 13 | # This program is free software: you can redistribute it and/or modify |
2410 | 14 | # it under the terms of the GNU General Public License as published by | 14 | # it under the terms of the GNU Affero General Public License as published by |
2411 | 15 | # the Free Software Foundation, either version 3 of the License, or | 15 | # the Free Software Foundation, either version 3 of the License, or |
2412 | 16 | # (at your option) any later version. | 16 | # (at your option) any later version. |
2413 | 17 | # | 17 | # |
2414 | 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, |
2415 | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2416 | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2418 | 21 | # GNU General Public License for more details. | 21 | # GNU Affero General Public License for more details. |
2419 | 22 | # | 22 | # |
2421 | 23 | # You should have received a copy of the GNU General Public License | 23 | # You should have received a copy of the GNU Affero General Public License |
2422 | 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/>. |
2423 | 25 | # | 25 | # |
2424 | 26 | ############################################################################## | 26 | ############################################################################## |
2425 | 27 | { | 27 | { |
2426 | 28 | 'name': 'Account Banking PATU module', | 28 | 'name': 'Account Banking PATU module', |
2427 | 29 | 'version': '0.62', | 29 | 'version': '0.62', |
2429 | 30 | 'license': 'GPL-3', | 30 | 'license': 'AGPL-3', |
2430 | 31 | 'author': 'Sami Haahtinen', | 31 | 'author': 'Sami Haahtinen', |
2431 | 32 | 'website': 'http://ressukka.net', | 32 | 'website': 'http://ressukka.net', |
2432 | 33 | 'category': 'Account Banking', | 33 | 'category': 'Account Banking', |
2433 | 34 | 34 | ||
2434 | === modified file 'account_banking_fi_patu/patu.py' | |||
2435 | --- account_banking_fi_patu/patu.py 2012-01-17 08:48:10 +0000 | |||
2436 | +++ account_banking_fi_patu/patu.py 2013-05-06 14:07:28 +0000 | |||
2437 | @@ -6,16 +6,16 @@ | |||
2438 | 6 | # All Rights Reserved | 6 | # All Rights Reserved |
2439 | 7 | # | 7 | # |
2440 | 8 | # This program is free software: you can redistribute it and/or modify | 8 | # This program is free software: you can redistribute it and/or modify |
2442 | 9 | # it under the terms of the GNU General Public License as published by | 9 | # it under the terms of the GNU Affero General Public License as published by |
2443 | 10 | # the Free Software Foundation, either version 3 of the License, or | 10 | # the Free Software Foundation, either version 3 of the License, or |
2444 | 11 | # (at your option) any later version. | 11 | # (at your option) any later version. |
2445 | 12 | # | 12 | # |
2446 | 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, |
2447 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2448 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2450 | 16 | # GNU General Public License for more details. | 16 | # GNU Affero General Public License for more details. |
2451 | 17 | # | 17 | # |
2453 | 18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU Affero General Public License |
2454 | 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/>. |
2455 | 20 | # | 20 | # |
2456 | 21 | ############################################################################## | 21 | ############################################################################## |
2457 | 22 | 22 | ||
2458 | === modified file 'account_banking_nl_abnamro/__init__.py' | |||
2459 | --- account_banking_nl_abnamro/__init__.py 2011-04-26 21:00:12 +0000 | |||
2460 | +++ account_banking_nl_abnamro/__init__.py 2013-05-06 14:07:28 +0000 | |||
2461 | @@ -1,31 +1,2 @@ | |||
2490 | 1 | # -*- encoding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
2463 | 2 | ############################################################################## | ||
2464 | 3 | # | ||
2465 | 4 | # Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>) | ||
2466 | 5 | # and Therp BV (<http://therp.nl>) | ||
2467 | 6 | # All Rights Reserved | ||
2468 | 7 | # | ||
2469 | 8 | # WARNING: This program as such is intended to be used by professional | ||
2470 | 9 | # programmers who take the whole responsability of assessing all potential | ||
2471 | 10 | # consequences resulting from its eventual inadequacies and bugs | ||
2472 | 11 | # End users who are looking for a ready-to-use solution with commercial | ||
2473 | 12 | # garantees and support are strongly adviced to contract EduSense BV | ||
2474 | 13 | # or Therp BV | ||
2475 | 14 | # | ||
2476 | 15 | # This program is free software: you can redistribute it and/or modify | ||
2477 | 16 | # it under the terms of the GNU General Public License as published by | ||
2478 | 17 | # the Free Software Foundation, either version 3 of the License, or | ||
2479 | 18 | # (at your option) any later version. | ||
2480 | 19 | # | ||
2481 | 20 | # This program is distributed in the hope that it will be useful, | ||
2482 | 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2483 | 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2484 | 23 | # GNU General Public License for more details. | ||
2485 | 24 | # | ||
2486 | 25 | # You should have received a copy of the GNU General Public License | ||
2487 | 26 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2488 | 27 | # | ||
2489 | 28 | ############################################################################## | ||
2491 | 29 | import abnamro | 2 | import abnamro |
2492 | 30 | |||
2493 | 31 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
2494 | 32 | 3 | ||
2495 | === modified file 'account_banking_nl_abnamro/__openerp__.py' | |||
2496 | --- account_banking_nl_abnamro/__openerp__.py 2013-02-26 21:06:36 +0000 | |||
2497 | +++ account_banking_nl_abnamro/__openerp__.py 2013-05-06 14:07:28 +0000 | |||
2498 | @@ -1,43 +1,33 @@ | |||
2499 | 1 | # -*- coding: utf-8 -*- | ||
2500 | 1 | ############################################################################## | 2 | ############################################################################## |
2501 | 2 | # | 3 | # |
2502 | 3 | # Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>) | 4 | # Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>) |
2503 | 4 | # and Therp BV (<http://therp.nl>) | 5 | # and Therp BV (<http://therp.nl>) |
2504 | 5 | # All Rights Reserved | 6 | # All Rights Reserved |
2505 | 6 | # | 7 | # |
2506 | 7 | # WARNING: This program as such is intended to be used by professional | ||
2507 | 8 | # programmers who take the whole responsability of assessing all potential | ||
2508 | 9 | # consequences resulting from its eventual inadequacies and bugs | ||
2509 | 10 | # End users who are looking for a ready-to-use solution with commercial | ||
2510 | 11 | # garantees and support are strongly adviced to contract EduSense BV | ||
2511 | 12 | # or Therp BV | ||
2512 | 13 | # | ||
2513 | 14 | # This program is free software: you can redistribute it and/or modify | 8 | # This program is free software: you can redistribute it and/or modify |
2517 | 15 | # it under the terms of the GNU General Public License as published by | 9 | # it under the terms of the GNU Affero General Public License as |
2518 | 16 | # the Free Software Foundation, either version 3 of the License, or | 10 | # published by the Free Software Foundation, either version 3 of the |
2519 | 17 | # (at your option) any later version. | 11 | # License, or (at your option) any later version. |
2520 | 18 | # | 12 | # |
2521 | 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, |
2522 | 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2523 | 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2525 | 22 | # GNU General Public License for more details. | 16 | # GNU Affero General Public License for more details. |
2526 | 23 | # | 17 | # |
2528 | 24 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU Affero General Public License |
2529 | 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/>. |
2530 | 26 | # | 20 | # |
2531 | 27 | ############################################################################## | 21 | ############################################################################## |
2532 | 22 | |||
2533 | 28 | { | 23 | { |
2534 | 29 | 'name': 'abnamro (NL) Bank Statements Import', | 24 | 'name': 'abnamro (NL) Bank Statements Import', |
2535 | 30 | 'version': '0.1', | 25 | 'version': '0.1', |
2540 | 31 | 'license': 'GPL-3', | 26 | 'license': 'AGPL-3', |
2541 | 32 | 'author': 'Therp BV / EduSense BV', | 27 | 'author': ['Therp BV', 'EduSense BV'], |
2542 | 33 | 'website': 'https://launchpad.net/account-banking', | 28 | 'website': 'https://launchpad.net/banking-addons', |
2543 | 34 | 'category': 'Account Banking', | 29 | 'category': 'Banking addons', |
2544 | 35 | 'depends': ['account_banking'], | 30 | 'depends': ['account_banking'], |
2545 | 36 | 'init_xml': [], | ||
2546 | 37 | 'update_xml': [ | ||
2547 | 38 | #'security/ir.model.access.csv', | ||
2548 | 39 | ], | ||
2549 | 40 | 'demo_xml': [], | ||
2550 | 41 | 'description': ''' | 31 | 'description': ''' |
2551 | 42 | Import filter for abnamro (NL) bank transaction files (txt/tab format). | 32 | Import filter for abnamro (NL) bank transaction files (txt/tab format). |
2552 | 43 | 33 | ||
2553 | @@ -48,6 +38,5 @@ | |||
2554 | 48 | Imported bank transfers are organized in statements covering periods of one week, | 38 | Imported bank transfers are organized in statements covering periods of one week, |
2555 | 49 | even if the imported files cover a different period. | 39 | even if the imported files cover a different period. |
2556 | 50 | ''', | 40 | ''', |
2559 | 51 | 'active': False, | 41 | 'installable': True, |
2558 | 52 | 'installable': False, | ||
2560 | 53 | } | 42 | } |
2561 | 54 | 43 | ||
2562 | === removed file 'account_banking_nl_abnamro/__terp__.py' | |||
2563 | --- account_banking_nl_abnamro/__terp__.py 2011-05-05 10:29:28 +0000 | |||
2564 | +++ account_banking_nl_abnamro/__terp__.py 1970-01-01 00:00:00 +0000 | |||
2565 | @@ -1,53 +0,0 @@ | |||
2566 | 1 | ############################################################################## | ||
2567 | 2 | # | ||
2568 | 3 | # Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>) | ||
2569 | 4 | # and Therp BV (<http://therp.nl>) | ||
2570 | 5 | # All Rights Reserved | ||
2571 | 6 | # | ||
2572 | 7 | # WARNING: This program as such is intended to be used by professional | ||
2573 | 8 | # programmers who take the whole responsability of assessing all potential | ||
2574 | 9 | # consequences resulting from its eventual inadequacies and bugs | ||
2575 | 10 | # End users who are looking for a ready-to-use solution with commercial | ||
2576 | 11 | # garantees and support are strongly adviced to contract EduSense BV | ||
2577 | 12 | # or Therp BV | ||
2578 | 13 | # | ||
2579 | 14 | # This program is free software: you can redistribute it and/or modify | ||
2580 | 15 | # it under the terms of the GNU General Public License as published by | ||
2581 | 16 | # the Free Software Foundation, either version 3 of the License, or | ||
2582 | 17 | # (at your option) any later version. | ||
2583 | 18 | # | ||
2584 | 19 | # This program is distributed in the hope that it will be useful, | ||
2585 | 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2586 | 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2587 | 22 | # GNU General Public License for more details. | ||
2588 | 23 | # | ||
2589 | 24 | # You should have received a copy of the GNU General Public License | ||
2590 | 25 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2591 | 26 | # | ||
2592 | 27 | ############################################################################## | ||
2593 | 28 | { | ||
2594 | 29 | 'name': 'abnamro (NL) Bank Statements Import', | ||
2595 | 30 | 'version': '0.62', | ||
2596 | 31 | 'license': 'GPL-3', | ||
2597 | 32 | 'author': 'Therp BV / EduSense BV', | ||
2598 | 33 | 'website': 'https://launchpad.net/account-banking', | ||
2599 | 34 | 'category': 'Account Banking', | ||
2600 | 35 | 'depends': ['account_banking'], | ||
2601 | 36 | 'init_xml': [], | ||
2602 | 37 | 'update_xml': [ | ||
2603 | 38 | #'security/ir.model.access.csv', | ||
2604 | 39 | ], | ||
2605 | 40 | 'demo_xml': [], | ||
2606 | 41 | 'description': ''' | ||
2607 | 42 | Import filter for abnamro (NL) bank transaction files (txt/tab format). | ||
2608 | 43 | |||
2609 | 44 | No formal specifications of the file layout are released by abnamro. You can | ||
2610 | 45 | help improve the performance of this import filter on | ||
2611 | 46 | https://launchpad.net/account-banking. | ||
2612 | 47 | |||
2613 | 48 | Imported bank transfers are organized in statements covering periods of one week, | ||
2614 | 49 | even if the imported files cover a different period. | ||
2615 | 50 | ''', | ||
2616 | 51 | 'active': False, | ||
2617 | 52 | 'installable': True, | ||
2618 | 53 | } | ||
2619 | 54 | 0 | ||
2620 | === modified file 'account_banking_nl_abnamro/abnamro.py' | |||
2621 | --- account_banking_nl_abnamro/abnamro.py 2013-04-17 14:24:33 +0000 | |||
2622 | +++ account_banking_nl_abnamro/abnamro.py 2013-05-06 14:07:28 +0000 | |||
2623 | @@ -1,21 +1,22 @@ | |||
2625 | 1 | # -*- encoding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
2626 | 2 | ############################################################################## | 2 | ############################################################################## |
2627 | 3 | # | 3 | # |
2628 | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>) | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>) |
2629 | 5 | # 2011 Therp BV (<http://therp.nl>) | 5 | # 2011 Therp BV (<http://therp.nl>) |
2630 | 6 | # | ||
2631 | 6 | # All Rights Reserved | 7 | # All Rights Reserved |
2632 | 7 | # | 8 | # |
2633 | 8 | # This program is free software: you can redistribute it and/or modify | 9 | # This program is free software: you can redistribute it and/or modify |
2637 | 9 | # it under the terms of the GNU General Public License as published by | 10 | # it under the terms of the GNU Affero General Public License as |
2638 | 10 | # the Free Software Foundation, either version 3 of the License, or | 11 | # published by the Free Software Foundation, either version 3 of the |
2639 | 11 | # (at your option) any later version. | 12 | # License, or (at your option) any later version. |
2640 | 12 | # | 13 | # |
2641 | 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, |
2642 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2643 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2645 | 16 | # GNU General Public License for more details. | 17 | # GNU Affero General Public License for more details. |
2646 | 17 | # | 18 | # |
2648 | 18 | # You should have received a copy of the GNU General Public License | 19 | # You should have received a copy of the GNU Affero General Public License |
2649 | 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/>. |
2650 | 20 | # | 21 | # |
2651 | 21 | ############################################################################## | 22 | ############################################################################## |
2652 | @@ -28,11 +29,11 @@ | |||
2653 | 28 | Every transaction is bound to a Bank Statement. As such, this module generates | 29 | Every transaction is bound to a Bank Statement. As such, this module generates |
2654 | 29 | Bank Statements along with Bank Transactions. | 30 | Bank Statements along with Bank Transactions. |
2655 | 30 | ''' | 31 | ''' |
2661 | 31 | from account_banking.parsers import models | 32 | from openerp.addons.account_banking.parsers import models |
2662 | 32 | from account_banking.parsers.convert import str2date | 33 | from openerp.addons.account_banking.parsers.convert import str2date |
2663 | 33 | from account_banking.sepa import postalcode | 34 | from openerp.addons.account_banking.sepa import postalcode |
2664 | 34 | from tools.translate import _ | 35 | from openerp.tools.translate import _ |
2665 | 35 | from osv import osv | 36 | from openerp.osv import orm |
2666 | 36 | 37 | ||
2667 | 37 | import re | 38 | import re |
2668 | 38 | import csv | 39 | import csv |
2669 | @@ -120,7 +121,7 @@ | |||
2670 | 120 | self.error_message = _('No remote account for transaction type ' | 121 | self.error_message = _('No remote account for transaction type ' |
2671 | 121 | '%s') % self.transfer_type | 122 | '%s') % self.transfer_type |
2672 | 122 | if self.error_message: | 123 | if self.error_message: |
2674 | 123 | raise osv.except_osv(_('Error !'), _(self.error_message)) | 124 | raise orm.except_orm(_('Error !'), _(self.error_message)) |
2675 | 124 | return not self.error_message | 125 | return not self.error_message |
2676 | 125 | 126 | ||
2677 | 126 | def parse_message(self): | 127 | def parse_message(self): |
2678 | @@ -223,7 +224,7 @@ | |||
2679 | 223 | remote_account = account_match.group(1).zfill(10) | 224 | remote_account = account_match.group(1).zfill(10) |
2680 | 224 | remote_owner = account_match.group(2).strip() or '' | 225 | remote_owner = account_match.group(2).strip() or '' |
2681 | 225 | else: | 226 | else: |
2683 | 226 | raise osv.except_osv( | 227 | raise orm.except_orm( |
2684 | 227 | _('Error !'), | 228 | _('Error !'), |
2685 | 228 | _('unable to parse GIRO string: %s') % field) | 229 | _('unable to parse GIRO string: %s') % field) |
2686 | 229 | elif field.startswith('BEA '): | 230 | elif field.startswith('BEA '): |
2687 | 230 | 231 | ||
2688 | === modified file 'account_banking_nl_clieop/__init__.py' | |||
2689 | --- account_banking_nl_clieop/__init__.py 2010-01-26 20:55:24 +0000 | |||
2690 | +++ account_banking_nl_clieop/__init__.py 2013-05-06 14:07:28 +0000 | |||
2691 | @@ -11,16 +11,16 @@ | |||
2692 | 11 | # garantees and support are strongly adviced to contract EduSense BV | 11 | # garantees and support are strongly adviced to contract EduSense BV |
2693 | 12 | # | 12 | # |
2694 | 13 | # This program is free software: you can redistribute it and/or modify | 13 | # This program is free software: you can redistribute it and/or modify |
2696 | 14 | # it under the terms of the GNU General Public License as published by | 14 | # it under the terms of the GNU Affero General Public License as published by |
2697 | 15 | # the Free Software Foundation, either version 3 of the License, or | 15 | # the Free Software Foundation, either version 3 of the License, or |
2698 | 16 | # (at your option) any later version. | 16 | # (at your option) any later version. |
2699 | 17 | # | 17 | # |
2700 | 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, |
2701 | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2702 | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2704 | 21 | # GNU General Public License for more details. | 21 | # GNU Affero General Public License for more details. |
2705 | 22 | # | 22 | # |
2707 | 23 | # You should have received a copy of the GNU General Public License | 23 | # You should have received a copy of the GNU Affero General Public License |
2708 | 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/>. |
2709 | 25 | # | 25 | # |
2710 | 26 | ############################################################################## | 26 | ############################################################################## |
2711 | 27 | 27 | ||
2712 | === renamed file 'account_banking_nl_clieop/__terp__.py' => 'account_banking_nl_clieop/__openerp__.py' | |||
2713 | --- account_banking_nl_clieop/__terp__.py 2013-05-06 14:07:27 +0000 | |||
2714 | +++ account_banking_nl_clieop/__openerp__.py 2013-05-06 14:07:28 +0000 | |||
2715 | @@ -3,48 +3,39 @@ | |||
2716 | 3 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). | 3 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). |
2717 | 4 | # All Rights Reserved | 4 | # All Rights Reserved |
2718 | 5 | # | 5 | # |
2719 | 6 | # WARNING: This program as such is intended to be used by professional | ||
2720 | 7 | # programmers who take the whole responsability of assessing all potential | ||
2721 | 8 | # consequences resulting from its eventual inadequacies and bugs | ||
2722 | 9 | # End users who are looking for a ready-to-use solution with commercial | ||
2723 | 10 | # garantees and support are strongly adviced to contract EduSense BV | ||
2724 | 11 | # | ||
2725 | 12 | # This program is free software: you can redistribute it and/or modify | 6 | # This program is free software: you can redistribute it and/or modify |
2727 | 13 | # it under the terms of the GNU General Public License as published by | 7 | # it under the terms of the GNU Affero General Public License as published by |
2728 | 14 | # the Free Software Foundation, either version 3 of the License, or | 8 | # the Free Software Foundation, either version 3 of the License, or |
2729 | 15 | # (at your option) any later version. | 9 | # (at your option) any later version. |
2730 | 16 | # | 10 | # |
2731 | 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, |
2732 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2733 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2735 | 20 | # GNU General Public License for more details. | 14 | # GNU Affero General Public License for more details. |
2736 | 21 | # | 15 | # |
2738 | 22 | # You should have received a copy of the GNU General Public License | 16 | # You should have received a copy of the GNU Affero General Public License |
2739 | 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/>. |
2740 | 24 | # | 18 | # |
2741 | 25 | ############################################################################## | 19 | ############################################################################## |
2742 | 26 | { | 20 | { |
2743 | 27 | 'name': 'Account Banking NL ClieOp', | 21 | 'name': 'Account Banking NL ClieOp', |
2744 | 28 | 'version': '0.92', | 22 | 'version': '0.92', |
2746 | 29 | 'license': 'GPL-3', | 23 | 'license': 'AGPL-3', |
2747 | 30 | 'author': 'EduSense BV', | 24 | 'author': 'EduSense BV', |
2748 | 31 | 'website': 'http://www.edusense.nl', | 25 | 'website': 'http://www.edusense.nl', |
2749 | 32 | 'category': 'Account Banking', | 26 | 'category': 'Account Banking', |
2750 | 33 | 'depends': ['account_banking_payment'], | 27 | 'depends': ['account_banking_payment'], |
2753 | 34 | 'init_xml': [], | 28 | 'data': [ |
2752 | 35 | 'update_xml': [ | ||
2754 | 36 | 'account_banking_nl_clieop.xml', | 29 | 'account_banking_nl_clieop.xml', |
2755 | 37 | 'wizard/export_clieop_view.xml', | 30 | 'wizard/export_clieop_view.xml', |
2756 | 38 | 'data/banking_export_clieop.xml', | 31 | 'data/banking_export_clieop.xml', |
2757 | 39 | 'security/ir.model.access.csv', | 32 | 'security/ir.model.access.csv', |
2758 | 40 | ], | 33 | ], |
2759 | 41 | 'demo_xml': [], | ||
2760 | 42 | 'description': ''' | 34 | 'description': ''' |
2761 | 43 | Module to export payment orders in ClieOp format. | 35 | Module to export payment orders in ClieOp format. |
2762 | 44 | 36 | ||
2763 | 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. |
2764 | 46 | This module uses the account_banking logic. | 38 | This module uses the account_banking logic. |
2765 | 47 | ''', | 39 | ''', |
2768 | 48 | 'active': False, | 40 | 'installable': False, |
2767 | 49 | 'installable': True, | ||
2769 | 50 | } | 41 | } |
2770 | 51 | 42 | ||
2771 | === modified file 'account_banking_nl_clieop/account_banking_nl_clieop.py' | |||
2772 | --- account_banking_nl_clieop/account_banking_nl_clieop.py 2012-12-30 10:55:49 +0000 | |||
2773 | +++ account_banking_nl_clieop/account_banking_nl_clieop.py 2013-05-06 14:07:28 +0000 | |||
2774 | @@ -4,16 +4,16 @@ | |||
2775 | 4 | # All Rights Reserved | 4 | # All Rights Reserved |
2776 | 5 | # | 5 | # |
2777 | 6 | # This program is free software: you can redistribute it and/or modify | 6 | # This program is free software: you can redistribute it and/or modify |
2779 | 7 | # it under the terms of the GNU General Public License as published by | 7 | # it under the terms of the GNU Affero General Public License as published by |
2780 | 8 | # the Free Software Foundation, either version 3 of the License, or | 8 | # the Free Software Foundation, either version 3 of the License, or |
2781 | 9 | # (at your option) any later version. | 9 | # (at your option) any later version. |
2782 | 10 | # | 10 | # |
2783 | 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, |
2784 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2785 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2787 | 14 | # GNU General Public License for more details. | 14 | # GNU Affero General Public License for more details. |
2788 | 15 | # | 15 | # |
2790 | 16 | # You should have received a copy of the GNU General Public License | 16 | # You should have received a copy of the GNU Affero General Public License |
2791 | 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/>. |
2792 | 18 | # | 18 | # |
2793 | 19 | ############################################################################## | 19 | ############################################################################## |
2794 | 20 | 20 | ||
2795 | === modified file 'account_banking_nl_clieop/migrations/0.63/post-fill-ir_model_id.py' | |||
2796 | --- account_banking_nl_clieop/migrations/0.63/post-fill-ir_model_id.py 2011-07-24 18:58:32 +0000 | |||
2797 | +++ account_banking_nl_clieop/migrations/0.63/post-fill-ir_model_id.py 2013-05-06 14:07:28 +0000 | |||
2798 | @@ -4,16 +4,16 @@ | |||
2799 | 4 | # Copyright (C) 2011 Therp BV (<http://therp.nl>) | 4 | # Copyright (C) 2011 Therp BV (<http://therp.nl>) |
2800 | 5 | # | 5 | # |
2801 | 6 | # This program is free software: you can redistribute it and/or modify | 6 | # This program is free software: you can redistribute it and/or modify |
2803 | 7 | # it under the terms of the GNU General Public License as published by | 7 | # it under the terms of the GNU Affero General Public License as published by |
2804 | 8 | # the Free Software Foundation, either version 3 of the License, or | 8 | # the Free Software Foundation, either version 3 of the License, or |
2805 | 9 | # (at your option) any later version. | 9 | # (at your option) any later version. |
2806 | 10 | # | 10 | # |
2807 | 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, |
2808 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2809 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2811 | 14 | # GNU General Public License for more details. | 14 | # GNU Affero General Public License for more details. |
2812 | 15 | # | 15 | # |
2814 | 16 | # You should have received a copy of the GNU General Public License | 16 | # You should have received a copy of the GNU Affero General Public License |
2815 | 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/>. |
2816 | 18 | # | 18 | # |
2817 | 19 | ############################################################################## | 19 | ############################################################################## |
2818 | 20 | 20 | ||
2819 | === modified file 'account_banking_nl_clieop/migrations/0.64/post-set-payment-order-type.py' | |||
2820 | --- account_banking_nl_clieop/migrations/0.64/post-set-payment-order-type.py 2011-12-27 12:00:52 +0000 | |||
2821 | +++ account_banking_nl_clieop/migrations/0.64/post-set-payment-order-type.py 2013-05-06 14:07:28 +0000 | |||
2822 | @@ -4,16 +4,16 @@ | |||
2823 | 4 | # Copyright (C) 2011 Therp BV (<http://therp.nl>) | 4 | # Copyright (C) 2011 Therp BV (<http://therp.nl>) |
2824 | 5 | # | 5 | # |
2825 | 6 | # This program is free software: you can redistribute it and/or modify | 6 | # This program is free software: you can redistribute it and/or modify |
2827 | 7 | # it under the terms of the GNU General Public License as published by | 7 | # it under the terms of the GNU Affero General Public License as published by |
2828 | 8 | # the Free Software Foundation, either version 3 of the License, or | 8 | # the Free Software Foundation, either version 3 of the License, or |
2829 | 9 | # (at your option) any later version. | 9 | # (at your option) any later version. |
2830 | 10 | # | 10 | # |
2831 | 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, |
2832 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2833 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2835 | 14 | # GNU General Public License for more details. | 14 | # GNU Affero General Public License for more details. |
2836 | 15 | # | 15 | # |
2838 | 16 | # You should have received a copy of the GNU General Public License | 16 | # You should have received a copy of the GNU Affero General Public License |
2839 | 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/>. |
2840 | 18 | # | 18 | # |
2841 | 19 | ############################################################################## | 19 | ############################################################################## |
2842 | 20 | 20 | ||
2843 | === modified file 'account_banking_nl_clieop/wizard/__init__.py' | |||
2844 | --- account_banking_nl_clieop/wizard/__init__.py 2010-01-26 20:55:24 +0000 | |||
2845 | +++ account_banking_nl_clieop/wizard/__init__.py 2013-05-06 14:07:28 +0000 | |||
2846 | @@ -5,16 +5,16 @@ | |||
2847 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
2848 | 6 | # | 6 | # |
2849 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
2851 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
2852 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
2853 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
2854 | 11 | # | 11 | # |
2855 | 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, |
2856 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2857 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2859 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
2860 | 16 | # | 16 | # |
2862 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
2863 | 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/>. |
2864 | 19 | # | 19 | # |
2865 | 20 | ############################################################################## | 20 | ############################################################################## |
2866 | 21 | 21 | ||
2867 | === modified file 'account_banking_nl_clieop/wizard/clieop.py' | |||
2868 | --- account_banking_nl_clieop/wizard/clieop.py 2013-01-28 10:19:32 +0000 | |||
2869 | +++ account_banking_nl_clieop/wizard/clieop.py 2013-05-06 14:07:28 +0000 | |||
2870 | @@ -5,16 +5,16 @@ | |||
2871 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
2872 | 6 | # | 6 | # |
2873 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
2875 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
2876 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
2877 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
2878 | 11 | # | 11 | # |
2879 | 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, |
2880 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2881 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2883 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
2884 | 16 | # | 16 | # |
2886 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
2887 | 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/>. |
2888 | 19 | # | 19 | # |
2889 | 20 | ############################################################################## | 20 | ############################################################################## |
2890 | 21 | 21 | ||
2891 | === modified file 'account_banking_nl_clieop/wizard/export_clieop.py' | |||
2892 | --- account_banking_nl_clieop/wizard/export_clieop.py 2013-01-02 15:14:53 +0000 | |||
2893 | +++ account_banking_nl_clieop/wizard/export_clieop.py 2013-05-06 14:07:28 +0000 | |||
2894 | @@ -5,16 +5,16 @@ | |||
2895 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
2896 | 6 | # | 6 | # |
2897 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
2899 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
2900 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
2901 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
2902 | 11 | # | 11 | # |
2903 | 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, |
2904 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2905 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2907 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
2908 | 16 | # | 16 | # |
2910 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
2911 | 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/>. |
2912 | 19 | # | 19 | # |
2913 | 20 | ############################################################################## | 20 | ############################################################################## |
2914 | 21 | 21 | ||
2915 | === modified file 'account_banking_nl_girotel/__init__.py' | |||
2916 | --- account_banking_nl_girotel/__init__.py 2010-07-16 15:28:32 +0000 | |||
2917 | +++ account_banking_nl_girotel/__init__.py 2013-05-06 14:07:28 +0000 | |||
2918 | @@ -11,16 +11,16 @@ | |||
2919 | 11 | # garantees and support are strongly adviced to contract EduSense BV | 11 | # garantees and support are strongly adviced to contract EduSense BV |
2920 | 12 | # | 12 | # |
2921 | 13 | # This program is free software: you can redistribute it and/or modify | 13 | # This program is free software: you can redistribute it and/or modify |
2923 | 14 | # it under the terms of the GNU General Public License as published by | 14 | # it under the terms of the GNU Affero General Public License as published by |
2924 | 15 | # the Free Software Foundation, either version 3 of the License, or | 15 | # the Free Software Foundation, either version 3 of the License, or |
2925 | 16 | # (at your option) any later version. | 16 | # (at your option) any later version. |
2926 | 17 | # | 17 | # |
2927 | 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, |
2928 | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2929 | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2931 | 21 | # GNU General Public License for more details. | 21 | # GNU Affero General Public License for more details. |
2932 | 22 | # | 22 | # |
2934 | 23 | # You should have received a copy of the GNU General Public License | 23 | # You should have received a copy of the GNU Affero General Public License |
2935 | 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/>. |
2936 | 25 | # | 25 | # |
2937 | 26 | ############################################################################## | 26 | ############################################################################## |
2938 | 27 | 27 | ||
2939 | === renamed file 'account_banking_nl_girotel/__terp__.py' => 'account_banking_nl_girotel/__openerp__.py' | |||
2940 | --- account_banking_nl_girotel/__terp__.py 2011-05-05 10:29:28 +0000 | |||
2941 | +++ account_banking_nl_girotel/__openerp__.py 2013-05-06 14:07:28 +0000 | |||
2942 | @@ -3,44 +3,35 @@ | |||
2943 | 3 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). | 3 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). |
2944 | 4 | # All Rights Reserved | 4 | # All Rights Reserved |
2945 | 5 | # | 5 | # |
2946 | 6 | # WARNING: This program as such is intended to be used by professional | ||
2947 | 7 | # programmers who take the whole responsability of assessing all potential | ||
2948 | 8 | # consequences resulting from its eventual inadequacies and bugs | ||
2949 | 9 | # End users who are looking for a ready-to-use solution with commercial | ||
2950 | 10 | # garantees and support are strongly adviced to contract EduSense BV | ||
2951 | 11 | # | ||
2952 | 12 | # This program is free software: you can redistribute it and/or modify | 6 | # This program is free software: you can redistribute it and/or modify |
2954 | 13 | # it under the terms of the GNU General Public License as published by | 7 | # it under the terms of the GNU Affero General Public License as published by |
2955 | 14 | # the Free Software Foundation, either version 3 of the License, or | 8 | # the Free Software Foundation, either version 3 of the License, or |
2956 | 15 | # (at your option) any later version. | 9 | # (at your option) any later version. |
2957 | 16 | # | 10 | # |
2958 | 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, |
2959 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2960 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2962 | 20 | # GNU General Public License for more details. | 14 | # GNU Affero General Public License for more details. |
2963 | 21 | # | 15 | # |
2965 | 22 | # You should have received a copy of the GNU General Public License | 16 | # You should have received a copy of the GNU Affero General Public License |
2966 | 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/>. |
2967 | 24 | # | 18 | # |
2968 | 25 | ############################################################################## | 19 | ############################################################################## |
2969 | 26 | { | 20 | { |
2970 | 27 | 'name': 'Account Banking - Girotel', | 21 | 'name': 'Account Banking - Girotel', |
2971 | 28 | 'version': '0.62', | 22 | 'version': '0.62', |
2973 | 29 | 'license': 'GPL-3', | 23 | 'license': 'AGPL-3', |
2974 | 30 | 'author': 'EduSense BV', | 24 | 'author': 'EduSense BV', |
2975 | 31 | 'website': 'http://www.edusense.nl', | 25 | 'website': 'http://www.edusense.nl', |
2976 | 32 | 'category': 'Account Banking', | 26 | 'category': 'Account Banking', |
2977 | 33 | 'depends': ['account_banking'], | 27 | 'depends': ['account_banking'], |
2980 | 34 | 'init_xml': [], | 28 | 'data': [ |
2979 | 35 | 'update_xml': [ | ||
2981 | 36 | #'security/ir.model.access.csv', | 29 | #'security/ir.model.access.csv', |
2982 | 37 | ], | 30 | ], |
2983 | 38 | 'demo_xml': [], | ||
2984 | 39 | 'description': ''' | 31 | 'description': ''' |
2985 | 40 | Module to import Dutch Girotel format transation files. | 32 | Module to import Dutch Girotel format transation files. |
2986 | 41 | 33 | ||
2987 | 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. |
2988 | 43 | ''', | 35 | ''', |
2989 | 44 | 'active': False, | ||
2990 | 45 | 'installable': True, | 36 | 'installable': True, |
2991 | 46 | } | 37 | } |
2992 | 47 | 38 | ||
2993 | === modified file 'account_banking_nl_girotel/girotel.py' | |||
2994 | --- account_banking_nl_girotel/girotel.py 2012-07-09 17:04:14 +0000 | |||
2995 | +++ account_banking_nl_girotel/girotel.py 2013-05-06 14:07:28 +0000 | |||
2996 | @@ -5,16 +5,16 @@ | |||
2997 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
2998 | 6 | # | 6 | # |
2999 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
3001 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
3002 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
3003 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
3004 | 11 | # | 11 | # |
3005 | 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, |
3006 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3007 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3009 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
3010 | 16 | # | 16 | # |
3012 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
3013 | 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/>. |
3014 | 19 | # | 19 | # |
3015 | 20 | ############################################################################## | 20 | ############################################################################## |
3016 | 21 | 21 | ||
3017 | === modified file 'account_banking_nl_ing/__init__.py' | |||
3018 | --- account_banking_nl_ing/__init__.py 2011-12-11 16:09:20 +0000 | |||
3019 | +++ account_banking_nl_ing/__init__.py 2013-05-06 14:07:28 +0000 | |||
3020 | @@ -1,4 +1,2 @@ | |||
3022 | 1 | # -*- encoding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
3023 | 2 | import ing | 2 | import ing |
3024 | 3 | |||
3025 | 4 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
3026 | 5 | 3 | ||
3027 | === modified file 'account_banking_nl_ing/__openerp__.py' | |||
3028 | --- account_banking_nl_ing/__openerp__.py 2013-02-26 21:06:36 +0000 | |||
3029 | +++ account_banking_nl_ing/__openerp__.py 2013-05-06 14:07:28 +0000 | |||
3030 | @@ -8,39 +8,29 @@ | |||
3031 | 8 | # | 8 | # |
3032 | 9 | # All Rights Reserved | 9 | # All Rights Reserved |
3033 | 10 | # | 10 | # |
3034 | 11 | # WARNING: This program as such is intended to be used by professional | ||
3035 | 12 | # programmers who take the whole responsability of assessing all potential | ||
3036 | 13 | # consequences resulting from its eventual inadequacies and bugs | ||
3037 | 14 | # End users who are looking for a ready-to-use solution with commercial | ||
3038 | 15 | # garantees and support are strongly adviced to contract EduSense BV | ||
3039 | 16 | # or Therp BV | ||
3040 | 17 | # | ||
3041 | 18 | # This program is free software: you can redistribute it and/or modify | 11 | # This program is free software: you can redistribute it and/or modify |
3045 | 19 | # it under the terms of the GNU General Public License as published by | 12 | # it under the terms of the GNU Affero General Public License as |
3046 | 20 | # the Free Software Foundation, either version 3 of the License, or | 13 | # published by the Free Software Foundation, either version 3 of the |
3047 | 21 | # (at your option) any later version. | 14 | # License, or (at your option) any later version. |
3048 | 22 | # | 15 | # |
3049 | 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, |
3050 | 24 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3051 | 25 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3053 | 26 | # GNU General Public License for more details. | 19 | # GNU Affero General Public License for more details. |
3054 | 27 | # | 20 | # |
3056 | 28 | # You should have received a copy of the GNU General Public License | 21 | # You should have received a copy of the GNU Affero General Public License |
3057 | 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/>. |
3058 | 30 | # | 23 | # |
3059 | 31 | ############################################################################## | 24 | ############################################################################## |
3060 | 25 | |||
3061 | 32 | { | 26 | { |
3062 | 33 | 'name': 'ING (NL) Bank Statements Import', | 27 | 'name': 'ING (NL) Bank Statements Import', |
3063 | 34 | 'version': '0.1.140', | 28 | 'version': '0.1.140', |
3065 | 35 | 'license': 'GPL-3', | 29 | 'license': 'AGPL-3', |
3066 | 36 | 'author': ['Smile', 'Therp BV', 'EduSense BV'], | 30 | 'author': ['Smile', 'Therp BV', 'EduSense BV'], |
3067 | 37 | 'website': 'https://launchpad.net/banking-addons', | 31 | 'website': 'https://launchpad.net/banking-addons', |
3068 | 38 | 'category': 'Banking addons', | 32 | 'category': 'Banking addons', |
3069 | 39 | 'depends': ['account_banking'], | 33 | 'depends': ['account_banking'], |
3070 | 40 | 'init_xml': [], | ||
3071 | 41 | 'update_xml': [ | ||
3072 | 42 | ], | ||
3073 | 43 | 'demo_xml': [], | ||
3074 | 44 | 'description': ''' | 34 | 'description': ''' |
3075 | 45 | Module to import Dutch ING bank format transaction files. The format covered | 35 | Module to import Dutch ING bank format transaction files. The format covered |
3076 | 46 | is the CSV format with either 'dd-mm-yyyy' or 'yyyymmdd' date syntax. | 36 | is the CSV format with either 'dd-mm-yyyy' or 'yyyymmdd' date syntax. |
3077 | @@ -57,6 +47,5 @@ | |||
3078 | 57 | 47 | ||
3079 | 58 | This modules contains no logic, just an import filter for account_banking. | 48 | This modules contains no logic, just an import filter for account_banking. |
3080 | 59 | ''', | 49 | ''', |
3083 | 60 | 'active': False, | 50 | 'installable': True, |
3082 | 61 | 'installable': False, | ||
3084 | 62 | } | 51 | } |
3085 | 63 | 52 | ||
3086 | === removed file 'account_banking_nl_ing/__terp__.py' | |||
3087 | --- account_banking_nl_ing/__terp__.py 2011-12-21 11:26:36 +0000 | |||
3088 | +++ account_banking_nl_ing/__terp__.py 1970-01-01 00:00:00 +0000 | |||
3089 | @@ -1,58 +0,0 @@ | |||
3090 | 1 | ############################################################################## | ||
3091 | 2 | # | ||
3092 | 3 | # Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>) | ||
3093 | 4 | # and Therp BV (<http://therp.nl>) | ||
3094 | 5 | # All Rights Reserved | ||
3095 | 6 | # | ||
3096 | 7 | # WARNING: This program as such is intended to be used by professional | ||
3097 | 8 | # programmers who take the whole responsability of assessing all potential | ||
3098 | 9 | # consequences resulting from its eventual inadequacies and bugs | ||
3099 | 10 | # End users who are looking for a ready-to-use solution with commercial | ||
3100 | 11 | # garantees and support are strongly adviced to contract EduSense BV | ||
3101 | 12 | # or Therp BV | ||
3102 | 13 | # | ||
3103 | 14 | # This program is free software: you can redistribute it and/or modify | ||
3104 | 15 | # it under the terms of the GNU General Public License as published by | ||
3105 | 16 | # the Free Software Foundation, either version 3 of the License, or | ||
3106 | 17 | # (at your option) any later version. | ||
3107 | 18 | # | ||
3108 | 19 | # This program is distributed in the hope that it will be useful, | ||
3109 | 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3110 | 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3111 | 22 | # GNU General Public License for more details. | ||
3112 | 23 | # | ||
3113 | 24 | # You should have received a copy of the GNU General Public License | ||
3114 | 25 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3115 | 26 | # | ||
3116 | 27 | ############################################################################## | ||
3117 | 28 | { | ||
3118 | 29 | 'name': 'ING (NL) Bank Statements Import', | ||
3119 | 30 | 'version': '0.1.89', | ||
3120 | 31 | 'license': 'GPL-3', | ||
3121 | 32 | 'author': 'Smile / Therp BV / EduSense BV', | ||
3122 | 33 | 'website': 'https://launchpad.net/banking-addons', | ||
3123 | 34 | 'category': 'Banking addons', | ||
3124 | 35 | 'depends': ['account_banking'], | ||
3125 | 36 | 'init_xml': [], | ||
3126 | 37 | 'update_xml': [ | ||
3127 | 38 | ], | ||
3128 | 39 | 'demo_xml': [], | ||
3129 | 40 | 'description': ''' | ||
3130 | 41 | |||
3131 | 42 | Module to import Dutch ING bank format transation files (CSV format). | ||
3132 | 43 | |||
3133 | 44 | As the ING bank does not provide detailed specification concerning possible | ||
3134 | 45 | values and their meaning for the fields in the CSV file format, the statements | ||
3135 | 46 | are parsed according to an educated guess based on incomplete information. | ||
3136 | 47 | You can contact the banking-addons developers through their launchpad page and | ||
3137 | 48 | help improve the performance of this import filter on | ||
3138 | 49 | https://launchpad.net/banking-addons. | ||
3139 | 50 | |||
3140 | 51 | Note that imported bank transfers are organized in statements covering periods | ||
3141 | 52 | of one week, even if the imported files cover a different period. | ||
3142 | 53 | |||
3143 | 54 | This modules contains no logic, just an import filter for account_banking. | ||
3144 | 55 | ''', | ||
3145 | 56 | 'active': False, | ||
3146 | 57 | 'installable': True, | ||
3147 | 58 | } | ||
3148 | 59 | 0 | ||
3149 | === modified file 'account_banking_nl_ing/ing.py' | |||
3150 | --- account_banking_nl_ing/ing.py 2012-10-04 08:56:19 +0000 | |||
3151 | +++ account_banking_nl_ing/ing.py 2013-05-06 14:07:28 +0000 | |||
3152 | @@ -1,4 +1,4 @@ | |||
3154 | 1 | # -*- encoding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
3155 | 2 | ############################################################################## | 2 | ############################################################################## |
3156 | 3 | # | 3 | # |
3157 | 4 | # Copyright (C) 2011 Smile (<http://smile.fr>). | 4 | # Copyright (C) 2011 Smile (<http://smile.fr>). |
3158 | @@ -10,25 +10,25 @@ | |||
3159 | 10 | # All Rights Reserved | 10 | # All Rights Reserved |
3160 | 11 | # | 11 | # |
3161 | 12 | # This program is free software: you can redistribute it and/or modify | 12 | # This program is free software: you can redistribute it and/or modify |
3165 | 13 | # it under the terms of the GNU General Public License as published by | 13 | # it under the terms of the GNU Affero General Public License as |
3166 | 14 | # the Free Software Foundation, either version 3 of the License, or | 14 | # published by the Free Software Foundation, either version 3 of the |
3167 | 15 | # (at your option) any later version. | 15 | # License, or (at your option) any later version. |
3168 | 16 | # | 16 | # |
3169 | 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, |
3170 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3171 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3173 | 20 | # GNU General Public License for more details. | 20 | # GNU Affero General Public License for more details. |
3174 | 21 | # | 21 | # |
3176 | 22 | # You should have received a copy of the GNU General Public License | 22 | # You should have received a copy of the GNU Affero General Public License |
3177 | 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/>. |
3178 | 24 | # | 24 | # |
3179 | 25 | ############################################################################## | 25 | ############################################################################## |
3180 | 26 | 26 | ||
3181 | 27 | from datetime import datetime | 27 | from datetime import datetime |
3186 | 28 | from account_banking.parsers import models | 28 | from openerp.addons.account_banking.parsers import models |
3187 | 29 | from account_banking.parsers.convert import str2date | 29 | from openerp.addons.account_banking.parsers.convert import str2date |
3188 | 30 | from account_banking.sepa import postalcode | 30 | from openerp.addons.account_banking.sepa import postalcode |
3189 | 31 | from tools.translate import _ | 31 | from openerp.tools.translate import _ |
3190 | 32 | 32 | ||
3191 | 33 | import re | 33 | import re |
3192 | 34 | import csv | 34 | import csv |
3193 | 35 | 35 | ||
3194 | === modified file 'account_banking_nl_multibank/__init__.py' | |||
3195 | --- account_banking_nl_multibank/__init__.py 2010-01-26 20:55:24 +0000 | |||
3196 | +++ account_banking_nl_multibank/__init__.py 2013-05-06 14:07:28 +0000 | |||
3197 | @@ -11,16 +11,16 @@ | |||
3198 | 11 | # garantees and support are strongly adviced to contract EduSense BV | 11 | # garantees and support are strongly adviced to contract EduSense BV |
3199 | 12 | # | 12 | # |
3200 | 13 | # This program is free software: you can redistribute it and/or modify | 13 | # This program is free software: you can redistribute it and/or modify |
3202 | 14 | # it under the terms of the GNU General Public License as published by | 14 | # it under the terms of the GNU Affero General Public License as published by |
3203 | 15 | # the Free Software Foundation, either version 3 of the License, or | 15 | # the Free Software Foundation, either version 3 of the License, or |
3204 | 16 | # (at your option) any later version. | 16 | # (at your option) any later version. |
3205 | 17 | # | 17 | # |
3206 | 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, |
3207 | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3208 | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3210 | 21 | # GNU General Public License for more details. | 21 | # GNU Affero General Public License for more details. |
3211 | 22 | # | 22 | # |
3213 | 23 | # You should have received a copy of the GNU General Public License | 23 | # You should have received a copy of the GNU Affero General Public License |
3214 | 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/>. |
3215 | 25 | # | 25 | # |
3216 | 26 | ############################################################################## | 26 | ############################################################################## |
3217 | 27 | 27 | ||
3218 | === renamed file 'account_banking_nl_multibank/__terp__.py' => 'account_banking_nl_multibank/__openerp__.py' | |||
3219 | --- account_banking_nl_multibank/__terp__.py 2011-05-05 10:29:28 +0000 | |||
3220 | +++ account_banking_nl_multibank/__openerp__.py 2013-05-06 14:07:28 +0000 | |||
3221 | @@ -1,46 +1,36 @@ | |||
3222 | 1 | # -*- coding: utf-8 -*- | ||
3223 | 1 | ############################################################################## | 2 | ############################################################################## |
3224 | 2 | # | 3 | # |
3225 | 3 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). | 4 | # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). |
3226 | 4 | # All Rights Reserved | 5 | # All Rights Reserved |
3227 | 5 | # | 6 | # |
3228 | 6 | # WARNING: This program as such is intended to be used by professional | ||
3229 | 7 | # programmers who take the whole responsability of assessing all potential | ||
3230 | 8 | # consequences resulting from its eventual inadequacies and bugs | ||
3231 | 9 | # End users who are looking for a ready-to-use solution with commercial | ||
3232 | 10 | # garantees and support are strongly adviced to contract EduSense BV | ||
3233 | 11 | # | ||
3234 | 12 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
3238 | 13 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as |
3239 | 14 | # the Free Software Foundation, either version 3 of the License, or | 9 | # published by the Free Software Foundation, either version 3 of the |
3240 | 15 | # (at your option) any later version. | 10 | # License, or (at your option) any later version. |
3241 | 16 | # | 11 | # |
3242 | 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, |
3243 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3244 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3246 | 20 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
3247 | 21 | # | 16 | # |
3249 | 22 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
3250 | 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/>. |
3251 | 24 | # | 19 | # |
3252 | 25 | ############################################################################## | 20 | ############################################################################## |
3253 | 21 | |||
3254 | 26 | { | 22 | { |
3255 | 27 | 'name': 'Account Banking', | 23 | 'name': 'Account Banking', |
3256 | 28 | 'version': '0.62', | 24 | 'version': '0.62', |
3258 | 29 | 'license': 'GPL-3', | 25 | 'license': 'AGPL-3', |
3259 | 30 | 'author': 'EduSense BV', | 26 | 'author': 'EduSense BV', |
3260 | 31 | 'website': 'http://www.edusense.nl', | 27 | 'website': 'http://www.edusense.nl', |
3261 | 32 | 'category': 'Account Banking', | 28 | 'category': 'Account Banking', |
3262 | 33 | 'depends': ['account_banking'], | 29 | 'depends': ['account_banking'], |
3263 | 34 | 'init_xml': [], | ||
3264 | 35 | 'update_xml': [ | ||
3265 | 36 | #'security/ir.model.access.csv', | ||
3266 | 37 | ], | ||
3267 | 38 | 'demo_xml': [], | ||
3268 | 39 | 'description': ''' | 30 | 'description': ''' |
3269 | 40 | Module to import Dutch Multibank format transation files. | 31 | Module to import Dutch Multibank format transation files. |
3270 | 41 | 32 | ||
3271 | 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. |
3272 | 43 | ''', | 34 | ''', |
3273 | 44 | 'active': False, | ||
3274 | 45 | 'installable': True, | 35 | 'installable': True, |
3275 | 46 | } | 36 | } |
3276 | 47 | 37 | ||
3277 | === modified file 'account_banking_nl_multibank/multibank.py' | |||
3278 | --- account_banking_nl_multibank/multibank.py 2012-01-17 08:48:10 +0000 | |||
3279 | +++ account_banking_nl_multibank/multibank.py 2013-05-06 14:07:28 +0000 | |||
3280 | @@ -5,16 +5,16 @@ | |||
3281 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
3282 | 6 | # | 6 | # |
3283 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
3285 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
3286 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
3287 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
3288 | 11 | # | 11 | # |
3289 | 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, |
3290 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3291 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3293 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
3294 | 16 | # | 16 | # |
3296 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
3297 | 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/>. |
3298 | 19 | # | 19 | # |
3299 | 20 | ############################################################################## | 20 | ############################################################################## |
3300 | 21 | 21 | ||
3301 | === modified file 'account_banking_nl_triodos/__init__.py' | |||
3302 | --- account_banking_nl_triodos/__init__.py 2011-04-26 21:00:12 +0000 | |||
3303 | +++ account_banking_nl_triodos/__init__.py 2013-05-06 14:07:28 +0000 | |||
3304 | @@ -13,16 +13,16 @@ | |||
3305 | 13 | # or Therp BV | 13 | # or Therp BV |
3306 | 14 | # | 14 | # |
3307 | 15 | # This program is free software: you can redistribute it and/or modify | 15 | # This program is free software: you can redistribute it and/or modify |
3309 | 16 | # it under the terms of the GNU General Public License as published by | 16 | # it under the terms of the GNU Affero General Public License as published by |
3310 | 17 | # the Free Software Foundation, either version 3 of the License, or | 17 | # the Free Software Foundation, either version 3 of the License, or |
3311 | 18 | # (at your option) any later version. | 18 | # (at your option) any later version. |
3312 | 19 | # | 19 | # |
3313 | 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, |
3314 | 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3315 | 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3317 | 23 | # GNU General Public License for more details. | 23 | # GNU Affero General Public License for more details. |
3318 | 24 | # | 24 | # |
3320 | 25 | # You should have received a copy of the GNU General Public License | 25 | # You should have received a copy of the GNU Affero General Public License |
3321 | 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/>. |
3322 | 27 | # | 27 | # |
3323 | 28 | ############################################################################## | 28 | ############################################################################## |
3324 | 29 | 29 | ||
3325 | === modified file 'account_banking_nl_triodos/__openerp__.py' | |||
3326 | --- account_banking_nl_triodos/__openerp__.py 2013-02-26 21:06:36 +0000 | |||
3327 | +++ account_banking_nl_triodos/__openerp__.py 2013-05-06 14:07:28 +0000 | |||
3328 | @@ -4,40 +4,28 @@ | |||
3329 | 4 | # and Therp BV (<http://therp.nl>) | 4 | # and Therp BV (<http://therp.nl>) |
3330 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
3331 | 6 | # | 6 | # |
3332 | 7 | # WARNING: This program as such is intended to be used by professional | ||
3333 | 8 | # programmers who take the whole responsability of assessing all potential | ||
3334 | 9 | # consequences resulting from its eventual inadequacies and bugs | ||
3335 | 10 | # End users who are looking for a ready-to-use solution with commercial | ||
3336 | 11 | # garantees and support are strongly adviced to contract EduSense BV | ||
3337 | 12 | # or Therp BV | ||
3338 | 13 | # | ||
3339 | 14 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
3341 | 15 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
3342 | 16 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
3343 | 17 | # (at your option) any later version. | 10 | # (at your option) any later version. |
3344 | 18 | # | 11 | # |
3345 | 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, |
3346 | 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3347 | 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3349 | 22 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
3350 | 23 | # | 16 | # |
3352 | 24 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
3353 | 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/>. |
3354 | 26 | # | 19 | # |
3355 | 27 | ############################################################################## | 20 | ############################################################################## |
3356 | 28 | { | 21 | { |
3357 | 29 | 'name': 'Triodos (NL) Bank Statements Import', | 22 | 'name': 'Triodos (NL) Bank Statements Import', |
3358 | 30 | 'version': '0.92', | 23 | 'version': '0.92', |
3361 | 31 | 'license': 'GPL-3', | 24 | 'license': 'AGPL-3', |
3362 | 32 | 'author': 'Therp BV / EduSense BV', | 25 | 'author': ['Therp BV', 'EduSense BV'], |
3363 | 33 | 'website': 'https://launchpad.net/account-banking', | 26 | 'website': 'https://launchpad.net/account-banking', |
3364 | 34 | 'category': 'Account Banking', | 27 | 'category': 'Account Banking', |
3365 | 35 | 'depends': ['account_banking'], | 28 | 'depends': ['account_banking'], |
3366 | 36 | 'init_xml': [], | ||
3367 | 37 | 'update_xml': [ | ||
3368 | 38 | #'security/ir.model.access.csv', | ||
3369 | 39 | ], | ||
3370 | 40 | 'demo_xml': [], | ||
3371 | 41 | 'description': ''' | 29 | 'description': ''' |
3372 | 42 | Module to import Dutch Triodos bank format transation files (CSV format). | 30 | Module to import Dutch Triodos bank format transation files (CSV format). |
3373 | 43 | 31 | ||
3374 | @@ -53,6 +41,5 @@ | |||
3375 | 53 | 41 | ||
3376 | 54 | This modules contains no logic, just an import filter for account_banking. | 42 | This modules contains no logic, just an import filter for account_banking. |
3377 | 55 | ''', | 43 | ''', |
3380 | 56 | 'active': False, | 44 | 'installable': True, |
3379 | 57 | 'installable': False, | ||
3381 | 58 | } | 45 | } |
3382 | 59 | 46 | ||
3383 | === removed file 'account_banking_nl_triodos/__terp__.py' | |||
3384 | --- account_banking_nl_triodos/__terp__.py 2011-05-05 10:29:28 +0000 | |||
3385 | +++ account_banking_nl_triodos/__terp__.py 1970-01-01 00:00:00 +0000 | |||
3386 | @@ -1,58 +0,0 @@ | |||
3387 | 1 | ############################################################################## | ||
3388 | 2 | # | ||
3389 | 3 | # Copyright (C) 2009 - 2011 EduSense BV (<http://www.edusense.nl>) | ||
3390 | 4 | # and Therp BV (<http://therp.nl>) | ||
3391 | 5 | # All Rights Reserved | ||
3392 | 6 | # | ||
3393 | 7 | # WARNING: This program as such is intended to be used by professional | ||
3394 | 8 | # programmers who take the whole responsability of assessing all potential | ||
3395 | 9 | # consequences resulting from its eventual inadequacies and bugs | ||
3396 | 10 | # End users who are looking for a ready-to-use solution with commercial | ||
3397 | 11 | # garantees and support are strongly adviced to contract EduSense BV | ||
3398 | 12 | # or Therp BV | ||
3399 | 13 | # | ||
3400 | 14 | # This program is free software: you can redistribute it and/or modify | ||
3401 | 15 | # it under the terms of the GNU General Public License as published by | ||
3402 | 16 | # the Free Software Foundation, either version 3 of the License, or | ||
3403 | 17 | # (at your option) any later version. | ||
3404 | 18 | # | ||
3405 | 19 | # This program is distributed in the hope that it will be useful, | ||
3406 | 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3407 | 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3408 | 22 | # GNU General Public License for more details. | ||
3409 | 23 | # | ||
3410 | 24 | # You should have received a copy of the GNU General Public License | ||
3411 | 25 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3412 | 26 | # | ||
3413 | 27 | ############################################################################## | ||
3414 | 28 | { | ||
3415 | 29 | 'name': 'Triodos (NL) Bank Statements Import', | ||
3416 | 30 | 'version': '0.62', | ||
3417 | 31 | 'license': 'GPL-3', | ||
3418 | 32 | 'author': 'Therp BV / EduSense BV', | ||
3419 | 33 | 'website': 'https://launchpad.net/account-banking', | ||
3420 | 34 | 'category': 'Account Banking', | ||
3421 | 35 | 'depends': ['account_banking'], | ||
3422 | 36 | 'init_xml': [], | ||
3423 | 37 | 'update_xml': [ | ||
3424 | 38 | #'security/ir.model.access.csv', | ||
3425 | 39 | ], | ||
3426 | 40 | 'demo_xml': [], | ||
3427 | 41 | 'description': ''' | ||
3428 | 42 | Module to import Dutch Triodos bank format transation files (CSV format). | ||
3429 | 43 | |||
3430 | 44 | As the Triodos bank does not provide detailed specification concerning possible | ||
3431 | 45 | values and their meaning for the fields in the CSV file format, the statements | ||
3432 | 46 | are parsed according to an educated guess based on incomplete information. | ||
3433 | 47 | You can contact the account-banking developers through their launchpad page and | ||
3434 | 48 | help improve the performance of this import filter on | ||
3435 | 49 | https://launchpad.net/account-banking. | ||
3436 | 50 | |||
3437 | 51 | Note that imported bank transfers are organized in statements covering periods | ||
3438 | 52 | of one week, even if the imported files cover a different period. | ||
3439 | 53 | |||
3440 | 54 | This modules contains no logic, just an import filter for account_banking. | ||
3441 | 55 | ''', | ||
3442 | 56 | 'active': False, | ||
3443 | 57 | 'installable': True, | ||
3444 | 58 | } | ||
3445 | 59 | 0 | ||
3446 | === modified file 'account_banking_nl_triodos/triodos.py' | |||
3447 | --- account_banking_nl_triodos/triodos.py 2012-01-17 08:48:10 +0000 | |||
3448 | +++ account_banking_nl_triodos/triodos.py 2013-05-06 14:07:28 +0000 | |||
3449 | @@ -6,16 +6,16 @@ | |||
3450 | 6 | # All Rights Reserved | 6 | # All Rights Reserved |
3451 | 7 | # | 7 | # |
3452 | 8 | # This program is free software: you can redistribute it and/or modify | 8 | # This program is free software: you can redistribute it and/or modify |
3454 | 9 | # it under the terms of the GNU General Public License as published by | 9 | # it under the terms of the GNU Affero General Public License as published by |
3455 | 10 | # the Free Software Foundation, either version 3 of the License, or | 10 | # the Free Software Foundation, either version 3 of the License, or |
3456 | 11 | # (at your option) any later version. | 11 | # (at your option) any later version. |
3457 | 12 | # | 12 | # |
3458 | 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, |
3459 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3460 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3462 | 16 | # GNU General Public License for more details. | 16 | # GNU Affero General Public License for more details. |
3463 | 17 | # | 17 | # |
3465 | 18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU Affero General Public License |
3466 | 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/>. |
3467 | 20 | # | 20 | # |
3468 | 21 | ############################################################################## | 21 | ############################################################################## |
3469 | 22 | 22 | ||
3470 | === modified file 'account_banking_uk_hsbc/__openerp__.py' | |||
3471 | --- account_banking_uk_hsbc/__openerp__.py 2013-02-26 21:06:36 +0000 | |||
3472 | +++ account_banking_uk_hsbc/__openerp__.py 2013-05-06 14:07:28 +0000 | |||
3473 | @@ -26,15 +26,13 @@ | |||
3474 | 26 | 'website': 'http://www.credativ.co.uk', | 26 | 'website': 'http://www.credativ.co.uk', |
3475 | 27 | 'category': 'Account Banking', | 27 | 'category': 'Account Banking', |
3476 | 28 | 'depends': ['account_banking'], | 28 | 'depends': ['account_banking'], |
3479 | 29 | 'init_xml': [], | 29 | 'data': [ |
3478 | 30 | 'update_xml': [ | ||
3480 | 31 | 'account_banking_uk_hsbc.xml', | 30 | 'account_banking_uk_hsbc.xml', |
3481 | 32 | 'hsbc_clientid_view.xml', | 31 | 'hsbc_clientid_view.xml', |
3482 | 33 | 'data/banking_export_hsbc.xml', | 32 | 'data/banking_export_hsbc.xml', |
3483 | 34 | 'wizard/export_hsbc_view.xml', | 33 | 'wizard/export_hsbc_view.xml', |
3484 | 35 | 'security/ir.model.access.csv', | 34 | 'security/ir.model.access.csv', |
3485 | 36 | ], | 35 | ], |
3486 | 37 | 'demo_xml': [], | ||
3487 | 38 | 'description': ''' | 36 | 'description': ''' |
3488 | 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). |
3489 | 40 | 38 | ||
3490 | @@ -47,6 +45,5 @@ | |||
3491 | 47 | 45 | ||
3492 | 48 | Initial release of this module was co-sponsored by Canonical. | 46 | Initial release of this module was co-sponsored by Canonical. |
3493 | 49 | ''', | 47 | ''', |
3496 | 50 | 'active': False, | 48 | 'installable': True, |
3495 | 51 | 'installable': False, | ||
3497 | 52 | } | 49 | } |
3498 | 53 | 50 | ||
3499 | === modified file 'account_banking_uk_hsbc/account_banking_uk_hsbc.py' | |||
3500 | --- account_banking_uk_hsbc/account_banking_uk_hsbc.py 2012-03-27 14:55:03 +0000 | |||
3501 | +++ account_banking_uk_hsbc/account_banking_uk_hsbc.py 2013-05-06 14:07:28 +0000 | |||
3502 | @@ -5,16 +5,16 @@ | |||
3503 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
3504 | 6 | # | 6 | # |
3505 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
3507 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
3508 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
3509 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
3510 | 11 | # | 11 | # |
3511 | 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, |
3512 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3513 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3515 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
3516 | 16 | # | 16 | # |
3518 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
3519 | 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/>. |
3520 | 19 | # | 19 | # |
3521 | 20 | ############################################################################## | 20 | ############################################################################## |
3522 | 21 | 21 | ||
3523 | === modified file 'account_banking_uk_hsbc/wizard/__init__.py' | |||
3524 | --- account_banking_uk_hsbc/wizard/__init__.py 2011-10-24 15:26:13 +0000 | |||
3525 | +++ account_banking_uk_hsbc/wizard/__init__.py 2013-05-06 14:07:28 +0000 | |||
3526 | @@ -6,16 +6,16 @@ | |||
3527 | 6 | # All Rights Reserved | 6 | # All Rights Reserved |
3528 | 7 | # | 7 | # |
3529 | 8 | # This program is free software: you can redistribute it and/or modify | 8 | # This program is free software: you can redistribute it and/or modify |
3531 | 9 | # it under the terms of the GNU General Public License as published by | 9 | # it under the terms of the GNU Affero General Public License as published by |
3532 | 10 | # the Free Software Foundation, either version 3 of the License, or | 10 | # the Free Software Foundation, either version 3 of the License, or |
3533 | 11 | # (at your option) any later version. | 11 | # (at your option) any later version. |
3534 | 12 | # | 12 | # |
3535 | 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, |
3536 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3537 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3539 | 16 | # GNU General Public License for more details. | 16 | # GNU Affero General Public License for more details. |
3540 | 17 | # | 17 | # |
3542 | 18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU Affero General Public License |
3543 | 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/>. |
3544 | 20 | # | 20 | # |
3545 | 21 | ############################################################################## | 21 | ############################################################################## |
3546 | 22 | 22 | ||
3547 | === modified file 'account_banking_uk_hsbc/wizard/export_hsbc.py' | |||
3548 | --- account_banking_uk_hsbc/wizard/export_hsbc.py 2012-03-22 12:07:57 +0000 | |||
3549 | +++ account_banking_uk_hsbc/wizard/export_hsbc.py 2013-05-06 14:07:28 +0000 | |||
3550 | @@ -6,16 +6,16 @@ | |||
3551 | 6 | # All Rights Reserved | 6 | # All Rights Reserved |
3552 | 7 | # | 7 | # |
3553 | 8 | # This program is free software: you can redistribute it and/or modify | 8 | # This program is free software: you can redistribute it and/or modify |
3555 | 9 | # it under the terms of the GNU General Public License as published by | 9 | # it under the terms of the GNU Affero General Public License as published by |
3556 | 10 | # the Free Software Foundation, either version 3 of the License, or | 10 | # the Free Software Foundation, either version 3 of the License, or |
3557 | 11 | # (at your option) any later version. | 11 | # (at your option) any later version. |
3558 | 12 | # | 12 | # |
3559 | 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, |
3560 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3561 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3563 | 16 | # GNU General Public License for more details. | 16 | # GNU Affero General Public License for more details. |
3564 | 17 | # | 17 | # |
3566 | 18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU Affero General Public License |
3567 | 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/>. |
3568 | 20 | # | 20 | # |
3569 | 21 | ############################################################################## | 21 | ############################################################################## |
3570 | 22 | 22 | ||
3571 | === modified file 'account_banking_uk_hsbc/wizard/paymul.py' | |||
3572 | --- account_banking_uk_hsbc/wizard/paymul.py 2012-03-22 12:07:57 +0000 | |||
3573 | +++ account_banking_uk_hsbc/wizard/paymul.py 2013-05-06 14:07:28 +0000 | |||
3574 | @@ -5,16 +5,16 @@ | |||
3575 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
3576 | 6 | # | 6 | # |
3577 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
3579 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
3580 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
3581 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
3582 | 11 | # | 11 | # |
3583 | 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, |
3584 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3585 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3587 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
3588 | 16 | # | 16 | # |
3590 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
3591 | 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/>. |
3592 | 19 | # | 19 | # |
3593 | 20 | ############################################################################## | 20 | ############################################################################## |
3594 | 21 | 21 | ||
3595 | === modified file 'account_banking_uk_hsbc/wizard/paymul_test.py' | |||
3596 | --- account_banking_uk_hsbc/wizard/paymul_test.py 2011-10-24 15:26:13 +0000 | |||
3597 | +++ account_banking_uk_hsbc/wizard/paymul_test.py 2013-05-06 14:07:28 +0000 | |||
3598 | @@ -5,16 +5,16 @@ | |||
3599 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
3600 | 6 | # | 6 | # |
3601 | 7 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
3603 | 8 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
3604 | 9 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
3605 | 10 | # (at your option) any later version. | 10 | # (at your option) any later version. |
3606 | 11 | # | 11 | # |
3607 | 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, |
3608 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3609 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3611 | 15 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
3612 | 16 | # | 16 | # |
3614 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
3615 | 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/>. |
3616 | 19 | # | 19 | # |
3617 | 20 | ############################################################################## | 20 | ############################################################################## |
3618 | 21 | 21 | ||
3619 | === modified file 'account_direct_debit/__openerp__.py' | |||
3620 | --- account_direct_debit/__openerp__.py 2013-02-26 21:06:36 +0000 | |||
3621 | +++ account_direct_debit/__openerp__.py 2013-05-06 14:07:28 +0000 | |||
3622 | @@ -4,43 +4,35 @@ | |||
3623 | 4 | # Copyright (C) 2011 Smile (<http://smile.fr>). | 4 | # Copyright (C) 2011 Smile (<http://smile.fr>). |
3624 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
3625 | 6 | # | 6 | # |
3626 | 7 | # WARNING: This program as such is intended to be used by professional | ||
3627 | 8 | # programmers who take the whole responsability of assessing all potential | ||
3628 | 9 | # consequences resulting from its eventual inadequacies and bugs | ||
3629 | 10 | # End users who are looking for a ready-to-use solution with commercial | ||
3630 | 11 | # garantees and support are strongly adviced to contract EduSense BV | ||
3631 | 12 | # | ||
3632 | 13 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
3634 | 14 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
3635 | 15 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
3636 | 16 | # (at your option) any later version. | 10 | # (at your option) any later version. |
3637 | 17 | # | 11 | # |
3638 | 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, |
3639 | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3640 | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3642 | 21 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
3643 | 22 | # | 16 | # |
3645 | 23 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
3646 | 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/>. |
3647 | 25 | # | 19 | # |
3648 | 26 | ############################################################################## | 20 | ############################################################################## |
3649 | 27 | { | 21 | { |
3650 | 28 | 'name': 'Direct Debit', | 22 | 'name': 'Direct Debit', |
3651 | 29 | 'version': '6.1.1.134', | 23 | 'version': '6.1.1.134', |
3653 | 30 | 'license': 'GPL-3', | 24 | 'license': 'AGPL-3', |
3654 | 31 | 'author': 'Therp BV / Smile', | 25 | 'author': 'Therp BV / Smile', |
3655 | 32 | 'website': 'https://launchpad.net/banking-addons', | 26 | 'website': 'https://launchpad.net/banking-addons', |
3656 | 33 | 'category': 'Banking addons', | 27 | 'category': 'Banking addons', |
3657 | 34 | 'depends': ['account_banking'], | 28 | 'depends': ['account_banking'], |
3660 | 35 | 'init_xml': [], | 29 | 'data': [ |
3659 | 36 | 'update_xml': [ | ||
3661 | 37 | 'view/account_payment.xml', | 30 | 'view/account_payment.xml', |
3662 | 38 | 'view/account_invoice.xml', | 31 | 'view/account_invoice.xml', |
3663 | 39 | 'workflow/account_invoice.xml', | 32 | 'workflow/account_invoice.xml', |
3664 | 40 | 'workflow/account_payment.xml', | 33 | 'workflow/account_payment.xml', |
3665 | 41 | 'data/account_payment_term.xml', | 34 | 'data/account_payment_term.xml', |
3666 | 42 | ], | 35 | ], |
3667 | 43 | 'demo_xml': [], | ||
3668 | 44 | 'description': ''' | 36 | 'description': ''' |
3669 | 45 | This module adds support for direct debit orders, analogous to payment orders. | 37 | This module adds support for direct debit orders, analogous to payment orders. |
3670 | 46 | A new entry in the Accounting/Payment menu allow you to create a direct debit | 38 | A new entry in the Accounting/Payment menu allow you to create a direct debit |
3671 | @@ -57,6 +49,5 @@ | |||
3672 | 57 | banking institutions. The banking addons are a continuation of Account Banking | 49 | banking institutions. The banking addons are a continuation of Account Banking |
3673 | 58 | Framework by Edusense BV. See https://launchpad.net/banking-addons. | 50 | Framework by Edusense BV. See https://launchpad.net/banking-addons. |
3674 | 59 | ''', | 51 | ''', |
3675 | 60 | 'active': False, | ||
3676 | 61 | 'installable': False, | 52 | 'installable': False, |
3677 | 62 | } | 53 | } |
3678 | 63 | 54 | ||
3679 | === modified file 'account_payment_shortcut/__openerp__.py' | |||
3680 | --- account_payment_shortcut/__openerp__.py 2013-02-26 21:06:36 +0000 | |||
3681 | +++ account_payment_shortcut/__openerp__.py 2013-05-06 14:07:28 +0000 | |||
3682 | @@ -4,41 +4,30 @@ | |||
3683 | 4 | # 2011 Smile BV (<http://smile.fr>). | 4 | # 2011 Smile BV (<http://smile.fr>). |
3684 | 5 | # All Rights Reserved | 5 | # All Rights Reserved |
3685 | 6 | # | 6 | # |
3686 | 7 | # WARNING: This program as such is intended to be used by professional | ||
3687 | 8 | # programmers who take the whole responsability of assessing all potential | ||
3688 | 9 | # consequences resulting from its eventual inadequacies and bugs | ||
3689 | 10 | # End users who are looking for a ready-to-use solution with commercial | ||
3690 | 11 | # garantees and support are strongly adviced to contract EduSense BV | ||
3691 | 12 | # | ||
3692 | 13 | # This program is free software: you can redistribute it and/or modify | 7 | # This program is free software: you can redistribute it and/or modify |
3694 | 14 | # it under the terms of the GNU General Public License as published by | 8 | # it under the terms of the GNU Affero General Public License as published by |
3695 | 15 | # the Free Software Foundation, either version 3 of the License, or | 9 | # the Free Software Foundation, either version 3 of the License, or |
3696 | 16 | # (at your option) any later version. | 10 | # (at your option) any later version. |
3697 | 17 | # | 11 | # |
3698 | 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, |
3699 | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3700 | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3702 | 21 | # GNU General Public License for more details. | 15 | # GNU Affero General Public License for more details. |
3703 | 22 | # | 16 | # |
3705 | 23 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU Affero General Public License |
3706 | 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/>. |
3707 | 25 | # | 19 | # |
3708 | 26 | ############################################################################## | 20 | ############################################################################## |
3709 | 27 | { | 21 | { |
3710 | 28 | 'name': 'Account Payment Invoice Selection Shortcut', | 22 | 'name': 'Account Payment Invoice Selection Shortcut', |
3711 | 29 | 'version': '6.1.1.134', | 23 | 'version': '6.1.1.134', |
3713 | 30 | 'license': 'GPL-3', | 24 | 'license': 'AGPL-3', |
3714 | 31 | 'author': 'Smile / Therp BV', | 25 | 'author': 'Smile / Therp BV', |
3715 | 32 | 'website': 'https://launchpad.net/banking-addons', | 26 | 'website': 'https://launchpad.net/banking-addons', |
3716 | 33 | 'category': 'Banking addons', | 27 | 'category': 'Banking addons', |
3717 | 34 | 'depends': ['account_payment'], | 28 | 'depends': ['account_payment'], |
3718 | 35 | 'init_xml': [], | ||
3719 | 36 | 'update_xml': [ | ||
3720 | 37 | ], | ||
3721 | 38 | 'demo_xml': [], | ||
3722 | 39 | 'description': ''' | 29 | 'description': ''' |
3723 | 40 | When composing a payment order, select all candidates by default (in the second step of the "Select invoices to pay" wizard). | 30 | When composing a payment order, select all candidates by default (in the second step of the "Select invoices to pay" wizard). |
3724 | 41 | ''', | 31 | ''', |
3725 | 42 | 'active': False, | ||
3726 | 43 | 'installable': False, | 32 | 'installable': False, |
3727 | 44 | } | 33 | } |
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?