Merge lp:~openerp-community/openobject-addons/trunk-addons-community into lp:openobject-addons/extra-trunk

Proposed by Grzegorz Grzelak (OpenGLOBE.pl)
Status: Rejected
Rejected by: Xavier (Open ERP)
Proposed branch: lp:~openerp-community/openobject-addons/trunk-addons-community
Merge into: lp:openobject-addons/extra-trunk
Diff against target: 75514 lines (has conflicts)
Conflict adding file account_banking.  Moved existing file to account_banking.moved.
Conflict adding file account_banking_nl_clieop.  Moved existing file to account_banking_nl_clieop.moved.
Conflict adding file account_banking_nl_multibank.  Moved existing file to account_banking_nl_multibank.moved.
Conflict adding file l10n_chart_pl.  Moved existing file to l10n_chart_pl.moved.
Conflict adding file l10n_chart_ro.  Moved existing file to l10n_chart_ro.moved.
Conflict adding file printjob.  Moved existing file to printjob.moved.
Conflict adding file zarafa.  Moved existing file to zarafa.moved.
To merge this branch: bzr merge lp:~openerp-community/openobject-addons/trunk-addons-community
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+15162@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Grzegorz Grzelak (OpenGLOBE.pl) (grzegorz-og.pl) wrote :

It is my first proposal. I have reviewed l10n_chart_pl from trunk.
It contains now correct character coding, correct chart hierarchy, some account modification. There is no functional improvement but it can count on polish users acceptance (current l10n_chart_pl cannot). I placed the module here because am not yet Commiter. Please advice me if I should do something different to have this file in extra-addons.

129. By Niels Huylebroeck

[IMP] Using False instead of 0 to store the false condition.

130. By Niels Huylebroeck

[ADD] Project work entry module.

This module brings in another menu entry under Project -> Tasks.
It opens a small osv_memory wizard which allows you to select a project from the currently running projects.
Once selected it gives you an empty form of the project.task.work model with an extra filter on task_id
which filters on the project and task state = open.

131. By Naresh(OpenERP)

[IMP]:html report

132. By Hugo santos <hugo@hugo-desktop>

Made changes in report_contract: now you can print the report in 5.0.6 version of openerp-server, also you can add the services that the company offers in the company configuration

133. By Albert Cervera i Areny - http://www.NaN-tic.com

printjob: Set 'client' as default action for reports not in 'ir.actions.report.xml'. Otherwise workflows cannot be printed and give an error.

134. By Corentin POUHET-BRUNERIE <copou@dom>

[IMP] Add conditions on old values

135. By Franck BRET

product_brand is a module for managing Brand within product module

136. By Corentin POUHET-BRUNERIE <email address hidden>

[IMP]
1. Domain on old values accept polish notation
2. Add trigger on unlink method
3. Correct write_object_and_check_rules method
4. Update french translation
5. Correct run_now method for operator 'Is Changing'

137. By www.mgazelle.com

Initial version of a new office management module

138. By Corentin Pouhet-Brunerie <copou@dom>

[IMP] Add anti-recursion system

139. By Corentin Pouhet-Brunerie <copou@dom>

[FIX] Correct bug on context.copy()

140. By Niels Huylebroeck

[IMP] Updated description of project_work_entry module
[IMP] 'project_id' in wizard is now filled from context if it's available

141. By Jordi Esteve (www.zikzakmedia.com)

[FIX] report_contract: Fixed wrong files with collisions, added missing report_contract/report/contract.sxw

142. By Corentin Pouhet-Brunerie <copou@dom>

[FIX] Check if 'rules' exist in context before assignment

143. By Niels Huylebroeck

Fixed project_work_entry module so it's no longer dependent (or broken)

144. By Niels Huylebroeck

project_work_entry:
* now project form view has a button to call the wizard.
* the wizard should auto fill the field if context['project_id'] is filled.
 * bug https://bugs.launchpad.net/openobject-client/+bug/487649 however prevents this on windows

145. By Albert Cervera i Areny - http://www.NaN-tic.com

printjob: Added missing import for translations.

146. By Albert Cervera i Areny - http://www.NaN-tic.com

[FIX] printjob: Identation error could lead to returning None to the client.

147. By Franck BRET

[product_brand], form view added + small changes

148. By Franck BRET

merge

149. By Jordi Esteve (www.zikzakmedia.com)

[ADD] New module mrp_dimensions (dimensional variables (measurements) to production

150. By Corentin POUHET-BRUNERIE <email address hidden>

[FIX] context['active-object_ids'] is now a copy of ids in write and unlink methods

151. By Corentin POUHET-BRUNERIE <email address hidden>

[IMP] Remove unused imports

152. By Albert Cervera i Areny - http://www.NaN-tic.com

[IMP] printjob: Added wizard to update the list of printers with printers available in the CUPS server.

153. By Albert Cervera i Areny - http://www.NaN-tic.com

[IMP] printjob:
- Added new action to open CUPS administration interface.
- Added status field which shows current CUPS printer status.

154. By Albert Cervera i Areny - http://www.NaN-tic.com

[IMP] printjob: Updated Catalan and Spanish translations.

155. By Albert Cervera i Areny - http://www.NaN-tic.com

[IMP] printjob: Avoid two process to be started at the same time.

156. By Albert Cervera i Areny - http://www.NaN-tic.com

[FIX] printjob: Change translation files so OpenERP does not crash when loading them.

157. By Albert Cervera i Areny - http://www.NaN-tic.com

[FIX] printjob: Change translation files so OpenERP does not crash when loading them (now it really fixes it).

158. By Albert Cervera i Areny - http://www.NaN-tic.com

[FIX] printjob: Re-added 'import thread' which I mistakenly removed in a previous commit.

159. By Albert Cervera i Areny - http://www.NaN-tic.com

[FIX] account_customer_ref: Added dependency with 'sale' module.

160. By Albert Cervera i Areny - http://www.NaN-tic.com

[FIX] printjob: Use a specific python library to access CUPS instead of executing and paring commands.

161. By Albert Cervera i Areny - http://www.NaN-tic.com

[FIX] printjob: Do not crash if CUPS server is not available.

162. By Albert Cervera i Areny - http://www.NaN-tic.com

[FIX] printjob: Return empty dict if there's an error contacting CUPS server.

163. By Wei "oldrev" Li

Fixed the path problem

164. By Kristof Boden (Cogetix)

[ADD] module multi_company_category

165. By Pieter J. Kersten <email address hidden>

Added banking framework and two reference implementations

166. By Corentin Pouhet-Brunerie <copou@dom>

[FIX] Copy the context in the run method

167. By Albert Cervera i Areny - http://www.NaN-tic.com

[FIX] printjob: When an exception ocurred executing a report and printjob module was installed, the exception wasn't properly sent to the client and it would wait forever. Now the behaviour is the expected and advanced users can query exception information in the printjob queue.

168. By Nicolas DS

[ADD] Module Mailing, manage and send emailings

169. By Nicolas DS

[FIX] Mailing: Removing debug print

170. By Hugo santos <hugo@hugo-desktop>

[FIX] Fixed some errors in mrp_dimensions

171. By Corentin Pouhet-Brunerie <copou@dom>

[IMP] Add fields.function trigger

172. By Wei "oldrev" Li

relatorio_report updated

173. By Wei "oldrev" Li

merge changes

174. By Wei "oldrev" Li

added the RMB upper utility

175. By Wei "oldrev" Li

relatorio reporting engine was removed

176. By Corentin Pouhet-Brunerie <copou@dom>

[IMP] Add fields.function trigger

177. By Corentin Pouhet-Brunerie <copou@dom>

[IMP] Add demo data

178. By Nicolas DS

[FIX] Mailing, handle partner without email address

179. By Jan Verlaan

[FIX] Refunds where booked in some cases on wrong GL account. (BTW te vorderen instead of BTW te betalen with a negative amount)

180. By leooviedo

[fix] weight calculation on mrp_dimensions

181. By leooviedo

[fix] weight calculation on mrp_dimensions

182. By Corentin Pouhet-Brunerie <copou@dom>

[IMP] Add the operator 'Exists'

183. By Corentin Pouhet-Brunerie <copou@dom>

[IMP] Update French translations

184. By leooviedo

[fix] weight calculation on mrp_dimensions

185. By Jan Verlaan

[FIX] Tax calculation for Import and Export within and outside the EU corrected

186. By Hugo Santos <hugo@ubuntu>

[ADD] Addon to connect openERP with a spree online shop. Also added product_variants_ting wich is necesary to install Spree connector.

187. By leooviedo

[fix] weight calculation on mrp_dimensions

188. By leooviedo

[fix] weight calculation on mrp_dimensions

189. By leooviedo

[fix] weight calculation on mrp_dimensions

190. By leooviedo

[fix] weight calculation on mrp_dimensions

191. By leooviedo

[fix] weight calculation on mrp_dimensions

192. By Numerigraphe - Lionel Sausin <email address hidden>

[MERGE]
[ADD] add sale_partner_category
[FIX] account_export_ebp
[IMP] sale_weight: store function field

193. By Numerigraphe - Lionel Sausin <email address hidden>

[MERGE] new module account_partner_category

194. By Numerigraphe - Lionel Sausin <email address hidden>

[MERGE]

195. By Numerigraphe - Lionel Sausin <email address hidden>

[MERGE]

196. By Numerigraphe - Lionel Sausin <email address hidden>

[MERGE]

197. By Numerigraphe - Lionel Sausin <email address hidden>

[MERGE]

198. By Olivier Laurent (Open ERP)

[FIX] fixed 'invalid syntax' error: unbalanced parenthesis

199. By Olivier Laurent (Open ERP)

[REM] removed pyc files

200. By Jordi Esteve (www.zikzakmedia.com)

[IMP] mrp_dimensions: Added Catalan translation, improved Spanish translation

201. By Raphaël Valyi - http://www.akretion.com

[FIX] sale_simple_pos; stock_invoice_on_picking: fixed translation _ function import that was previously using a begnin yet ineffective xpath method

202. By Raphaël Valyi - http://www.akretion.com

[IMP] added French translation, though for some reason it's not applied...

203. By Raphaël Valyi - http://www.akretion.com

[merge]

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

You're proposing a merge of all of addons-community into addons. That's definitely not a good idea.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Guys,

please notice we found the "bzr join" command that allow to merge an
individual module into some addon/extra addon branch without loosing the
commit historic. We used it yesterday to inject the generic "stock_rma"
module we built into stable extra addons 5.0 (we are yet to present it). May
be that the solution (or part if it, using some intermediary branch, I'm not
sure), to move individual modules from a branch to an other

On Fri, Mar 5, 2010 at 7:03 AM, Xavier (Open ERP) <email address hidden> wrote:

> You're proposing a merge of all of addons-community into addons. That's
> definitely not a good idea.
> --
>
> https://code.launchpad.net/~openerp-community/openobject-addons/trunk-addons-community/+merge/15162
> Your team OpenERP Commiters is subscribed to branch
> lp:openobject-addons/extra-trunk.
>

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> please notice we found the "bzr join" command that allow to merge an
individual module into some addon/extra addon branch without loosing the
commit historic.

First, I'm not sure it applies to this case, which looks like wrong-target merge proposal rather than a join case (though there's another merge proposal I refused earlier to which that could have applied)

Second, and this is a much bigger issue, the other side of `bzr join` (namely `bzr split`) does *not* perform history filtering. Let's say we `bzr split account` out of `plugins`, what bazaar does is not create a new repository and import specifically account-touching revisions into it (while removing the directory from `addons`), it clones `addons`, removes everything except `account` from it (via bzr rm) and renames `/addons` to `/`...

So that means the nice new `account` you get has all of `addons`'s history (including e.g. the changes performed to `sale`).

`bzr join` can probably be used to import an addon created in a separate, independent repository, but *not* to move an addon from one repo to another one, since `bzr split` doesn't work.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Yeah, that's what I thought too. Or it could probably be used, but some only
if we find some extra filtering tool to clean the historic first. new bzr
format have the "bzr view" feature that, from what I understood can filter
historic per folder (could be very useful in general when investigating how
 module changes since say you put in prod), may bet that could be used as a
filter, I don't know. What is sure is that loosing module historic would
suck, that's too much useful to do a bzr annotate if you find some
regression at some place to find out why it has been done (provided it's
cross referenced with a bugreport) for instance.

On Fri, Mar 5, 2010 at 11:19 AM, Xavier (Open ERP) <email address hidden> wrote:

> > please notice we found the "bzr join" command that allow to merge an
> individual module into some addon/extra addon branch without loosing the
> commit historic.
>
> First, I'm not sure it applies to this case, which looks like wrong-target
> merge proposal rather than a join case (though there's another merge
> proposal I refused earlier to which that could have applied)
>
> Second, and this is a much bigger issue, the other side of `bzr join`
> (namely `bzr split`) does *not* perform history filtering. Let's say we `bzr
> split account` out of `plugins`, what bazaar does is not create a new
> repository and import specifically account-touching revisions into it (while
> removing the directory from `addons`), it clones `addons`, removes
> everything except `account` from it (via bzr rm) and renames `/addons` to
> `/`...
>
> So that means the nice new `account` you get has all of `addons`'s history
> (including e.g. the changes performed to `sale`).
>
> `bzr join` can probably be used to import an addon created in a separate,
> independent repository, but *not* to move an addon from one repo to another
> one, since `bzr split` doesn't work.
> --
>
> https://code.launchpad.net/~openerp-community/openobject-addons/trunk-addons-community/+merge/15162
> Your team OpenERP Commiters is subscribed to branch
> lp:openobject-addons/extra-trunk.
>

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> but some only if we find some extra filtering tool to clean the historic first

I'd rather check if fastexport/fastimport can filter the tree, that would probably be a more interesting investigation.

Unmerged revisions

381. By Alexis de Lattre

[FIX] Small bug.

380. By Alexis de Lattre

Don't modifiy invoice_state any more : we write 'none' instead of 'loan' (data migration required)
Remove unused views
Move views related to stock to stock_view.xml

379. By Alexis de Lattre

Update contraint on sale order line.
Update coding style.

378. By Alexis de Lattre

Larger fields on warehouse form view.

377. By Alexis de Lattre

Enhance the code ; the generation of the return picking is now inheritable. The return stock move is now linked to the out stock move (move_dest_id)
Small update to coding style.
Loan IN and OUT are now regular M2O fields and not properties (warning : it requires data migration).

376. By Serpent Consulting Services

MASS Editing :Added security access

375. By esamyn

[UPDATE] website

374. By Serpent Consulting Services

[MIGRATE] business, base_xml_sample : Made modules intallable and compatible to 6.1

373. By Serpent Consulting Services

[IMP] base_partner_security : Added field restricted on partner form

372. By Serpent Consulting Services

[MIGRATE] backup_syste, base_partner_security, crm_task : Made modules intallable and compatible to 6.1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'account_bankimport'
2=== added file 'account_bankimport/__init__.py'
3--- account_bankimport/__init__.py 1970-01-01 00:00:00 +0000
4+++ account_bankimport/__init__.py 2010-03-04 01:53:21 +0000
5@@ -0,0 +1,37 @@
6+##############################################################################
7+#
8+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) and Eddy Boer
9+# All Rights Reserved.
10+# Fabien Pinckaers <fp@tiny.Be>
11+# Eddy Boer <tinyerp@EdbO.xs4all.nl>
12+#
13+# WARNING: This program as such is intended to be used by professional
14+# programmers who take the whole responsability of assessing all potential
15+# consequences resulting from its eventual inadequacies and bugs
16+# End users who are looking for a ready-to-use solution with commercial
17+# garantees and support are strongly adviced to contract a Free Software
18+# Service Company
19+#
20+# This program is Free Software; you can redistribute it and/or
21+# modify it under the terms of the GNU General Public License
22+# as published by the Free Software Foundation; either version 2
23+# of the License, or (at your option) any later version.
24+#
25+# This program is distributed in the hope that it will be useful,
26+# but WITHOUT ANY WARRANTY; without even the implied warranty of
27+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+# GNU General Public License for more details.
29+#
30+# You should have received a copy of the GNU General Public License
31+# along with this program; if not, write to the Free Software
32+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33+#
34+##############################################################################
35+# I used the code of account_coda as base for this module. The module does
36+# exactly the same thing as account_coda. The difference is the file-layout.
37+#
38+# This module can import .asc-files (BRI-layout).
39+#
40+
41+import bankimport
42+import wizard
43\ No newline at end of file
44
45=== added file 'account_bankimport/__terp__.py'
46--- account_bankimport/__terp__.py 1970-01-01 00:00:00 +0000
47+++ account_bankimport/__terp__.py 2010-03-04 01:53:21 +0000
48@@ -0,0 +1,52 @@
49+##############################################################################
50+#
51+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) and Eddy Boer
52+# All Rights Reserved.
53+# Fabien Pinckaers <fp@tiny.Be>
54+# Eddy Boer <tinyerp@EdbO.xs4all.nl>
55+# Jan Verlaan <informatie@veritos.nl>
56+#
57+# WARNING: This program as such is intended to be used by professional
58+# programmers who take the whole responsability of assessing all potential
59+# consequences resulting from its eventual inadequacies and bugs
60+# End users who are looking for a ready-to-use solution with commercial
61+# garantees and support are strongly adviced to contract a Free Software
62+# Service Company
63+#
64+# This program is Free Software; you can redistribute it and/or
65+# modify it under the terms of the GNU General Public License
66+# as published by the Free Software Foundation; either version 2
67+# of the License, or (at your option) any later version.
68+#
69+# This program is distributed in the hope that it will be useful,
70+# but WITHOUT ANY WARRANTY; without even the implied warranty of
71+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72+# GNU General Public License for more details.
73+#
74+# You should have received a copy of the GNU General Public License
75+# along with this program; if not, write to the Free Software
76+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
77+#
78+##############################################################################
79+# I used the code of account_coda as base for this module. The module does
80+# exactly the same thing as account_coda. The difference is the file-layout.
81+#
82+# This module can import .asc-files (BRI-layout).
83+# 06-10-2009 jverlaan added MT940 filter for Postbank and ING
84+#
85+
86+{
87+ "name":"Account Bankimport",
88+ "version":"0.0.2",
89+ "author":"Tiny / Eddy Boer",
90+ "category":"Account Bankimport",
91+ "depends":["base", "account","account_report","base_iban"],
92+ "init_xml":[],
93+ "update_xml" : [
94+ "security/ir.model.access.csv",
95+ "bankimport_wizard.xml",
96+ "bankimport_view.xml",
97+ ],
98+ "active":False,
99+ "installable":True,
100+}
101
102=== added file 'account_bankimport/bankimport.py'
103--- account_bankimport/bankimport.py 1970-01-01 00:00:00 +0000
104+++ account_bankimport/bankimport.py 2010-03-04 01:53:21 +0000
105@@ -0,0 +1,238 @@
106+##############################################################################
107+#
108+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) and Eddy Boer
109+# All Rights Reserved.
110+# Fabien Pinckaers <fp@tiny.Be>
111+# Eddy Boer <tinyerp@EdbO.xs4all.nl>
112+#
113+# WARNING: This program as such is intended to be used by professional
114+# programmers who take the whole responsability of assessing all potential
115+# consequences resulting from its eventual inadequacies and bugs
116+# End users who are looking for a ready-to-use solution with commercial
117+# garantees and support are strongly adviced to contract a Free Software
118+# Service Company
119+#
120+# This program is Free Software; you can redistribute it and/or
121+# modify it under the terms of the GNU General Public License
122+# as published by the Free Software Foundation; either version 2
123+# of the License, or (at your option) any later version.
124+#
125+# This program is distributed in the hope that it will be useful,
126+# but WITHOUT ANY WARRANTY; without even the implied warranty of
127+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
128+# GNU General Public License for more details.
129+#
130+# You should have received a copy of the GNU General Public License
131+# along with this program; if not, write to the Free Software
132+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
133+#
134+##############################################################################
135+# I used the code of account_coda as base for this module. The module does
136+# exactly the same thing as account_coda. The difference is the file-layout.
137+#
138+# This module can import .asc-files (BRI-layout).
139+#
140+
141+import time
142+from osv import osv,fields
143+
144+import urllib, urllib2, sgmllib
145+from BeautifulSoup import BeautifulSoup, SoupStrainer
146+import re, string
147+
148+def _opschonen(name):
149+ p = name.split('>')
150+ n = p[2].split('<')
151+ return n[0]
152+
153+def _get_bank_data(bank_acc):
154+
155+ p = {}
156+
157+ urldata = {'number':bank_acc,'method':'POST'}
158+
159+ data = urllib.urlencode(urldata)
160+ link = "http://www.ibannl.org/iban_check.php"
161+
162+ req = urllib2.Request(link, data)
163+ f = urllib2.urlopen(req)
164+ s = f.read()
165+
166+ soup = BeautifulSoup(''.join(s))
167+ test = soup.findAll('td')
168+
169+ bank_id = 0
170+
171+ if len(test) > 1 :
172+ p['iban'] = _opschonen(str(test[1]))
173+ p['bic'] = _opschonen(str(test[3]))
174+ p['bank_name'] = _opschonen(str(test[5]))
175+
176+
177+ return p
178+
179+ else:
180+ return False
181+
182+
183+
184+
185+
186+
187+class account_bankimport_filters(osv.osv):
188+ _name = "account.bankimport.filters"
189+ _description = "Define the filters, which is related to the file"
190+ _columns = {
191+ 'filter' : fields.char('Filtername', size=64, required=True),
192+ 'name' : fields.char('Filename', size=128, required=True),
193+ }
194+account_bankimport_filters()
195+
196+# Save data for each company
197+class res_company(osv.osv):
198+ _inherit = 'res.company'
199+ _columns = {
200+ 'bank_journalid' : fields.many2one('account.journal', 'Bank Journal', required=True),
201+ 'def_payable' : fields.many2one('account.account', 'Default Payable Account', required=True, domain=[('type','=','payable')]),
202+ 'def_receivable' : fields.many2one('account.account', 'Default Receivable Account', required=True, domain=[('type','=','receivable')]),
203+ 'filters': fields.many2one('account.bankimport.filters', 'Filter', required=True),
204+ 'bank_file' : fields.char('File Location', size=128, required=True),
205+ }
206+res_company()
207+
208+class account_bankimport(osv.osv):
209+ _name = "account.bankimport"
210+ _description = "import Bank statements-file for an Account"
211+ _columns = {
212+ 'name': fields.char('Name', size=64),
213+ 'file': fields.binary('bankimport file', readonly=True),
214+ 'statement_id': fields.many2one('account.bank.statement','Generated Bank Statement', select=True,readonly=True),
215+ 'note': fields.text('Import log', readonly=True),
216+ 'journal_id': fields.many2one('account.journal','Bank Journal', readonly=True,select=True),
217+ 'date': fields.date('Import Date', readonly=True,select=True),
218+ 'user_id': fields.many2one('res.users','User', readonly=True, select=True),
219+ }
220+ _defaults = {
221+ 'date': lambda *a: time.strftime('%Y-%m-%d'),
222+ 'user_id': lambda self,cr,uid,context: uid,
223+ }
224+account_bankimport()
225+
226+class account_bank_statement(osv.osv):
227+ _inherit = "account.bank.statement"
228+ _columns = {
229+ 'bankimport_id':fields.many2one('account.bankimport','bankimport'),
230+ 'state': fields.selection([('draft', 'Draft'),('draft_import', 'Draft Imported'),('confirm', 'Confirm')],
231+ 'State', required=True,
232+ states={'confirm': [('readonly', True)]}, readonly="1"),
233+ }
234+
235+
236+account_bank_statement()
237+
238+class bank_statement_line(osv.osv):
239+ _inherit = "account.bank.statement.line"
240+ _columns = {
241+ 'bank_accnumber':fields.char('Bank account importfile', size=64, required=False),
242+ 'amount': fields.float('Amount', states={'draft_import': [('readonly', True)]} ),
243+ 'ref': fields.char('Ref.', size=32, states={'draft_import': [('readonly', True)]} ),
244+ 'name': fields.char('Name', size=64, required=True, states={'draft_import': [('readonly', True)]} ),
245+ 'date': fields.date('Date', required=True, states={'draft_import': [('readonly', True)]} ),
246+
247+
248+ }
249+
250+ def onchange_partner_id(self, cursor, user, line_id, partner_id, type, currency_id,
251+ context={}):
252+ if not partner_id:
253+ return {}
254+ res_currency_obj = self.pool.get('res.currency')
255+ res_users_obj = self.pool.get('res.users')
256+
257+ company_currency_id = res_users_obj.browse(cursor, user, user,
258+ context=context).company_id.currency_id.id
259+
260+ if not currency_id:
261+ currency_id = company_currency_id
262+
263+ part = self.pool.get('res.partner').browse(cursor, user, partner_id,
264+ context=context)
265+ if part.supplier == 1 and part.customer == 0:
266+ account_id = part.property_account_payable.id
267+ type = 'supplier'
268+ elif part.supplier == 0 and part.customer == 1:
269+ account_id = part.property_account_receivable.id
270+ type = 'customer'
271+ else:
272+ account_id = 0
273+ type = 'general'
274+
275+ return {'value': {'type': type , 'account_id': account_id}}
276+
277+
278+ def write(self, cr, uid, ids, vals, context={}):
279+ acc_numbers = []
280+
281+ if 'partner_id' in vals:
282+ db_data = self.pool.get('res.partner.bank').search(cr,uid, [('partner_id','=', vals['partner_id']) ] )
283+ acc_nums = self.pool.get('res.partner.bank').browse(cr,uid, db_data )
284+
285+ import_acc = self.pool.get('account.bank.statement.line').browse(cr,uid, ids )
286+
287+ for num in acc_nums:
288+ if num.acc_number:
289+ acc_numbers.append(num.acc_number)
290+ else:
291+ acc_numbers.append(num.iban)
292+
293+ found_acc = False
294+ for x in import_acc:
295+ if x.bank_accnumber in acc_numbers:
296+ found_acc = True
297+
298+ if not found_acc:
299+ for x in import_acc:
300+ p = _get_bank_data(x.bank_accnumber)
301+
302+ if p:
303+ # test if the bank exists
304+ bank_id = self.pool.get('res.bank').search(cr,uid,[('name','=',p['bank_name'])])
305+ if not bank_id:
306+ bank_id = pool.get('res.bank').create(cr,uid,{
307+ 'name' : p['bank_name'],
308+ 'bic' : p['bic'],
309+ 'active' : 1,
310+ })
311+ else:
312+ bank_id = bank_id[0]
313+
314+
315+ bank_acc = self.pool.get('res.partner.bank').create(cr,uid,{
316+ 'state' : 'bank',
317+ 'partner_id': vals['partner_id'],
318+ 'bank' : bank_id,
319+ 'acc_number' : x.bank_accnumber,
320+ })
321+
322+ bank_iban = self.pool.get('res.partner.bank').create(cr,uid,{
323+ 'state' : 'iban',
324+ 'partner_id': vals['partner_id'],
325+ 'bank' : bank_id,
326+ 'iban' : p['iban'],
327+ })
328+
329+
330+ else:
331+ bank_acc = self.pool.get('res.partner.bank').create(cr,uid,{
332+ 'state' : 'bank',
333+ 'partner_id': vals['partner_id'],
334+ 'acc_number' : x.bank_accnumber,
335+ })
336+
337+
338+
339+ return super(bank_statement_line, self).write(cr, uid, ids, vals, context)
340+
341+
342+
343+bank_statement_line()
344
345=== added file 'account_bankimport/bankimport_data.xml'
346--- account_bankimport/bankimport_data.xml 1970-01-01 00:00:00 +0000
347+++ account_bankimport/bankimport_data.xml 2010-03-04 01:53:21 +0000
348@@ -0,0 +1,16 @@
349+<?xml version="1.0" encoding="utf-8"?>
350+<openerp>
351+<data>
352+
353+ <record model="res.partner.bank" id="base.res_partner_agrolait">
354+ <field name="acc_number">301915554082</field>
355+ <field name="partner_id" ref="base.res_partner_agrolait"/>
356+ </record>
357+
358+ <record model="res.partner.bank" id="base.res_partner_10">
359+ <field name="acc_number">050000000017</field>
360+ <field name="partner_id" ref="base.res_partner_10"/>
361+ </record>
362+
363+</data>
364+</openerp>
365
366=== added file 'account_bankimport/bankimport_demo.xml'
367--- account_bankimport/bankimport_demo.xml 1970-01-01 00:00:00 +0000
368+++ account_bankimport/bankimport_demo.xml 2010-03-04 01:53:21 +0000
369@@ -0,0 +1,32 @@
370+<?xml version="1.0" encoding="utf-8"?>
371+<openerp>
372+<data noupdate="1">
373+ <record model="res.partner" id="partner_demo1">
374+ <field name="name">Tiny S.p.r.l</field>
375+ </record>
376+ <record model="res.partner.bank" id="partner_bank1">
377+ <field name="acc_number">301915554082</field>
378+ <field name="state">bank</field>
379+ <field name="partner_id" ref="partner_demo1"></field>
380+ </record>
381+
382+ <record model="res.partner" id="partner_demo2">
383+ <field name="name">The-design Company</field>
384+ </record>
385+ <record model="res.partner.bank" id="partner_bank2">
386+ <field name="acc_number">050000000017</field>
387+ <field name="state">iban</field>
388+ <field name="partner_id" ref="partner_demo2"></field>
389+ </record>
390+
391+<!-- <record model="res.partner.bank" id="partner_agrolait">
392+ <field name="acc_number">301915554082</field>
393+ <field name="partner_id" ref="base.res_partner_agrolait"/>
394+ </record>
395+
396+ <record model="res.partner.bank" id="res_partner_10">
397+ <field name="acc_number">050000000017</field>
398+ <field name="partner_id" ref="base.res_partner_10"/>
399+ </record>-->
400+</data>
401+</openerp>
402
403=== added file 'account_bankimport/bankimport_view.xml'
404--- account_bankimport/bankimport_view.xml 1970-01-01 00:00:00 +0000
405+++ account_bankimport/bankimport_view.xml 2010-03-04 01:53:21 +0000
406@@ -0,0 +1,119 @@
407+<?xml version="1.0" encoding="utf-8"?>
408+<openerp>
409+<data>
410+
411+ <record model="ir.ui.view" id="view_company_for_bankimport">
412+ <field name="name">res.company.form</field>
413+ <field name="model">res.company</field>
414+ <field name="inherit_id" ref="base.view_company_form"/>
415+ <field name="type">form</field>
416+ <field name="arch" type="xml">
417+ <field name="currency_id" position="after">
418+ <separator string="Import Bank Statements" colspan="4"/>
419+ <field name="bank_journalid" />
420+ <field name="def_payable" />
421+ <field name="def_receivable" />
422+ <field name="filters" />
423+ <field name="bank_file" />
424+ </field>
425+ </field>
426+ </record>
427+
428+ <record model="ir.ui.view" id="view_account_bankimport_form">
429+ <field name="name">account.bankimport.form</field>
430+ <field name="model">account.bankimport</field>
431+ <field name="type">form</field>
432+ <field name="arch" type="xml">
433+ <form string="Import bank statements">
434+ <field name="name" />
435+ <field name="journal_id" />
436+ <field name="date" />
437+ <field name="user_id" />
438+ <field name="statement_id"/>
439+ <field name="file"/>
440+ <field name="note" colspan="4"/>
441+ </form>
442+ </field>
443+ </record>
444+
445+
446+ <record model="ir.ui.view" id="view_account_bankimport_tree">
447+ <field name="name">account.bankimport.tree</field>
448+ <field name="model">account.bankimport</field>
449+ <field name="type">tree</field>
450+ <field name="arch" type="xml">
451+ <tree string="Import bank statements">
452+ <field name="journal_id" />
453+ <field name="date" />
454+ <field name="user_id" />
455+ </tree>
456+ </field>
457+ </record>
458+
459+ <record model="ir.actions.act_window" id="action_account_bankimport">
460+ <field name="name">Import bank statements</field>
461+ <field name="type">ir.actions.act_window</field>
462+ <field name="res_model">account.bankimport</field>
463+ <field name="view_type">form</field>
464+ <field name="view_mode">tree,form</field>
465+ </record>
466+
467+ <menuitem name="Financial Management/Reporting/Bankimport Statements" id="menu_action_account_bankimport" action="action_account_bankimport" sequence="12" />
468+
469+ <menuitem name="Financial Management/Periodical Processing/Import Bank Statements" action="wizard_account_bankimport" type="wizard" id="menu_account_bankimport_wizard" sequence="15"/>
470+
471+ <act_window name="Import Bank Statements"
472+ domain="[('statement_id', '=', active_id)]"
473+ res_model="account.bankimport"
474+ src_model="account.bank.statement"
475+ view_type="form"
476+ view_mode="tree,form"
477+ id="act_account_payment_account_bank_statement"/>
478+
479+
480+<!-- View for adding / changing filters -->
481+
482+
483+
484+ <record model="ir.ui.view" id="view_account_bankimport_filters_form">
485+ <field name="name">account.bankimport.filters.form</field>
486+ <field name="model">account.bankimport.filters</field>
487+ <field name="type">form</field>
488+ <field name="arch" type="xml">
489+ <form string="Define import filters">
490+ <field name="filter" />
491+ <field name="name" />
492+ </form>
493+ </field>
494+ </record>
495+
496+
497+ <record model="ir.ui.view" id="view_account_bankimport_filters_tree">
498+ <field name="name">account.bankimport.filters.tree</field>
499+ <field name="model">account.bankimport.filters</field>
500+ <field name="type">tree</field>
501+ <field name="arch" type="xml">
502+ <tree string="Import filters">
503+ <field name="filter" />
504+ <field name="name" />
505+ </tree>
506+ </field>
507+ </record>
508+
509+ <record model="ir.actions.act_window" id="action_account_bankimport_filters_tree">
510+ <field name="name">Define bankimport filters</field>
511+ <field name="res_model">account.bankimport.filters</field>
512+ <field name="view_type">form</field>
513+ <field name="view_mode">tree,form</field>
514+ </record>
515+<!--
516+ <menuitem name="Financial Management/Reporting/Bankimport Statements" id="menu_account_bankimport" action="action_bank_statement_tree" sequence="12"/>
517+-->
518+ <menuitem action="action_account_bankimport_filters_tree" id="menu_action_account_bankimport_filters_tree" parent="base.menu_users"/>
519+
520+
521+<!-- **** END ***** -->
522+
523+
524+ </data>
525+</openerp>
526
527=== added file 'account_bankimport/bankimport_wizard.xml'
528--- account_bankimport/bankimport_wizard.xml 1970-01-01 00:00:00 +0000
529+++ account_bankimport/bankimport_wizard.xml 2010-03-04 01:53:21 +0000
530@@ -0,0 +1,13 @@
531+<?xml version="1.0" encoding="utf-8"?>
532+<openerp>
533+ <data>
534+
535+ <wizard
536+ string="Import Bank statements file"
537+ model="account.bank.statement"
538+ name="account.bank_import"
539+ id="wizard_account_bankimport"
540+ />
541+
542+ </data>
543+</openerp>
544
545=== added directory 'account_bankimport/security'
546=== added file 'account_bankimport/security/ir.model.access.csv'
547--- account_bankimport/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
548+++ account_bankimport/security/ir.model.access.csv 2010-03-04 01:53:21 +0000
549@@ -0,0 +1,3 @@
550+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
551+"access_account_bankimport","account.bankimport","model_account_bankimport","account.group_account_manager",1,1,1,1
552+"access_account_bankimport_filters","account.bankimport.filters","model_account_bankimport_filters","account.group_account_manager",1,1,1,1
553
554=== added file 'account_bankimport/usage_of_account_bankimport.pdf'
555Binary files account_bankimport/usage_of_account_bankimport.pdf 1970-01-01 00:00:00 +0000 and account_bankimport/usage_of_account_bankimport.pdf 2010-03-04 01:53:21 +0000 differ
556=== added directory 'account_bankimport/wizard'
557=== added file 'account_bankimport/wizard/__init__.py'
558--- account_bankimport/wizard/__init__.py 1970-01-01 00:00:00 +0000
559+++ account_bankimport/wizard/__init__.py 2010-03-04 01:53:21 +0000
560@@ -0,0 +1,35 @@
561+##############################################################################
562+#
563+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) and Eddy Boer
564+# All Rights Reserved.
565+# Fabien Pinckaers <fp@tiny.Be>
566+# Eddy Boer <tinyerp@EdbO.xs4all.nl>
567+#
568+# WARNING: This program as such is intended to be used by professional
569+# programmers who take the whole responsability of assessing all potential
570+# consequences resulting from its eventual inadequacies and bugs
571+# End users who are looking for a ready-to-use solution with commercial
572+# garantees and support are strongly adviced to contract a Free Software
573+# Service Company
574+#
575+# This program is Free Software; you can redistribute it and/or
576+# modify it under the terms of the GNU General Public License
577+# as published by the Free Software Foundation; either version 2
578+# of the License, or (at your option) any later version.
579+#
580+# This program is distributed in the hope that it will be useful,
581+# but WITHOUT ANY WARRANTY; without even the implied warranty of
582+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
583+# GNU General Public License for more details.
584+#
585+# You should have received a copy of the GNU General Public License
586+# along with this program; if not, write to the Free Software
587+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
588+#
589+##############################################################################
590+# I used the code of account_coda as base for this module. The module does
591+# exactly the same thing as account_coda. The difference is the file-layout.
592+#
593+# This module can import .asc-files (BRI-layout).
594+#
595+import bank_import
596
597=== added file 'account_bankimport/wizard/bank_import.py'
598--- account_bankimport/wizard/bank_import.py 1970-01-01 00:00:00 +0000
599+++ account_bankimport/wizard/bank_import.py 2010-03-04 01:53:21 +0000
600@@ -0,0 +1,333 @@
601+##############################################################################
602+#
603+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) and Eddy Boer
604+# All Rights Reserved.
605+# Fabien Pinckaers <fp@tiny.Be>
606+# Eddy Boer <tinyerp@EdbO.xs4all.nl>
607+#
608+# WARNING: This program as such is intended to be used by professional
609+# programmers who take the whole responsability of assessing all potential
610+# consequences resulting from its eventual inadequacies and bugs
611+# End users who are looking for a ready-to-use solution with commercial
612+# garantees and support are strongly adviced to contract a Free Software
613+# Service Company
614+#
615+# This program is Free Software; you can redistribute it and/or
616+# modify it under the terms of the GNU General Public License
617+# as published by the Free Software Foundation; either version 2
618+# of the License, or (at your option) any later version.
619+#
620+# This program is distributed in the hope that it will be useful,
621+# but WITHOUT ANY WARRANTY; without even the implied warranty of
622+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
623+# GNU General Public License for more details.
624+#
625+# You should have received a copy of the GNU General Public License
626+# along with this program; if not, write to the Free Software
627+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
628+#
629+##############################################################################
630+# I used the code of account_coda as base for this module. The module does
631+# exactly the same thing as account_coda. The difference is the file-layout.
632+#
633+# This module can import .asc-files (BRI-layout).
634+#
635+import pooler
636+import time
637+import datetime
638+import wizard
639+import netsvc
640+import base64
641+from osv import fields, osv
642+
643+result_form = """<?xml version="1.0"?>
644+<form string="Import ASC Statement">
645+<separator colspan="4" string="Results :" />
646+ <field name="note" colspan="4" nolabel="1" width="500"/>
647+</form>
648+"""
649+
650+result_fields = {
651+
652+ 'note' : {'string':'Log','type':'text'}
653+
654+}
655+
656+def _bank_import(self, cr, uid, data, context):
657+
658+ pool = pooler.get_pool(cr.dbname)
659+
660+ # setting variables
661+ line_name = 0
662+ str_log = ""
663+ err_log = ""
664+ str_log1 = ""
665+ st_line_name = line_name
666+
667+ bank_statement={}
668+ bank_statement_lines={}
669+ bank_statements=[]
670+
671+ ########################
672+ # building the header. #
673+ ########################
674+ # First we get the company_id from the user.
675+ user_data = pool.get('res.users').browse(cr, uid, uid, context)
676+
677+ # No we get the company data (journals and the file to read)
678+ company_data = pool.get('res.company').browse(cr, uid, user_data.company_id.id, context)
679+
680+ # create the base
681+ bankfile = company_data.bank_file
682+ def_pay_acc = company_data.def_payable.id
683+ def_rec_acc = company_data.def_receivable.id
684+
685+ # get todays date and get the period. The todays date will also be used for the Date-field
686+ today_date = datetime.date.today()
687+ periodDate = today_date.strftime('%Y-%m-%d')
688+ period_id = pool.get('account.period').search(cr,uid,[('date_start','<=',periodDate),('date_stop','>=',periodDate)])
689+
690+ # getting the start data of the balance. We need this from the database
691+ # get the latest bank statement from the database (highest id
692+ cr.execute('select max(id) from account_bank_statement',)
693+ bal_id = cr.fetchone()[0]
694+ bal_prev = pool.get('account.bank.statement').browse(cr,uid,bal_id,context)
695+
696+ if not bal_prev:
697+ # switch to 0
698+ bal_start = 0
699+ else :
700+ # use the balance_end_real as the start_balance for the new statement
701+ bal_start = bal_prev.balance_end_real
702+
703+ # fill the bankstatement
704+ bank_statement["bank_statement_line"]={}
705+ bank_statement['date'] = today_date.strftime('%d/%m/%Y')
706+ bank_statement['journal_id']=company_data.bank_journalid.id
707+ bank_statement['period_id'] = period_id[0]
708+ bank_statement['def_pay_acc'] = def_pay_acc
709+ bank_statement['def_rec_acc'] = def_rec_acc
710+ bank_statement['state']='draft'
711+ bank_statement["balance_start"]= bal_start
712+ # Because the company is linked to a Partner, we can get also the
713+ # acc_number. We can even use it to verify if the right bankstatements
714+ # were be imported (acc_numbers should be equal).
715+ acc_number_id = pool.get('res.partner.bank').search(cr, uid, [('partner_id','=',company_data.partner_id.id)])
716+
717+ # check if we got a bank / iban number
718+ if len(acc_number_id) > 0:
719+ bank_statement["acc_number"] = []
720+ # create a list of numbers
721+ for acc in acc_number_id:
722+ acc_number = pool.get('res.partner.bank').browse(cr,uid,acc)
723+
724+ if acc_number.acc_number :
725+ bank_statement["acc_number"].append(acc_number.acc_number.lower())
726+ else :
727+ bank_statement["acc_number"].append(acc_number.iban.lower())
728+
729+ else :
730+ raise wizard.except_wizard('ERROR !', 'We got no bank / iban number.')
731+ # str_log1 = "We got no bank / iban number!"
732+ # return {'note':str_log1 ,'journal_id':0 , 'asc':0,'statment_id':0}
733+
734+ # We use the company name and not the partner name
735+ bank_statement["acc_holder"] = company_data.name
736+
737+ # setting the end value of the balance
738+ bal_end = bal_start
739+
740+ bank_statement['bal_start'] = bal_start
741+ bank_statement['bal_end'] = bal_end
742+
743+ # based on the filter we parse the document
744+ filterObject = 'account.bankimport.filter.' + str(company_data.filters)
745+
746+ bank_data = pooler.get_pool(cr.dbname).get( filterObject )
747+
748+ exec "from filters import " + company_data.filters.name + " as parser"
749+ #__import__( company_data.filters.name )
750+
751+
752+ # opening the file speficied as bank_file and read the data
753+ try:
754+ bf = open(bankfile, 'r')
755+
756+ try:
757+ mydata = bf.read()
758+ recordlist = mydata.split('\n') # bf.readlines()
759+ recordlist.pop()
760+ data = parser.get_data(self,cr,uid,recordlist,bank_statement) # parse the data through the filter
761+ finally:
762+ bf.close()
763+ except IOError:
764+ raise
765+
766+
767+ bank_statements.append(bank_statement)
768+ bkst_list=[]
769+ bk_st_id=0
770+
771+ nb_err=0
772+ err_log=''
773+ str_log=''
774+ std_log=''
775+ str_log1 = str_log1 + " Bank Statements were Imported : "
776+ str_not=''
777+ str_not1=''
778+
779+ period = []
780+
781+
782+ # check if we have new bank statement lines.
783+ if len(data) >= 1:
784+ p_bank_state = []
785+ p_state_line = {}
786+
787+ # move each line to the right period
788+ for line in data:
789+ periodDate = time.strftime('%Y-%m-%d', time.strptime(line['date'], '%d/%m/%y') )
790+
791+ # get the period
792+ periodD = pool.get('account.period').search(cr,uid,[('date_start','<=',periodDate),('date_stop','>=',periodDate)])[0]
793+
794+ # check if the period already exists in the dictonairy
795+ if periodD in p_state_line:
796+ w = p_state_line[periodD] # fill the array with existing data
797+ else:
798+ w = []
799+
800+ w.append(line)
801+ p_state_line[periodD] = w
802+ if periodD not in period:
803+ period.append(periodD)
804+
805+ # sort the periods
806+ period.sort()
807+
808+ # set the start balance
809+ bal_start = float(bank_statement['balance_start'])
810+
811+ # we have now a dictionary of statement lines based on the period, so we can create the bankstatements now
812+ for li in period:
813+ lines = p_state_line[li]
814+ total = 0.0
815+
816+ # calculate the ending balance
817+ for lin in lines:
818+ total += float(lin['amount'])
819+ bal_end += total
820+
821+ try:
822+ bk_st_id = pool.get('account.bank.statement').create(cr,uid,{
823+ 'journal_id': bank_statement['journal_id'],
824+ 'date':today_date.strftime('%Y-%m-%d'),
825+ 'period_id':li,
826+ 'balance_start': bal_start,
827+ 'balance_end_real': bal_end,
828+ 'state':'draft',
829+ })
830+
831+ for line in lines:
832+ str_not1="Partner name : %s\nPartner Account Number : %s\nCommunication : %s\nValue Date : %s\nEntry Date : %s\n" %(line["contry_name"],line["cntry_number"],line["free_comm"],line["val_date"],line["entry_date"][0])
833+
834+ id=pool.get('account.bank.statement.line').create(cr,uid,{
835+ 'name':line['name'],
836+ 'date': time.strftime('%Y-%m-%d', time.strptime(line['date'], '%d/%m/%y') ),
837+ 'amount': line['amount'],
838+ 'partner_id':line['partner_id'] or 0,
839+ 'account_id':line['account_id'],
840+ 'statement_id': bk_st_id,
841+ 'note':str_not1,
842+ 'ref':line['ref'],
843+ 'bank_accnumber':line['partner_acc_number'],
844+ 'type':line['type'],
845+ })
846+ cr.commit()
847+
848+ str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(bank_statement["acc_number"],bank_statement["acc_holder"])
849+ std_log = std_log + "\nDate : %s, Starting Balance : %.2f , Ending Balance : %.2f "\
850+ %(bank_statement['date'], bal_start, bal_end)
851+ bkst_list.append(bk_st_id)
852+
853+ # move ending balance to the start balance
854+ bal_start = bal_end
855+
856+ except osv.except_osv, e:
857+ cr.rollback()
858+
859+ except osv.except_osv, e:
860+ cr.rollback()
861+ nb_err+=1
862+ err_log= err_log +'\n Application Error : ' + str(e)
863+ raise # REMOVEME
864+
865+ except Exception, e:
866+ cr.rollback()
867+ nb_err+=1
868+ err_log= err_log +'\n System Error : '+str(e)
869+ raise # REMOVEME
870+
871+ except :
872+ cr.rollback()
873+ nb_err+=1
874+ err_log= err_log +'\n Unknown Error'
875+ raise
876+ err_log= err_log + '\n\nNumbers of statements : '+ str(len([bkst_list]))
877+ err_log= err_log + '\nNumber of error :'+ str(nb_err) +'\n'
878+
879+
880+ pool.get('account.bankimport').create(cr, uid,{
881+ 'file': base64.encodestring(mydata),
882+ 'statement_id':bk_st_id,
883+ 'note':str(str_log1) + str(str_not) + str(std_log+err_log),
884+ 'journal_id':company_data.bank_journalid.id,
885+ 'date':time.strftime("%Y-%m-%d"),
886+ 'user_id':uid,
887+ })
888+ else:
889+ raise wizard.except_wizard('WARNING !', 'No new records found, nothing imported.')
890+ # close the file
891+ bf.close()
892+# return {}
893+
894+ return {'note':str_log1 + std_log + err_log ,'journal_id': company_data.bank_journalid.id, 'asc': company_data.bank_file,'statment_id':bkst_list}
895+
896+
897+class bank_import(wizard.interface):
898+ def _action_open_window(self, cr, uid, data, context):
899+ form=data['form']
900+ return {
901+ 'domain':"[('id','in',(%s,))]"%(",".join(map(str,form['statment_id']))),
902+ 'name': 'Statement',
903+ 'view_type': 'form',
904+ 'view_mode': 'form,tree',
905+ 'res_model': 'account.bank.statement',
906+ 'view_id': False,
907+ 'type': 'ir.actions.act_window',
908+ 'res_id':form['statment_id'],
909+ }
910+ states = {
911+ 'init' : {
912+ 'actions' : [_bank_import],
913+ 'result' : {'type' : 'form',
914+ 'arch' : result_form,
915+ 'fields' : result_fields,
916+ 'state' : [('end', '_Close', 'gtk-close'),('open', '_Open Statement','gtk-ok')]}
917+ },
918+
919+ 'extraction' : {
920+ 'actions' : [_bank_import],
921+ 'result' : {'type' : 'form',
922+ 'arch' : result_form,
923+ 'fields' : result_fields,
924+ 'state' : [('end', '_Close', 'gtk-close'),('open', '_Open Statement','gtk-ok')]}
925+ },
926+ 'open': {
927+ 'actions': [],
928+ 'result': {'type': 'action', 'action': _action_open_window, 'state': 'end'}
929+
930+ },
931+
932+ }
933+bank_import("account.bank_import")
934
935=== added directory 'account_bankimport/wizard/filters'
936=== added file 'account_bankimport/wizard/filters/__init__.py'
937--- account_bankimport/wizard/filters/__init__.py 1970-01-01 00:00:00 +0000
938+++ account_bankimport/wizard/filters/__init__.py 2010-03-04 01:53:21 +0000
939@@ -0,0 +1,36 @@
940+##############################################################################
941+#
942+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) and Eddy Boer
943+# All Rights Reserved.
944+# Fabien Pinckaers <fp@tiny.Be>
945+# Eddy Boer <tinyerp@EdbO.xs4all.nl>
946+#
947+# WARNING: This program as such is intended to be used by professional
948+# programmers who take the whole responsability of assessing all potential
949+# consequences resulting from its eventual inadequacies and bugs
950+# End users who are looking for a ready-to-use solution with commercial
951+# garantees and support are strongly adviced to contract a Free Software
952+# Service Company
953+#
954+# This program is Free Software; you can redistribute it and/or
955+# modify it under the terms of the GNU General Public License
956+# as published by the Free Software Foundation; either version 2
957+# of the License, or (at your option) any later version.
958+#
959+# This program is distributed in the hope that it will be useful,
960+# but WITHOUT ANY WARRANTY; without even the implied warranty of
961+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
962+# GNU General Public License for more details.
963+#
964+# You should have received a copy of the GNU General Public License
965+# along with this program; if not, write to the Free Software
966+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
967+#
968+##############################################################################
969+# I used the code of account_coda as base for this module. The module does
970+# exactly the same thing as account_coda. The difference is the file-layout.
971+#
972+# This module can import .asc-files (BRI-layout).
973+#
974+
975+#import
976\ No newline at end of file
977
978=== added file 'account_bankimport/wizard/filters/asc.py'
979--- account_bankimport/wizard/filters/asc.py 1970-01-01 00:00:00 +0000
980+++ account_bankimport/wizard/filters/asc.py 2010-03-04 01:53:21 +0000
981@@ -0,0 +1,186 @@
982+##############################################################################
983+#
984+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) and Eddy Boer
985+# All Rights Reserved.
986+# Fabien Pinckaers <fp@tiny.Be>
987+# Eddy Boer <tinyerp@EdbO.xs4all.nl>
988+#
989+# WARNING: This program as such is intended to be used by professional
990+# programmers who take the whole responsability of assessing all potential
991+# consequences resulting from its eventual inadequacies and bugs
992+# End users who are looking for a ready-to-use solution with commercial
993+# garantees and support are strongly adviced to contract a Free Software
994+# Service Company
995+#
996+# This program is Free Software; you can redistribute it and/or
997+# modify it under the terms of the GNU General Public License
998+# as published by the Free Software Foundation; either version 2
999+# of the License, or (at your option) any later version.
1000+#
1001+# This program is distributed in the hope that it will be useful,
1002+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1003+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1004+# GNU General Public License for more details.
1005+#
1006+# You should have received a copy of the GNU General Public License
1007+# along with this program; if not, write to the Free Software
1008+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1009+#
1010+##############################################################################
1011+# I used the code of account_coda as base for this module. The module does
1012+# exactly the same thing as account_coda. The difference is the file-layout.
1013+#
1014+# This filter imports .asc-files (BRI-layout).
1015+#
1016+
1017+from osv import fields, osv
1018+import time
1019+import pooler
1020+import conversion
1021+import string
1022+
1023+def get_data(self, cr, uid, bankData, bank_statement):
1024+
1025+ pool = pooler.get_pool(cr.dbname)
1026+
1027+ bal_end = bank_statement['bal_end']
1028+ bank_statement_lines={}
1029+ bank_statements=[]
1030+ line_name = 0
1031+ st_line_name = line_name
1032+ code4 = 0
1033+
1034+ # parse every line in the file and get the right data
1035+ for line in bankData:
1036+ if len(line) <= 23: # the end of the file has an empty line
1037+ pass
1038+ else:
1039+ # check if bankaccount in the file matches with the bankaccount of the database
1040+ bankaccount = line[0:10]
1041+ # Look if we can match our number with a number in the list
1042+ if bankaccount.lower() in bank_statement["acc_number"]:
1043+ # look for the recordtype
1044+ # 2 is the baserecord. We can also have 3 and 4. These are followrecords.
1045+ if line[23] == '2' and code4 == 0:
1046+ st_line_name = line_name
1047+ st_line = {}
1048+ st_line['statement_id']=0
1049+ st_line['name'] = line[48:72]
1050+ st_line['date'] = conversion.str2date(line[87:93]) # boekingsdatum
1051+ st_line_amt = conversion.list2float(line[73:86])
1052+
1053+ if line[86] == "D":
1054+ st_line_amt = - st_line_amt
1055+ st_line['account_id'] = bank_statement['def_pay_acc']
1056+ else:
1057+ st_line['account_id'] = bank_statement['def_rec_acc']
1058+
1059+ st_line['entry_date']=time.strftime('%Y-%m-%d',time.strptime(conversion.str2date(line[87:93]),"%d/%m/%y")),
1060+ st_line['val_date']=time.strftime('%Y-%m-%d',time.strptime(conversion.str2date(line[93:99]),"%d/%m/%y")),
1061+
1062+ st_line['partner_id']=0
1063+ st_line['amount'] = st_line_amt
1064+ st_line['type'] = 'general'
1065+
1066+ st_line_partner_acc = str(line[38:48]).strip()
1067+ if st_line_partner_acc[:1] == '0':
1068+ st_line_partner_acc = st_line_partner_acc[1::]
1069+
1070+ st_line['partner_acc_number'] = st_line_partner_acc
1071+
1072+ cntry_number=st_line_partner_acc
1073+ contry_name=line[48:72]
1074+ bank_ids = pool.get('res.partner.bank').search(cr,uid,[('acc_number','=',st_line_partner_acc)])
1075+
1076+ if bank_ids:
1077+ bank = pool.get('res.partner.bank').browse(cr,uid,bank_ids[0],context={})
1078+ st_line['cntry_number']=cntry_number
1079+ st_line['contry_name']=contry_name
1080+
1081+ if st_line and bank.partner_id:
1082+ st_line['partner_id']=bank.partner_id.id
1083+
1084+ # Create a check if we don't already imported this statement
1085+ # We make an unique check in the database with
1086+ # partner, date and amount
1087+ check_ids = pool.get('account.bank.statement.line').search(cr,uid,[('amount','=',st_line_amt), ('date','=',st_line['entry_date']),('partner_id','=',bank.partner_id.id)])
1088+
1089+
1090+ # check if the partner is a supplier or customer
1091+ # if both, we don't add a account due to credit invoices
1092+ partner = pool.get('res.partner').browse(cr,uid,bank.partner_id,context={})
1093+
1094+ st_line['type']='general'
1095+
1096+ if bank.partner_id.supplier == True and bank.partner_id.customer == False:
1097+ st_line['account_id']= bank.partner_id.property_account_receivable.id
1098+ st_line['type']='supplier'
1099+
1100+ elif bank.partner_id.customer == True and bank.partner_id.supplier == False :
1101+ st_line['account_id']= bank.partner_id.property_account_payable.id
1102+ st_line['type']='customer'
1103+
1104+ #if st_line['amount'] < 0 :
1105+ # st_line['account_id']= bank.partner_id.property_account_payable.id
1106+ #else :
1107+ # st_line['account_id']= bank.partner_id.property_account_receivable.id
1108+
1109+ else:
1110+ st_line['cntry_number']=cntry_number
1111+ st_line['contry_name']=contry_name
1112+
1113+ # Create a check if we don't already imported this statement
1114+ # We make an unique check in the database with
1115+ # name, date and amount
1116+ check_ids = pool.get('account.bank.statement.line').search(cr,uid,[('amount','=',st_line_amt), ('date','=',st_line['entry_date']), ('name','=',contry_name)])
1117+
1118+ st_line['free_comm']= ''
1119+ st_line['ref']=''
1120+
1121+ elif line[23] == '3' and code4 == 0 : # get some information about the transaction
1122+ st_line['free_comm']=line[56:119]
1123+ refe = line[56:119].split(' ')
1124+ stri = ''
1125+ for t in refe:
1126+ if t.strip():
1127+ stri = stri + ' ' + ''.join(t.strip())
1128+
1129+ st_line['ref']=stri
1130+ code4 = int(line[120])
1131+ if not check_ids:
1132+ line_name += 1
1133+ st_line_name = line_name
1134+
1135+ elif line[23] == '4': # get some more information about the transaction
1136+ st_line['free_comm'] = st_line['free_comm'] + "\n" + line[24:119]
1137+ code4 = code4 - 1
1138+
1139+ if not check_ids:
1140+ bank_statement_lines[line_name]=st_line
1141+ # bank_statements.append(st_line)
1142+
1143+
1144+ # end if
1145+ # end for
1146+
1147+
1148+
1149+ # delete latest row from the list because its an empty row
1150+ if len(bank_statement_lines) >= 1:
1151+ del bank_statement_lines[ line_name ] # delete latest row from the list
1152+ for test in bank_statement_lines:
1153+ bank_statements.append(bank_statement_lines[test])
1154+
1155+ # count the end balance
1156+# for value in bank_statement_lines:
1157+# line=bank_statement_lines[value]
1158+# bal_end += line['amount']
1159+
1160+# bank_statement["balance_end_real"]= bal_end
1161+# bank_statement["bank_statement_line"]=bank_statement_lines
1162+
1163+ return bank_statements
1164+
1165+
1166+ #end for
1167+#select distinct b.partner_id, p.ref from res_partner_bank b, res_partner p where b.bank='51' and b.partner_id = p.id
1168
1169=== added file 'account_bankimport/wizard/filters/coda.py'
1170--- account_bankimport/wizard/filters/coda.py 1970-01-01 00:00:00 +0000
1171+++ account_bankimport/wizard/filters/coda.py 2010-03-04 01:53:21 +0000
1172@@ -0,0 +1,150 @@
1173+##############################################################################
1174+#
1175+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) and Eddy Boer
1176+# All Rights Reserved.
1177+# Fabien Pinckaers <fp@tiny.Be>
1178+# Eddy Boer <tinyerp@EdbO.xs4all.nl>
1179+#
1180+# WARNING: This program as such is intended to be used by professional
1181+# programmers who take the whole responsability of assessing all potential
1182+# consequences resulting from its eventual inadequacies and bugs
1183+# End users who are looking for a ready-to-use solution with commercial
1184+# garantees and support are strongly adviced to contract a Free Software
1185+# Service Company
1186+#
1187+# This program is Free Software; you can redistribute it and/or
1188+# modify it under the terms of the GNU General Public License
1189+# as published by the Free Software Foundation; either version 2
1190+# of the License, or (at your option) any later version.
1191+#
1192+# This program is distributed in the hope that it will be useful,
1193+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1194+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1195+# GNU General Public License for more details.
1196+#
1197+# You should have received a copy of the GNU General Public License
1198+# along with this program; if not, write to the Free Software
1199+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1200+#
1201+##############################################################################
1202+# I used the code of account_coda as base for this module. The module does
1203+# exactly the same thing as account_coda. The difference is the file-layout.
1204+#
1205+# This filter imports .coda-files (CODA-layout).
1206+#
1207+
1208+
1209+from osv import fields, osv
1210+import time
1211+import pooler
1212+import conversion
1213+
1214+
1215+def get_data(self, cr, uid, bankData, bank_statement):
1216+ pool = pooler.get_pool(cr.dbname)
1217+
1218+ bal_end = bank_statement['bal_end']
1219+ bank_statement_lines={}
1220+ bank_statements=[]
1221+ line_name = 0
1222+ str_log = ""
1223+ err_log = ""
1224+ str_log1 = ""
1225+ st_line_name = line_name
1226+
1227+ # parse every line in the file and get the right data
1228+ for line in bankData:
1229+ if line[0] == '0':
1230+ # header data
1231+# bank_statement={}
1232+# bank_statement_lines={}
1233+ bank_statement["bank_statement_line"]={}
1234+ #bank_statement['date'] = conversion.str2date(line[5:11])
1235+ #period_id = pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime("%y/%m/%d",time.strptime(bank_statement['date'],"%d/%m/%y"))),('date_stop','>=',time.strftime("%y/%m/%d",time.strptime(bank_statement['date'],"%d/%m/%y")))])
1236+ #period_id = pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d"))),('date_stop','>=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d")))])
1237+ #bank_statement['period_id'] = period_id[0]
1238+ #bank_statement['state']='draft'
1239+ elif line[0] == '1':
1240+ # old balance data
1241+ bal_start = conversion.list2float(line[43:58])
1242+ if line[42] == '1':
1243+ bal_start = - bal_start
1244+ bank_statement["balance_start"]= bal_start
1245+ bank_statement["acc_number"]=line[5:17]
1246+ bank_statement["acc_holder"]=line[64:90]
1247+
1248+ elif line[0]=='2':
1249+ # movement data record 2
1250+ if line[1]=='1':
1251+ # movement data record 2.1
1252+ st_line = {}
1253+ st_line['statement_id']=0
1254+ st_line['name'] = line[2:10]
1255+ st_line['date'] = conversion.str2date(line[115:121])
1256+ st_line_amt = conversion.list2float(line[32:47])
1257+
1258+ if line[61]=='1':
1259+ st_line['ref']=(line[65:77])
1260+ st_line['free_comm']=''
1261+ else:
1262+ st_line['free_comm']=line[62:115]
1263+ st_line['ref']=''
1264+
1265+ st_line['val_date']=time.strftime('%Y-%m-%d',time.strptime(conversion.str2date(line[47:53]),"%y/%m/%d")),
1266+ st_line['entry_date']=time.strftime('%Y-%m-%d',time.strptime(conversion.str2date(line[115:121]),"%y/%m/%d")),
1267+ st_line['partner_id']=0
1268+ if line[31] == '1':
1269+ st_line_amt = - st_line_amt
1270+ st_line['account_id'] = bank_statement['def_pay_acc']
1271+ else:
1272+ st_line['account_id'] = bank_statement['def_rec_acc']
1273+ st_line['amount'] = st_line_amt
1274+ bank_statement_lines[st_line['name']]=st_line
1275+ bank_statement["bank_statement_line"]=bank_statement_lines
1276+
1277+ elif line[1] == '3':
1278+ # movement data record 3.1
1279+ st_line_name = line[2:10]
1280+ st_line_partner_acc = str(line[10:47]).strip()
1281+ cntry_number=line[10:47]
1282+ contry_name=line[47:125]
1283+ #bank_ids = pool.get('res.partner.bank').search(cr,uid,[('number','=',st_line_partner_acc)])
1284+ bank_ids = pool.get('res.partner.bank').search(cr,uid,[('acc_number','=',st_line_partner_acc)])
1285+ if bank_ids:
1286+ bank = pool.get('res.partner.bank').browse(cr,uid,bank_ids[0],context={})
1287+ line=bank_statement_lines[st_line_name]
1288+ line['cntry_number']=cntry_number
1289+ line['contry_name']=contry_name
1290+
1291+ if line and bank.partner_id:
1292+ line['partner_id']=bank.partner_id.id
1293+ if line['amount'] < 0 :
1294+ line['account_id']=bank.partner_id.property_account_payable.id
1295+ else :
1296+ line['account_id']=bank.partner_id.property_account_receivable.id
1297+
1298+ bank_statement_lines[st_line_name]=line
1299+ else:
1300+ line=bank_statement_lines[st_line_name]
1301+ line['cntry_number']=cntry_number
1302+ line['contry_name']=contry_name
1303+ bank_statement_lines[st_line_name]=line
1304+
1305+
1306+ bank_statement["bank_statement_line"]=bank_statement_lines
1307+ elif line[0]=='3':
1308+ pass
1309+ elif line[0]=='8':
1310+ # new balance record
1311+ bal_end = conversion.list2float(line[42:57])
1312+ if line[41] == '1':
1313+ bal_end = - bal_end
1314+ bank_statement["balance_end_real"]= bal_end
1315+
1316+ elif line[0]=='9':
1317+ # footer record
1318+ pass
1319+ #bank_statements.append(bank_statement)
1320+ #end for
1321+ return bank_statement
1322+
1323
1324=== added file 'account_bankimport/wizard/filters/conversion.py'
1325--- account_bankimport/wizard/filters/conversion.py 1970-01-01 00:00:00 +0000
1326+++ account_bankimport/wizard/filters/conversion.py 2010-03-04 01:53:21 +0000
1327@@ -0,0 +1,20 @@
1328+import time
1329+
1330+def str2date(date_str):
1331+ return time.strftime("%y/%m/%d",time.strptime(date_str,"%d%m%y"))
1332+
1333+def str2float(str):
1334+ try:
1335+ return float(str)
1336+ except:
1337+ return 0.0
1338+
1339+def list2float(lst):
1340+ try:
1341+ return str2float((lambda s : s[:-2] + '.' + s[-2:])(lst))
1342+ except:
1343+ return 0.0
1344+
1345+def list2str(lst):
1346+ return str(lst).strip('[]').replace(',','').replace('\'','')
1347+
1348
1349=== added file 'account_bankimport/wizard/filters/mt940.py'
1350--- account_bankimport/wizard/filters/mt940.py 1970-01-01 00:00:00 +0000
1351+++ account_bankimport/wizard/filters/mt940.py 2010-03-04 01:53:21 +0000
1352@@ -0,0 +1,173 @@
1353+##############################################################################
1354+#
1355+# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) and Peter Dapper
1356+# All Rights Reserved.
1357+# Peter Dapper <verkoop@of-is.nl>
1358+#
1359+# WARNING: This program as such is intended to be used by professional
1360+# programmers who take the whole responsability of assessing all potential
1361+# consequences resulting from its eventual inadequacies and bugs
1362+# End users who are looking for a ready-to-use solution with commercial
1363+# garantees and support are strongly adviced to contract a Free Software
1364+# Service Company
1365+#
1366+# This program is Free Software; you can redistribute it and/or
1367+# modify it under the terms of the GNU General Public License
1368+# as published by the Free Software Foundation; either version 2
1369+# of the License, or (at your option) any later version.
1370+#
1371+# This program is distributed in the hope that it will be useful,
1372+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1373+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1374+# GNU General Public License for more details.
1375+#
1376+# You should have received a copy of the GNU General Public License
1377+# along with this program; if not, write to the Free Software
1378+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1379+#
1380+##############################################################################
1381+#
1382+# This filter imports .mt940-files
1383+#
1384+
1385+from osv import fields, osv
1386+import time
1387+import pooler
1388+import conversion
1389+import string
1390+import copy
1391+
1392+def get_acc_number(statement_line):
1393+ pointer = 0
1394+ only_acc = ""
1395+ result=[]
1396+ # one of my suppliers uses incasso, and does not use white space in .940 file between bank account and name
1397+ while statement_line[pointer]!= " " and statement_line[pointer]!= "C" and statement_line[pointer]!= "D" and statement_line[pointer]!= "Q":
1398+ only_acc = only_acc+statement_line[pointer]
1399+ pointer += 1
1400+ return only_acc
1401+
1402+
1403+def get_number(statement_line):
1404+ pointer = 7
1405+ only_amount = ""
1406+ while statement_line[pointer] in ["0","1","2","3","4","5","6","7","8","9",","]:
1407+ only_amount = only_amount+statement_line[pointer]
1408+ pointer += 1
1409+ only_amount = only_amount.replace(",",".")
1410+ return only_amount
1411+
1412+
1413+
1414+def parse_sequence(bank_statement,bank, cr, uid,):
1415+ pool = pooler.get_pool(cr.dbname)
1416+ st_line = {}
1417+ bank_statement_output=[]
1418+ current=0
1419+ while current < len(bank_statement):
1420+ #if ':61:' in bank_statement[current]:
1421+ if bank_statement[current].has_key(':61:'):
1422+ # Pfff.. a line we can use. Gives us the date, debit/credit, and amount
1423+ st_line['date']=conversion.str2date(bank_statement[current][':61:'][0:6])
1424+ entry_date = time.strftime('%Y-%m-%d',time.strptime(conversion.str2date(bank_statement[current][':61:'][0:6]),"%d/%m/%y")),
1425+ st_line['val_date'] = time.strftime('%Y-%m-%d',time.strptime(conversion.str2date(bank_statement[current][':61:'][0:6]),"%d/%m/%y")),
1426+ st_line['entry_date']=entry_date
1427+ # Pfff...get amount
1428+ amount =round(float(get_number(bank_statement[current][':61:'])),2)
1429+ st_line['amount']=amount
1430+ # Getting rich or poor
1431+ if bank_statement[current][':61:'][6] == "D":
1432+ st_line['account_id'] = bank['def_pay_acc']
1433+ st_line['amount'] = - st_line['amount']
1434+ # chek_ids did not work correctly because the amount could also be negativ
1435+ amount = - amount
1436+ else:
1437+ st_line['account_id'] = bank['def_rec_acc']
1438+ # Well, that was the transaction, now the details, directly next line..
1439+ current += 1
1440+ if bank_statement[current].has_key(':68:'):
1441+ st_line['free_comm'] = " "
1442+ st_line['partner_id'] = 0
1443+ st_line['type'] = 'general'
1444+ st_line['free_comm'] = " "
1445+ st_line['partner_acc_number'] = get_acc_number(bank_statement[current][':68:'])
1446+ st_line['cntry_number'] = get_acc_number(bank_statement[current][':68:'])
1447+ st_line['contry_name'] =bank_statement[current][':68:'][len(st_line['cntry_number']):]
1448+ st_line['name'] = bank_statement[current][':68:'][len(st_line['cntry_number']):]
1449+ st_line['ref'] =" " # Sometimes .. there is no ref. Still, it is being used by other scripts.
1450+ # Houston, we have a problem.. ING uses nicely a second :86: code, Postbank does not ... (back to the filling of the list,.done)
1451+ # See if we have a next rule, only description!!
1452+ current += 1
1453+ if bank_statement[current].has_key(':68:'):
1454+ st_line['ref'] =bank_statement[current][':68:'][0:]
1455+ # extra comment.. filling the free_comm
1456+ current += 1
1457+ if bank_statement[current].has_key(':68:'):
1458+ st_line['free_comm'] = bank_statement[current][':68:'][0:]
1459+ else:
1460+ current -= 1
1461+ # check if there is already a statement like this...
1462+ check_ids = pool.get('account.bank.statement.line').search(cr,uid,[('amount','=',amount), ('date','=',entry_date),('name','=',st_line['name'])])
1463+ # check if there already is a relation ..., and use the ID
1464+ bank_ids = pool.get('res.partner.bank').search(cr,uid,[('acc_number','=',st_line['partner_acc_number'])])
1465+ if bank_ids:
1466+ bank = pool.get('res.partner.bank').browse(cr,uid,bank_ids[0],context={})
1467+ if bank.partner_id:
1468+ st_line['partner_id'] = bank.partner_id.id
1469+ partner = pool.get('res.partner').browse(cr,uid,bank.partner_id,context={})
1470+ if bank.partner_id.supplier == True and bank.partner_id.customer == False:
1471+ st_line['account_id'] = bank.partner_id.property_account_receivable.id
1472+ st_line['type'] ='supplier'
1473+ elif bank.partner_id.customer == True and bank.partner_id.supplier == False :
1474+ st_line['account_id'] = bank.partner_id.property_account_payable.id
1475+ st_line['type'] ='customer'
1476+ # ..Let see if we can make that just one line of imput
1477+ print st_line
1478+ if not check_ids:
1479+ bank_statement_output.append(st_line.copy())
1480+
1481+
1482+
1483+ current += 1
1484+ return bank_statement_output
1485+
1486+
1487+def fill_simple_list(bankData):
1488+ current = 0
1489+ bank_statement_lines={}
1490+ bank_statements_list=[]
1491+ while current < len(bankData):
1492+ # codes used are 20,25,28,28c,60m,61,86,62,64,65. Only 61 and 68 are intresting (if you want more checks 25 and 60 are intresting)
1493+ statement_line = string.find(bankData[current], ':61:')
1494+ statement_description = string.find(bankData[current], ':86:')
1495+ # these codes we use to determin the possible end of the description
1496+ closing_balance = string.find(bankData[current], ':62F:')
1497+ closing_balance_available = string.find(bankData[current], ':64:')
1498+ if statement_line >= 0:
1499+ bank_statement_lines[":61:"]=bankData[current][4:]
1500+ if statement_description >= 0:
1501+ bank_statement_lines[":68:"]=bankData[current][4:]
1502+ if closing_balance >= 0:
1503+ bank_statement_lines[":62F:"]=bankData[current][5:]
1504+ if closing_balance_available >= 0:
1505+ bank_statement_lines[":64:"]=bankData[current][4:]
1506+ if bankData[current][0]!=":" and bankData[current][0]!="-" :
1507+ # some banks use LF , an not an extra :68:, so mutch for a standerd
1508+ bank_statement_lines[":68:"]=bankData[current][0:]
1509+ if statement_line >= 0 or statement_description >= 0 or statement_description >= 0 or closing_balance_available>= 0:
1510+ bank_statements_list.append(bank_statement_lines.copy())
1511+ bank_statement_lines={}
1512+ current += 1
1513+ return bank_statements_list
1514+
1515+
1516+def get_data(self, cr, uid, bankData, bank_statement):
1517+ #pool = pooler.get_pool(cr.dbname)
1518+ bank_statement_list=[]
1519+ bank_statement_output=[]
1520+ bank_statement_list = fill_simple_list(bankData) #just keeping it simple
1521+ bank_statement_output=parse_sequence(bank_statement_list,bank_statement,cr, uid,)
1522+ print bank_statement_output
1523+ return bank_statement_output
1524+
1525+
1526
1527=== added directory 'account_banking'
1528=== renamed directory 'account_banking' => 'account_banking.moved'
1529=== added file 'account_banking/__init__.py'
1530--- account_banking/__init__.py 1970-01-01 00:00:00 +0000
1531+++ account_banking/__init__.py 2010-03-04 01:53:21 +0000
1532@@ -0,0 +1,34 @@
1533+# -*- encoding: utf-8 -*-
1534+##############################################################################
1535+#
1536+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
1537+# All Rights Reserved
1538+#
1539+# WARNING: This program as such is intended to be used by professional
1540+# programmers who take the whole responsability of assessing all potential
1541+# consequences resulting from its eventual inadequacies and bugs
1542+# End users who are looking for a ready-to-use solution with commercial
1543+# garantees and support are strongly adviced to contract EduSense BV
1544+#
1545+# This program is free software: you can redistribute it and/or modify
1546+# it under the terms of the GNU General Public License as published by
1547+# the Free Software Foundation, either version 3 of the License, or
1548+# (at your option) any later version.
1549+#
1550+# This program is distributed in the hope that it will be useful,
1551+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1552+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1553+# GNU General Public License for more details.
1554+#
1555+# You should have received a copy of the GNU General Public License
1556+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1557+#
1558+##############################################################################
1559+print 'Importing account_banking.account_banking'
1560+import account_banking
1561+print 'Importing account_banking.parsers'
1562+import parsers
1563+print 'Importing account_banking.wizard'
1564+import wizard
1565+
1566+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1567
1568=== added file 'account_banking/__terp__.py'
1569--- account_banking/__terp__.py 1970-01-01 00:00:00 +0000
1570+++ account_banking/__terp__.py 2010-03-04 01:53:21 +0000
1571@@ -0,0 +1,97 @@
1572+##############################################################################
1573+#
1574+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
1575+# All Rights Reserved
1576+#
1577+# WARNING: This program as such is intended to be used by professional
1578+# programmers who take the whole responsability of assessing all potential
1579+# consequences resulting from its eventual inadequacies and bugs
1580+# End users who are looking for a ready-to-use solution with commercial
1581+# garantees and support are strongly adviced to contract EduSense BV
1582+#
1583+# This program is free software: you can redistribute it and/or modify
1584+# it under the terms of the GNU General Public License as published by
1585+# the Free Software Foundation, either version 3 of the License, or
1586+# (at your option) any later version.
1587+#
1588+# This program is distributed in the hope that it will be useful,
1589+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1590+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1591+# GNU General Public License for more details.
1592+#
1593+# You should have received a copy of the GNU General Public License
1594+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1595+#
1596+##############################################################################
1597+{
1598+ 'name': 'Account Banking',
1599+ 'version': '0.1',
1600+ 'license': 'GPL-3',
1601+ 'author': 'EduSense BV',
1602+ 'category': 'Account Banking',
1603+ 'depends': ['base', 'base_iban', 'account', 'account_payment'],
1604+ 'init_xml': [],
1605+ 'update_xml': [
1606+ #'security/ir.model.access.csv',
1607+ 'account_banking_import_wizard.xml',
1608+ 'account_banking_view.xml',
1609+ 'account_banking_workflow.xml',
1610+ ],
1611+ 'description': '''
1612+ Module to do banking.
1613+
1614+ This modules tries to combine all current banking import and export
1615+ schemes. Rationale for this is that it is quite common to have foreign
1616+ bank account numbers next to national bank account numbers. The current
1617+ approach, which hides the national banking interface schemes in the
1618+ l10n_xxx modules, makes it very difficult to use these simultanious.
1619+ A more banking oriented approach seems more logical and cleaner.
1620+
1621+ Changes to default OpenERP:
1622+
1623+ * Puts focus on the real life messaging with banks:
1624+ + Bank statement lines upgraded to independent bank transactions.
1625+ + Banking statements have no special accountancy meaning, they're just
1626+ message envelopes for a number of bank transactions.
1627+ + Bank statements can be either encoded by hand to reflect the document
1628+ version of Bank Statements, or created as an optional side effect of
1629+ importing Bank Transactions.
1630+
1631+ * Preparations for SEPA:
1632+ + IBAN accounts are the standard in the SEPA countries
1633+ + local accounts are derived from SEPA (excluding Turkey) but are
1634+ considered to be identical to the corresponding SEPA account.
1635+ + Banks are identified with either Country + Bank code + Branch code or BIC
1636+ + Each bank can have its own pace in introducing SEPA into their
1637+ communication with their customers.
1638+ + National online databases can be used to convert BBAN's to IBAN's.
1639+
1640+ * Adds dropin extensible import facility for bank communication in:
1641+ + MultiBank (NL) format transaction files,
1642+ - (todo) MT940 (Swift) format transaction files,
1643+ - (todo) CODA (BE) format transaction files,
1644+ - (wish) SEPA Credits (ISO 200022) messages,
1645+
1646+ * Extends payments for digital banking:
1647+ + Adapted workflow in payments to reflect banking operations
1648+ + Relies on account_payment mechanics to extend with export generators.
1649+ - ClieOp3 (NL) payment and direct debit orders files available as
1650+ account_banking_nl_clieop
1651+ - (wish) BTL91 (NL) payment orders files (no format description available),
1652+ - (wish) SEPA Direct Debits (ISO 200022) messages
1653+
1654+ * Additional features for the import/export mechanism:
1655+ + Automatic matching and creation of bank accounts, banks and partners,
1656+ during import of statements.
1657+ + Automatic matching with invoices and payments.
1658+ + Sound import mechanism, allowing multiple imports of the same
1659+ transactions repeated over multiple files.
1660+ + Journal configuration per bank account.
1661+ + Business logic and format parsing strictly separated to ease the
1662+ development of new parsers.
1663+ + No special configuration needed for the parsers, new parsers are
1664+ recognized and made available at server (re)start.
1665+ ''',
1666+ 'active': False,
1667+ 'installable': True,
1668+}
1669
1670=== added file 'account_banking/account_banking.py'
1671--- account_banking/account_banking.py 1970-01-01 00:00:00 +0000
1672+++ account_banking/account_banking.py 2010-03-04 01:53:21 +0000
1673@@ -0,0 +1,752 @@
1674+# -*- encoding: utf-8 -*-
1675+##############################################################################
1676+#
1677+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
1678+# All Rights Reserved
1679+#
1680+# This program is free software: you can redistribute it and/or modify
1681+# it under the terms of the GNU General Public License as published by
1682+# the Free Software Foundation, either version 3 of the License, or
1683+# (at your option) any later version.
1684+#
1685+# This program is distributed in the hope that it will be useful,
1686+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1687+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1688+# GNU General Public License for more details.
1689+#
1690+# You should have received a copy of the GNU General Public License
1691+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1692+#
1693+##############################################################################
1694+
1695+'''
1696+This module shows resemblance to both account_bankimport/bankimport.py,
1697+account/account_bank_statement.py and account_payment(_export). All hail to
1698+the makers. account_bankimport is only referenced for their ideas and the
1699+framework of the filters, which they in their turn seem to have derived
1700+from account_coda.
1701+
1702+Modifications are extensive:
1703+
1704+1. In relation to account/account_bank_statement.py:
1705+ account.bank.statement is effectively stripped from its account.period
1706+ association, while account.bank.statement.line is extended with the same
1707+ association, thereby reflecting real world usage of bank.statement as a
1708+ list of bank transactions and bank.statement.line as a bank transaction.
1709+
1710+2. In relation to account/account_bankimport:
1711+ All filter objects and extensions to res.company are removed. Instead a
1712+ flexible auto-loading and auto-browsing plugin structure is created,
1713+ whereby business logic and encoding logic are strictly separated.
1714+ Both parsers and business logic are rewritten from scratch.
1715+
1716+ The association of account.journal with res.company is replaced by an
1717+ association of account.journal with res.partner.bank, thereby allowing
1718+ multiple bank accounts per company and one journal per bank account.
1719+
1720+ The imported bank statement file does not result in a single 'bank
1721+ statement', but in a list of bank statements by definition of whatever the
1722+ bank sees as a statement. Every imported bank statement contains at least
1723+ one bank transaction, which is a modded account.bank.statement.line.
1724+
1725+3. In relation to account_payment:
1726+ An additional state was inserted between 'open' and 'done', to reflect a
1727+ exported bank orders file which was not reported back through statements.
1728+ The import of statements matches the payments and reconciles them when
1729+ needed, flagging them 'done'. When no export wizards are found, the
1730+ default behavior is to flag the orders as 'sent', not as 'done'.
1731+'''
1732+import time
1733+from osv import osv, fields
1734+from tools.translate import _
1735+
1736+class account_banking_account_settings(osv.osv):
1737+ '''Default Journal for Bank Account'''
1738+ _name = 'account.banking.account.settings'
1739+ _description = __doc__
1740+ _columns = {
1741+ 'company_id': fields.many2one('res.company', 'Company', select=True,
1742+ required=True),
1743+ 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',
1744+ select=True, required=True),
1745+ 'journal_id': fields.many2one('account.journal', 'Journal',
1746+ required=True),
1747+ 'default_credit_account_id': fields.many2one(
1748+ 'account.account', 'Default credit account', select=True,
1749+ help=('The account to use when an unexpected payment was signaled. '
1750+ 'This can happen when a direct debit payment is cancelled '
1751+ 'by a customer, or when no matching payment can be found. '
1752+ ' Mind that you can correct movements before confirming them.'
1753+ ),
1754+ required=True
1755+ ),
1756+ 'default_debit_account_id': fields.many2one(
1757+ 'account.account', 'Default debit account',
1758+ select=True, required=True,
1759+ help=('The account to use when an unexpected payment is received. '
1760+ 'This can be needed when a customer pays in advance or when '
1761+ 'no matching invoice can be found. Mind that you can correct '
1762+ 'movements before confirming them.'
1763+ ),
1764+ ),
1765+ }
1766+
1767+ def _default_company(self, cursor, uid, context={}):
1768+ user = self.pool.get('res.users').browse(cursor, uid, uid, context=context)
1769+ if user.company_id:
1770+ return user.company_id.id
1771+ return self.pool.get('res.company').search(cursor, uid,
1772+ [('parent_id', '=', False)]
1773+ )[0]
1774+
1775+ _defaults = {
1776+ 'company_id': _default_company,
1777+ }
1778+account_banking_account_settings()
1779+
1780+class account_banking_imported_file(osv.osv):
1781+ '''Imported Bank Statements File'''
1782+ _name = 'account.banking.imported.file'
1783+ _description = __doc__
1784+ _columns = {
1785+ 'company_id': fields.many2one('res.company', 'Company',
1786+ select=True, readonly=True
1787+ ),
1788+ 'date': fields.datetime('Import Date', readonly=False, select=True),
1789+ 'format': fields.char('File Format', size=20, readonly=False),
1790+ 'file': fields.binary('Raw Data', readonly=False),
1791+ 'log': fields.text('Import Log', readonly=False),
1792+ 'user_id': fields.many2one('res.users', 'Responsible User',
1793+ readonly=False, select=True
1794+ ),
1795+ 'state': fields.selection(
1796+ [('unfinished', 'Unfinished'),
1797+ ('error', 'Error'),
1798+ ('ready', 'Finished'),
1799+ ], 'State', select=True, readonly=True
1800+ ),
1801+ 'statement_ids': fields.one2many('account.bank.statement',
1802+ 'banking_id', 'Statements',
1803+ readonly=False,
1804+ ),
1805+ }
1806+ _defaults = {
1807+ 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
1808+ 'user_id': lambda self, cursor, uid, context: uid,
1809+ }
1810+account_banking_imported_file()
1811+
1812+class account_bank_statement(osv.osv):
1813+ '''
1814+ Extensions from account_bank_statement:
1815+ 1. Removed period_id (transformed to optional boolean) - as it is no
1816+ longer needed.
1817+ 2. Extended 'button_confirm' trigger to cope with the period per
1818+ statement_line situation.
1819+ 3. Added optional relation with imported statements file
1820+ '''
1821+ _inherit = 'account.bank.statement'
1822+ _columns = {
1823+ 'period_id': fields.many2one('account.period', 'Period',
1824+ required=False, readonly=True),
1825+ 'banking_id': fields.many2one('account.banking.imported.file',
1826+ 'Imported File', readonly=True,
1827+ ),
1828+ }
1829+ _defaults = {
1830+ 'period_id': lambda *a: False,
1831+ }
1832+
1833+ def _get_period(self, cursor, uid, date, context={}):
1834+ '''
1835+ Find matching period for date, not meant for _defaults.
1836+ '''
1837+ period_obj = self.pool.get('account.period')
1838+ periods = period_obj.find(cursor, uid, dt=date, context=context)
1839+ return periods and periods[0] or False
1840+
1841+ def button_confirm(self, cursor, uid, ids, context=None):
1842+ # This is largely a copy of the original code in account
1843+ # As there is no valid inheritance mechanism for large actions, this
1844+ # is the only option to add functionality to existing actions.
1845+ # WARNING: when the original code changes, this trigger has to be
1846+ # updated in sync.
1847+ done = []
1848+ res_currency_obj = self.pool.get('res.currency')
1849+ res_users_obj = self.pool.get('res.users')
1850+ account_move_obj = self.pool.get('account.move')
1851+ account_move_line_obj = self.pool.get('account.move.line')
1852+ account_bank_statement_line_obj = \
1853+ self.pool.get('account.bank.statement.line')
1854+
1855+ company_currency_id = res_users_obj.browse(cursor, uid, uid,
1856+ context=context).company_id.currency_id.id
1857+
1858+ for st in self.browse(cursor, uid, ids, context):
1859+ if not st.state=='draft':
1860+ continue
1861+ end_bal = st.balance_end or 0.0
1862+ if not (abs(end_bal - st.balance_end_real) < 0.0001):
1863+ raise osv.except_osv(_('Error !'),
1864+ _('The statement balance is incorrect !\n') +
1865+ _('The expected balance (%.2f) is different '
1866+ 'than the computed one. (%.2f)') % (
1867+ st.balance_end_real, st.balance_end
1868+ ))
1869+ if (not st.journal_id.default_credit_account_id) \
1870+ or (not st.journal_id.default_debit_account_id):
1871+ raise osv.except_osv(_('Configration Error !'),
1872+ _('Please verify that an account is defined in the journal.'))
1873+
1874+ for line in st.move_line_ids:
1875+ if line.state <> 'valid':
1876+ raise osv.except_osv(_('Error !'),
1877+ _('The account entries lines are not in valid state.'))
1878+
1879+ for move in st.line_ids:
1880+ period_id = self._get_period(cursor, uid, move.date, context=context)
1881+ move_id = account_move_obj.create(cursor, uid, {
1882+ 'journal_id': st.journal_id.id,
1883+ 'period_id': period_id,
1884+ }, context=context)
1885+ account_bank_statement_line_obj.write(cursor, uid, [move.id], {
1886+ 'move_ids': [(4, move_id, False)]
1887+ })
1888+ if not move.amount:
1889+ continue
1890+
1891+ torec = []
1892+ if move.amount >= 0:
1893+ account_id = st.journal_id.default_credit_account_id.id
1894+ else:
1895+ account_id = st.journal_id.default_debit_account_id.id
1896+ acc_cur = ((move.amount<=0) and st.journal_id.default_debit_account_id) \
1897+ or move.account_id
1898+ amount = res_currency_obj.compute(cursor, uid, st.currency.id,
1899+ company_currency_id, move.amount, context=context,
1900+ account=acc_cur)
1901+ if move.reconcile_id and move.reconcile_id.line_new_ids:
1902+ for newline in move.reconcile_id.line_new_ids:
1903+ amount += newline.amount
1904+
1905+ val = {
1906+ 'name': move.name,
1907+ 'date': move.date,
1908+ 'ref': move.ref,
1909+ 'move_id': move_id,
1910+ 'partner_id': ((move.partner_id) and move.partner_id.id) or False,
1911+ 'account_id': (move.account_id) and move.account_id.id,
1912+ 'credit': ((amount>0) and amount) or 0.0,
1913+ 'debit': ((amount<0) and -amount) or 0.0,
1914+ 'statement_id': st.id,
1915+ 'journal_id': st.journal_id.id,
1916+ 'period_id': period_id,
1917+ 'currency_id': st.currency.id,
1918+ }
1919+
1920+ amount = res_currency_obj.compute(cursor, uid, st.currency.id,
1921+ company_currency_id, move.amount, context=context,
1922+ account=acc_cur)
1923+
1924+ if move.account_id and move.account_id.currency_id:
1925+ val['currency_id'] = move.account_id.currency_id.id
1926+ if company_currency_id==move.account_id.currency_id.id:
1927+ amount_cur = move.amount
1928+ else:
1929+ amount_cur = res_currency_obj.compute(cursor, uid, company_currency_id,
1930+ move.account_id.currency_id.id, amount, context=context,
1931+ account=acc_cur)
1932+ val['amount_currency'] = amount_cur
1933+
1934+ torec.append(account_move_line_obj.create(cursor, uid, val , context=context))
1935+
1936+ if move.reconcile_id and move.reconcile_id.line_new_ids:
1937+ for newline in move.reconcile_id.line_new_ids:
1938+ account_move_line_obj.create(cursor, uid, {
1939+ 'name': newline.name or move.name,
1940+ 'date': move.date,
1941+ 'ref': move.ref,
1942+ 'move_id': move_id,
1943+ 'partner_id': ((move.partner_id) and move.partner_id.id) or False,
1944+ 'account_id': (newline.account_id) and newline.account_id.id,
1945+ 'debit': newline.amount>0 and newline.amount or 0.0,
1946+ 'credit': newline.amount<0 and -newline.amount or 0.0,
1947+ 'statement_id': st.id,
1948+ 'journal_id': st.journal_id.id,
1949+ 'period_id': period_id,
1950+ }, context=context)
1951+
1952+ # Fill the secondary amount/currency
1953+ # if currency is not the same than the company
1954+ amount_currency = False
1955+ currency_id = False
1956+ if st.currency.id <> company_currency_id:
1957+ amount_currency = move.amount
1958+ currency_id = st.currency.id
1959+
1960+ account_move_line_obj.create(cursor, uid, {
1961+ 'name': move.name,
1962+ 'date': move.date,
1963+ 'ref': move.ref,
1964+ 'move_id': move_id,
1965+ 'partner_id': ((move.partner_id) and move.partner_id.id) or False,
1966+ 'account_id': account_id,
1967+ 'credit': ((amount < 0) and -amount) or 0.0,
1968+ 'debit': ((amount > 0) and amount) or 0.0,
1969+ 'statement_id': st.id,
1970+ 'journal_id': st.journal_id.id,
1971+ 'period_id': period_id,
1972+ 'amount_currency': amount_currency,
1973+ 'currency_id': currency_id,
1974+ }, context=context)
1975+
1976+ for line in account_move_line_obj.browse(cursor, uid, [x.id for x in
1977+ account_move_obj.browse(cursor, uid, move_id, context=context).line_id
1978+ ], context=context):
1979+ if line.state <> 'valid':
1980+ raise osv.except_osv(
1981+ _('Error !'),
1982+ _('Account move line "%s" is not valid')
1983+ % line.name
1984+ )
1985+
1986+ if move.reconcile_id and move.reconcile_id.line_ids:
1987+ torec += map(lambda x: x.id, move.reconcile_id.line_ids)
1988+ #try:
1989+ if abs(move.reconcile_amount-move.amount)<0.0001:
1990+ account_move_line_obj.reconcile(
1991+ cursor, uid, torec, 'statement', context
1992+ )
1993+ else:
1994+ account_move_line_obj.reconcile_partial(
1995+ cursor, uid, torec, 'statement', context
1996+ )
1997+ #except:
1998+ # raise osv.except_osv(
1999+ # _('Error !'),
2000+ # _('Unable to reconcile entry "%s": %.2f') %
2001+ # (move.name, move.amount)
2002+ # )
2003+
2004+ if st.journal_id.entry_posted:
2005+ account_move_obj.write(cursor, uid, [move_id], {'state':'posted'})
2006+ done.append(st.id)
2007+ self.write(cursor, uid, done, {'state':'confirm'}, context=context)
2008+ return True
2009+
2010+account_bank_statement()
2011+
2012+class account_bank_statement_line(osv.osv):
2013+ '''
2014+ Extension on basic class:
2015+ 1. Extra links to account.period and res.partner.bank for tracing and
2016+ matching.
2017+ 2. Extra 'trans' field to carry the transaction id of the bank.
2018+ 3. Extra 'international' flag to indicate the missing of a remote
2019+ account number. Some banks use seperate international banking
2020+ modules that do not integrate with the standard transaction files.
2021+ 4. Readonly states for most fields except when in draft.
2022+ '''
2023+ _inherit = 'account.bank.statement.line'
2024+ _description = 'Bank Transaction'
2025+
2026+ def _get_period(self, cursor, uid, context={}):
2027+ date = context.get('date') and context['date'] or None
2028+ periods = self.pool.get('account.period').find(cursor, uid, dt=date)
2029+ return periods and periods[0] or False
2030+
2031+ def _seems_international(self, cursor, uid, context={}):
2032+ '''
2033+ Some banks have seperate international banking modules which do not
2034+ translate correctly into the national formats. Instead, they
2035+ leave key fields blank and signal this anomaly with a special
2036+ transfer type.
2037+ With the introduction of SEPA, this may worsen greatly, as SEPA
2038+ payments are considered to be analogous to international payments
2039+ by most local formats.
2040+ '''
2041+ # Quick and dirty check: if remote bank account is missing, assume
2042+ # international transfer
2043+ return not (
2044+ context.get('partner_bank_id') and context['partner_bank_id']
2045+ )
2046+ # Not so dirty check: check if partner_id is set. If it is, check the
2047+ # default/invoice addresses country. If it is the same as our
2048+ # company's, its local, else international.
2049+ # TODO: to be done
2050+
2051+ _columns = {
2052+ # Redefines
2053+ 'amount': fields.float('Amount', readonly=True,
2054+ states={'draft': [('readonly', False)]}),
2055+ 'ref': fields.char('Ref.', size=32, readonly=True,
2056+ states={'draft': [('readonly', False)]}),
2057+ 'name': fields.char('Name', size=64, required=True, readonly=True,
2058+ states={'draft': [('readonly', False)]}),
2059+ 'date': fields.date('Date', required=True, readonly=True,
2060+ states={'draft': [('readonly', False)]}),
2061+ # New columns
2062+ 'trans': fields.char('Bank Transaction ID', size=15, required=False,
2063+ readonly=True,
2064+ states={'draft':[('readonly', False)]},
2065+ ),
2066+ 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',
2067+ required=False, readonly=True,
2068+ states={'draft':[('readonly', False)]},
2069+ ),
2070+ 'period_id': fields.many2one('account.period', 'Period', required=True,
2071+ states={'confirm': [('readonly', True)]}),
2072+ # Not used yet, but usefull in the future.
2073+ 'international': fields.boolean('International Transaction',
2074+ required=False,
2075+ states={'confirm': [('readonly', True)]},
2076+ ),
2077+ }
2078+
2079+ _defaults = {
2080+ 'period_id': _get_period,
2081+ 'international': _seems_international,
2082+ }
2083+
2084+ def onchange_partner_id(self, cursor, uid, line_id, partner_id, type,
2085+ currency_id, context={}
2086+ ):
2087+ if not partner_id:
2088+ return {}
2089+ users_obj = self.pool.get('res.users')
2090+ partner_obj = self.pool.get('res.partner')
2091+
2092+ company_currency_id = users_obj.browse(cursor, uid, uid, context=context)\
2093+ .company_id.currency_id.id
2094+
2095+ if not currency_id:
2096+ currency_id = company_currency_id
2097+
2098+ partner = partner_obj.browse(cursor, uid, partner_id, context=context)
2099+ if partner.supplier and not part.customer:
2100+ account_id = part.property_account_payable.id
2101+ type = 'supplier'
2102+ elif partner.supplier and not part.customer:
2103+ account_id = part.property_account_receivable.id
2104+ type = 'customer'
2105+ else:
2106+ account_id = 0
2107+ type = 'general'
2108+
2109+ return {'value': {'type': type , 'account_id': account_id}}
2110+
2111+ def write(self, cursor, uid, ids, values, context={}):
2112+ # TODO: Not sure what to do with this, as it seems that most of
2113+ # this code is related to res_partner_bank and not to this class.
2114+ account_numbers = []
2115+ bank_obj = self.pool.get('res.partner.bank')
2116+ statement_line_obj = self.pool.get('account.bank.statement.line')
2117+
2118+ if 'partner_id' in values:
2119+ bank_account_ids = bank_obj.search(cursor, uid,
2120+ [('partner_id','=', values['partner_id'])]
2121+ )
2122+ bank_accounts = bank_obj.browse(cursor, uid, bank_account_ids)
2123+ import_account_numbers = statement_line_obj.browse(cursor, uid, ids)
2124+
2125+ for accno in bank_accounts:
2126+ # Allow acc_number and iban to co-exist (SEPA will unite the
2127+ # two, but - as seen now - in an uneven pace per country)
2128+ if accno.acc_number:
2129+ account_numbers.append(accno.acc_number)
2130+ if accno.iban:
2131+ account_numbers.append(accno.iban)
2132+
2133+ if any([x for x in import_account_numbers if x.bank_accnumber in
2134+ account_numbers]):
2135+ for accno in import_account_numbers:
2136+ account_data = _get_account_data(accno.bank_accnumber)
2137+ if account_data:
2138+ bank_id = bank_obj.search(cursor, uid, [
2139+ ('name', '=', account_data['bank_name'])
2140+ ])
2141+ if not bank_id:
2142+ bank_id = bank_obj.create(cursor, uid, {
2143+ 'name': account_data['bank_name'],
2144+ 'bic': account_data['bic'],
2145+ 'active': 1,
2146+ })
2147+ else:
2148+ bank_id = bank_id[0]
2149+
2150+ bank_acc = bank_obj.create(cursor, uid, {
2151+ 'state': 'bank',
2152+ 'partner_id': values['partner_id'],
2153+ 'bank': bank_id,
2154+ 'acc_number': accno.bank_accnumber,
2155+ })
2156+
2157+ bank_iban = bank_obj.create(cursor, uid, {
2158+ 'state': 'iban',
2159+ 'partner_id': values['partner_id'],
2160+ 'bank': bank_id,
2161+ 'iban': account_data['iban'],
2162+ })
2163+
2164+ else:
2165+ bank_acc = bank_obj.create(cursor, uid, {
2166+ 'state': 'bank',
2167+ 'partner_id': values['partner_id'],
2168+ 'acc_number': accno.bank_accnumber,
2169+ })
2170+
2171+ return super(account_bank_statement_line, self).write(
2172+ cursor, uid, ids, values, context
2173+ )
2174+
2175+account_bank_statement_line()
2176+
2177+class payment_type(osv.osv):
2178+ '''
2179+ Make description field translatable #, add country context
2180+ '''
2181+ _inherit = 'payment.type'
2182+ _columns = {
2183+ 'name': fields.char('Name', size=64, required=True, translate=True,
2184+ help='Payment Type'
2185+ ),
2186+ #'country_id': fields.many2one('res.country', 'Country',
2187+ # required=False,
2188+ # help='Use this to limit this type to a specific country'
2189+ # ),
2190+ }
2191+ #_defaults = {
2192+ # 'country_id': lambda *a: False,
2193+ #}
2194+payment_type()
2195+
2196+class payment_line(osv.osv):
2197+ '''
2198+ Add extra export_state and date_done fields; make destination bank account
2199+ mandatory, as it makes no sense to send payments into thin air.
2200+ '''
2201+ _inherit = 'payment.line'
2202+ _columns = {
2203+ # New fields
2204+ 'bank_id': fields.many2one('res.partner.bank',
2205+ 'Destination Bank account',
2206+ required=True
2207+ ),
2208+ 'export_state': fields.selection([
2209+ ('draft', 'Draft'),
2210+ ('open','Confirmed'),
2211+ ('cancel','Cancelled'),
2212+ ('sent', 'Sent'),
2213+ ('done','Done'),
2214+ ], 'State', select=True
2215+ ),
2216+ # Redefined fields: added states
2217+ 'date_done': fields.datetime('Date Confirmed', select=True,
2218+ readonly=True),
2219+ 'name': fields.char(
2220+ 'Your Reference', size=64, required=True,
2221+ states={
2222+ 'sent': [('readonly', True)],
2223+ 'done': [('readonly', True)]
2224+ },
2225+ ),
2226+ 'communication': fields.char(
2227+ 'Communication', size=64, required=True,
2228+ help=("Used as the message between ordering customer and current "
2229+ "company. Depicts 'What do you want to say to the recipient"
2230+ " about this order ?'"
2231+ ),
2232+ states={
2233+ 'sent': [('readonly', True)],
2234+ 'done': [('readonly', True)]
2235+ },
2236+ ),
2237+ 'communication2': fields.char(
2238+ 'Communication 2', size=64,
2239+ help='The successor message of Communication.',
2240+ states={
2241+ 'sent': [('readonly', True)],
2242+ 'done': [('readonly', True)]
2243+ },
2244+ ),
2245+ 'move_line_id': fields.many2one(
2246+ 'account.move.line', 'Entry line',
2247+ domain=[('reconcile_id','=', False),
2248+ ('account_id.type', '=','payable')
2249+ ],
2250+ help=('This Entry Line will be referred for the information of '
2251+ 'the ordering customer.'
2252+ ),
2253+ states={
2254+ 'sent': [('readonly', True)],
2255+ 'done': [('readonly', True)]
2256+ },
2257+ ),
2258+ 'amount_currency': fields.float(
2259+ 'Amount in Partner Currency', digits=(16,2),
2260+ required=True,
2261+ help='Payment amount in the partner currency',
2262+ states={
2263+ 'sent': [('readonly', True)],
2264+ 'done': [('readonly', True)]
2265+ },
2266+ ),
2267+ 'currency': fields.many2one(
2268+ 'res.currency', 'Partner Currency', required=True,
2269+ states={
2270+ 'sent': [('readonly', True)],
2271+ 'done': [('readonly', True)]
2272+ },
2273+ ),
2274+ 'bank_id': fields.many2one(
2275+ 'res.partner.bank', 'Destination Bank account',
2276+ states={
2277+ 'sent': [('readonly', True)],
2278+ 'done': [('readonly', True)]
2279+ },
2280+ ),
2281+ 'order_id': fields.many2one(
2282+ 'payment.order', 'Order', required=True,
2283+ ondelete='cascade', select=True,
2284+ states={
2285+ 'sent': [('readonly', True)],
2286+ 'done': [('readonly', True)]
2287+ },
2288+ ),
2289+ 'partner_id': fields.many2one(
2290+ 'res.partner', string="Partner", required=True,
2291+ help='The Ordering Customer',
2292+ states={
2293+ 'sent': [('readonly', True)],
2294+ 'done': [('readonly', True)]
2295+ },
2296+ ),
2297+ 'date': fields.date(
2298+ 'Payment Date',
2299+ help=("If no payment date is specified, the bank will treat this "
2300+ "payment line directly"
2301+ ),
2302+ states={
2303+ 'sent': [('readonly', True)],
2304+ 'done': [('readonly', True)]
2305+ },
2306+ ),
2307+ 'state': fields.selection([
2308+ ('normal','Free'),
2309+ ('structured','Structured')
2310+ ], 'Communication Type', required=True,
2311+ states={
2312+ 'sent': [('readonly', True)],
2313+ 'done': [('readonly', True)]
2314+ },
2315+ ),
2316+ }
2317+ _defaults = {
2318+ 'export_state': lambda *a: 'draft',
2319+ 'date_done': lambda *a: False,
2320+ }
2321+payment_line()
2322+
2323+class payment_order(osv.osv):
2324+ '''
2325+ Enable extra state for payment exports
2326+ '''
2327+ _inherit = 'payment.order'
2328+ _columns = {
2329+ 'date_planned': fields.date(
2330+ 'Scheduled date if fixed',
2331+ states={
2332+ 'sent': [('readonly', True)],
2333+ 'done': [('readonly', True)]
2334+ },
2335+ help='Select a date if you have chosen Preferred Date to be fixed.'
2336+ ),
2337+ 'reference': fields.char(
2338+ 'Reference', size=128, required=True,
2339+ states={
2340+ 'sent': [('readonly', True)],
2341+ 'done': [('readonly', True)]
2342+ },
2343+ ),
2344+ 'mode': fields.many2one(
2345+ 'payment.mode', 'Payment mode', select=True, required=True,
2346+ states={
2347+ 'sent': [('readonly', True)],
2348+ 'done': [('readonly', True)]
2349+ },
2350+ help='Select the Payment Mode to be applied.'
2351+ ),
2352+ 'state': fields.selection([
2353+ ('draft', 'Draft'),
2354+ ('open','Confirmed'),
2355+ ('cancel','Cancelled'),
2356+ ('sent', 'Sent'),
2357+ ('done','Done'),
2358+ ], 'State', select=True
2359+ ),
2360+ 'line_ids': fields.one2many(
2361+ 'payment.line', 'order_id', 'Payment lines',
2362+ states={
2363+ 'sent': [('readonly', True)],
2364+ 'done': [('readonly', True)]
2365+ },
2366+ ),
2367+ 'user_id': fields.many2one(
2368+ 'res.users','User', required=True,
2369+ states={
2370+ 'sent': [('readonly', True)],
2371+ 'done': [('readonly', True)]
2372+ },
2373+ ),
2374+ 'date_prefered': fields.selection([
2375+ ('now', 'Directly'),
2376+ ('due', 'Due date'),
2377+ ('fixed', 'Fixed date')
2378+ ], "Preferred date", change_default=True, required=True,
2379+ states={
2380+ 'sent': [('readonly', True)],
2381+ 'done': [('readonly', True)]
2382+ },
2383+ help=("Choose an option for the Payment Order:'Fixed' stands for a "
2384+ "date specified by you.'Directly' stands for the direct "
2385+ "execution.'Due date' stands for the scheduled date of "
2386+ "execution."
2387+ )
2388+ ),
2389+ }
2390+
2391+ def set_to_draft(self, cr, uid, ids, *args):
2392+ cr.execute("UPDATE payment_line "
2393+ "SET export_state = 'draft' "
2394+ "WHERE order_id in (%s)" % (
2395+ ','.join(map(str, ids))
2396+ ))
2397+ return super(payment_order, self).set_to_draft(
2398+ cr, uid, ids, *args
2399+ )
2400+
2401+ def action_sent(self, cr, uid, ids, *args):
2402+ cr.execute("UPDATE payment_line "
2403+ "SET export_state = 'sent' "
2404+ "WHERE order_id in (%s)" % (
2405+ ','.join(map(str, ids))
2406+ ))
2407+ return True
2408+
2409+ def set_done(self, cr, uid, id, *args):
2410+ '''
2411+ Extend standard transition to update childs as well.
2412+ '''
2413+ cr.execute("UPDATE payment_line "
2414+ "SET export_state = 'done', date_done = '%s' "
2415+ "WHERE order_id = %s" % (
2416+ time.strftime('%Y-%m-%d'),
2417+ self.id
2418+ ))
2419+ return super(payment_order, self).set_done(
2420+ cr, uid, id, *args
2421+ )
2422+
2423+payment_order()
2424+
2425+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2426
2427=== added file 'account_banking/account_banking_demo.xml'
2428--- account_banking/account_banking_demo.xml 1970-01-01 00:00:00 +0000
2429+++ account_banking/account_banking_demo.xml 2010-03-04 01:53:21 +0000
2430@@ -0,0 +1,32 @@
2431+<?xml version="1.0" encoding="utf-8"?>
2432+<openerp>
2433+<data noupdate="1">
2434+ <record model="res.partner" id="partner_demo1">
2435+ <field name="name">Tiny S.p.r.l</field>
2436+ </record>
2437+ <record model="res.partner.bank" id="partner_bank1">
2438+ <field name="acc_number">301915554082</field>
2439+ <field name="state">bank</field>
2440+ <field name="partner_id" ref="partner_demo1"></field>
2441+ </record>
2442+
2443+ <record model="res.partner" id="partner_demo2">
2444+ <field name="name">The-design Company</field>
2445+ </record>
2446+ <record model="res.partner.bank" id="partner_bank2">
2447+ <field name="acc_number">050000000017</field>
2448+ <field name="state">iban</field>
2449+ <field name="partner_id" ref="partner_demo2"></field>
2450+ </record>
2451+
2452+<!-- <record model="res.partner.bank" id="partner_agrolait">
2453+ <field name="acc_number">301915554082</field>
2454+ <field name="partner_id" ref="base.res_partner_agrolait"/>
2455+ </record>
2456+
2457+ <record model="res.partner.bank" id="res_partner_10">
2458+ <field name="acc_number">050000000017</field>
2459+ <field name="partner_id" ref="base.res_partner_10"/>
2460+ </record>-->
2461+</data>
2462+</openerp>
2463
2464=== added file 'account_banking/account_banking_import_wizard.xml'
2465--- account_banking/account_banking_import_wizard.xml 1970-01-01 00:00:00 +0000
2466+++ account_banking/account_banking_import_wizard.xml 2010-03-04 01:53:21 +0000
2467@@ -0,0 +1,15 @@
2468+<?xml version="1.0" encoding="utf-8"?>
2469+<!--
2470+ Copyright (C) EduSense BV <http://www.edusense.nl>
2471+ All rights reserved.
2472+ The licence is in the file __terp__.py
2473+-->
2474+<openerp>
2475+ <data>
2476+ <wizard id="wizard_account_banking_import_file"
2477+ string="Import Bank Statements File"
2478+ model="account.bank.statement"
2479+ name="account_banking.banking_import"
2480+ />
2481+ </data>
2482+</openerp>
2483
2484=== added file 'account_banking/account_banking_view.xml'
2485--- account_banking/account_banking_view.xml 1970-01-01 00:00:00 +0000
2486+++ account_banking/account_banking_view.xml 2010-03-04 01:53:21 +0000
2487@@ -0,0 +1,211 @@
2488+<?xml version="1.0" encoding="utf-8"?>
2489+<!--
2490+ Copyright (C) EduSense BV <http://www.edusense.nl>
2491+ All rights reserved.
2492+ The licence is in the file __terp__.py
2493+-->
2494+<openerp>
2495+ <data>
2496+ <!-- Create new submenu in finance/periodical processing -->
2497+ <menuitem name="Banking"
2498+ id="account_banking.menu_finance_banking_actions"
2499+ parent="account.menu_finance_periodical_processing"
2500+ />
2501+ <!-- Create new submenu in finance/configuration -->
2502+ <menuitem name="Banking"
2503+ id="account_banking.menu_finance_banking_settings"
2504+ parent="account.menu_finance_configuration"
2505+ />
2506+
2507+ <!-- Create new view on default journals for bank accounts -->
2508+ <record model="ir.ui.view" id="view_banking_account_settings_form">
2509+ <field name="name">account.banking.account.settings.form</field>
2510+ <field name="model">account.banking.account.settings</field>
2511+ <field name="type">form</field>
2512+ <field name="arch" type="xml">
2513+ <form string="Default Import Settings for Bank Account">
2514+ <field name="company_id" />
2515+ <separator string="Bank Account Details" colspan="4" />
2516+ <field name="partner_bank_id" /> <!-- Needs fiddling... domain="[('partner_id','=',company_id.partner_id)]"/-->
2517+ <field name="journal_id" domain="[('type','=','cash')]" />
2518+ <separator string="Default Accounts for Unknown Movements" colspan="4" />
2519+ <field name="default_credit_account_id" />
2520+ <field name="default_debit_account_id" />
2521+ </form>
2522+ </field>
2523+ </record>
2524+ <record model="ir.ui.view" id="view_banking_account_settings_tree">
2525+ <field name="name">account.banking.account.settings.tree</field>
2526+ <field name="model">account.banking.account.settings</field>
2527+ <field name="type">tree</field>
2528+ <field name="arch" type="xml">
2529+ <tree string="Default Import Settings for Bank Account">
2530+ <field name="company_id" />
2531+ <field name="partner_bank_id" /> <!-- Needs fiddling... domain="[('partner_id','=',company_id.partner_id)]"/-->
2532+ <field name="journal_id" domain="[('type','=','cash')]" />
2533+ </tree>
2534+ </field>
2535+ </record>
2536+ <record model="ir.actions.act_window" id="action_account_banking_journals">
2537+ <field name="name">Default Import Settings for Bank Accounts</field>
2538+ <field name="type">ir.actions.act_window</field>
2539+ <field name="res_model">account.banking.account.settings</field>
2540+ <field name="view_type">form</field>
2541+ <field name="view_mode">tree,form</field>
2542+ </record>
2543+
2544+ <!-- Create new submenu for finance configuration -->
2545+ <menuitem name="Default Import Settings for Bank Accounts"
2546+ id="menu_action_account_banking_bank_journals"
2547+ parent="account_banking.menu_finance_banking_settings"
2548+ action="action_account_banking_journals"
2549+ sequence="12"
2550+ />
2551+
2552+ <!-- Create new view on imported statement files -->
2553+ <record model="ir.ui.view" id="view_account_banking_imported_file_form">
2554+ <field name="name">account.banking.imported.file.form</field>
2555+ <field name="model">account.banking.imported.file</field>
2556+ <field name="type">form</field>
2557+ <field name="arch" type="xml">
2558+ <form string="Imported Bank Statements">
2559+ <notebook colspan="4">
2560+ <page string="Import Details">
2561+ <field name="company_id" />
2562+ <field name="date" />
2563+ <field name="user_id" />
2564+ <field name="state" />
2565+ <field name="file"/>
2566+ <field name="format" />
2567+ </page>
2568+ <page string="Statements">
2569+ <field name="statement_ids" colspan="4"/>
2570+ </page>
2571+ <page string="Import Log">
2572+ <field name="log" colspan="4"/>
2573+ </page>
2574+ </notebook>
2575+ </form>
2576+ </field>
2577+ </record>
2578+ <record model="ir.ui.view" id="view_account_banking_imported_file_tree">
2579+ <field name="name">account.banking.imported.file.tree</field>
2580+ <field name="model">account.banking.imported.file</field>
2581+ <field name="type">tree</field>
2582+ <field name="arch" type="xml">
2583+ <tree string="Imported Bank Statements Files" colors="red:state=='error';blue:state=='unfinished'">
2584+ <field name="company_id" />
2585+ <field name="date" />
2586+ <field name="user_id" />
2587+ <field name="state" />
2588+ </tree>
2589+ </field>
2590+ </record>
2591+ <record model="ir.actions.act_window" id="action_account_banking_imported_files">
2592+ <field name="name">Imported Bank Statements Files</field>
2593+ <field name="type">ir.actions.act_window</field>
2594+ <field name="res_model">account.banking.imported.file</field>
2595+ <field name="view_type">form</field>
2596+ <field name="view_mode">tree,form</field>
2597+ </record>
2598+
2599+ <!-- Add a menu item for it -->
2600+ <menuitem name="Imported Bank Statements Files"
2601+ id="menu_action_account_banking_imported_files"
2602+ parent="account_banking.menu_finance_banking_actions"
2603+ action="action_account_banking_imported_files"
2604+ sequence="12"
2605+ />
2606+
2607+ <!-- Add the import wizard to the menu -->
2608+ <menuitem name="Import Bank Statements File"
2609+ id="menu_account_banking_import_wizard"
2610+ parent="account_banking.menu_finance_banking_actions"
2611+ type="wizard"
2612+ action="wizard_account_banking_import_file"
2613+ sequence="15"/>
2614+
2615+ <!-- Create right menu entry to see statements -->
2616+ <act_window name="Bank Statements File"
2617+ domain="[('banking_id', '=', active_id)]"
2618+ res_model="account.banking.imported.file"
2619+ src_model="account.bank.statement"
2620+ view_type="form"
2621+ view_mode="tree,form"
2622+ id="act_account_payment_account_bank_statement"/>
2623+
2624+ <!-- Move period_id from bank_statement form to bank_statement_line form
2625+ -->
2626+ <record id="view_banking_bank_statement_tree_1" model="ir.ui.view">
2627+ <field name="name">account.bank.statement.tree.banking</field>
2628+ <field name="inherit_id" ref="account.view_bank_statement_tree" />
2629+ <field name="model">account.bank.statement</field>
2630+ <field name="type">tree</field>
2631+ <field name="arch" type="xml">
2632+ <field name="period_id" position="replace"/>
2633+ </field>
2634+ </record>
2635+ <record id="view_banking_bank_statement_form_1" model="ir.ui.view">
2636+ <field name="name">account.bank.statement.form.banking-1</field>
2637+ <field name="inherit_id" ref="account.view_bank_statement_form" />
2638+ <field name="model">account.bank.statement</field>
2639+ <field name="type">form</field>
2640+ <field name="arch" type="xml">
2641+ <field name="period_id" position="replace"/>
2642+ </field>
2643+ </record>
2644+ <record id="view_banking_bank_statement_form_2" model="ir.ui.view">
2645+ <field name="name">account.bank.statement.form.banking-2</field>
2646+ <field name="inherit_id" ref="account.view_bank_statement_form" />
2647+ <field name="model">account.bank.statement</field>
2648+ <field name="type">form</field>
2649+ <field name="arch" type="xml">
2650+ <xpath expr="/form/notebook/page[@string='Entry encoding']/field/tree/field[@name='type']" position="after">
2651+ <field name="period_id"/>
2652+ </xpath>
2653+ </field>
2654+ </record>
2655+ <record id="view_banking_bank_statement_form_3" model="ir.ui.view">
2656+ <field name="name">account.bank.statement.form.banking-3</field>
2657+ <field name="inherit_id" ref="account.view_bank_statement_form" />
2658+ <field name="model">account.bank.statement</field>
2659+ <field name="type">form</field>
2660+ <field name="arch" type="xml">
2661+ <xpath expr="/form/notebook/page[@string='Entry encoding']/field/form/field[@name='type']" position="after">
2662+ <field name="period_id"/>
2663+ </xpath>
2664+ </field>
2665+ </record>
2666+
2667+ <!-- Reset trigger on button_confirm to the trigger code in this module -->
2668+ <record id="view_banking_bank_statement_form_4" model="ir.ui.view">
2669+ <field name="name">account.bank.statement.form.banking-4</field>
2670+ <field name="inherit_id" ref="account.view_bank_statement_form" />
2671+ <field name="model">account.bank.statement</field>
2672+ <field name="type">form</field>
2673+ <field name="arch" type="xml">
2674+ <button name="button_confirm" position="replace">
2675+ <button name="button_confirm" states="draft" string="Confirm" type="object"/>
2676+ </button>
2677+ </field>
2678+ </record>
2679+
2680+ <!-- Make buttons on payment order sensitive for 'Sent' state -->
2681+ <record id="view_banking_payment_order_form_1" model="ir.ui.view">
2682+ <field name="name">account.payment.order.form.banking-1</field>
2683+ <field name="inherit_id" ref="account_payment.view_payment_order_form" />
2684+ <field name="model">payment.order</field>
2685+ <field name="type">form</field>
2686+ <field name="arch" type="xml">
2687+ <xpath expr="/form/button[@string='Select Invoices to Pay']"
2688+ position="replace">
2689+ <button name="%(account_payment.wizard_populate_payment)s"
2690+ colspan="2" type="action" states="draft,open"
2691+ string="Select Invoices to Pay"
2692+ />
2693+ </xpath>
2694+ </field>
2695+ </record>
2696+
2697+ </data>
2698+</openerp>
2699
2700=== added file 'account_banking/account_banking_workflow.xml'
2701--- account_banking/account_banking_workflow.xml 1970-01-01 00:00:00 +0000
2702+++ account_banking/account_banking_workflow.xml 2010-03-04 01:53:21 +0000
2703@@ -0,0 +1,30 @@
2704+<?xml version="1.0" encoding="utf-8"?>
2705+<!--
2706+ Copyright (C) EduSense BV <http://www.edusense.nl>
2707+ All rights reserved.
2708+ The licence is in the file __terp__.py
2709+-->
2710+<openerp>
2711+ <data>
2712+ <!-- New activity for workflow payment order: sent -->
2713+ <record id="act_sent" model="workflow.activity">
2714+ <field name="name">sent</field>
2715+ <field name="wkf_id" ref="account_payment.wkf_payment_order"/>
2716+ <field name="action">action_sent()
2717+write({'state':'sent'})</field>
2718+ <field name="kind">function</field>
2719+ </record>
2720+ <!-- Add new transition sent -> done -->
2721+ <record id="trans_sent_done" model="workflow.transition">
2722+ <field name="act_from" ref="act_sent"/>
2723+ <field name="act_to" ref="account_payment.act_done"/>
2724+ <field name="signal">done</field>
2725+ </record>
2726+ <!-- Rewrite existing open -> done transition to include 'sent' -->
2727+ <record id="account_payment.trans_open_done" model="workflow.transition">
2728+ <field name="act_from" ref="account_payment.act_open"/>
2729+ <field name="act_to" ref="act_sent"/>
2730+ <field name="signal">sent</field>
2731+ </record>
2732+ </data>
2733+</openerp>
2734
2735=== added directory 'account_banking/i18n'
2736=== added file 'account_banking/i18n/account_banking.pot'
2737--- account_banking/i18n/account_banking.pot 1970-01-01 00:00:00 +0000
2738+++ account_banking/i18n/account_banking.pot 2010-03-04 01:53:21 +0000
2739@@ -0,0 +1,562 @@
2740+# Translation of OpenERP Server.
2741+# This file contains the translation of the following modules:
2742+# * account_banking
2743+#
2744+msgid ""
2745+msgstr ""
2746+"Project-Id-Version: OpenERP Server 5.0.7\n"
2747+"Report-Msgid-Bugs-To: support@openerp.com\n"
2748+"POT-Creation-Date: 2010-01-08 15:30:50+0000\n"
2749+"PO-Revision-Date: 2010-01-08 15:30:50+0000\n"
2750+"Last-Translator: <>\n"
2751+"Language-Team: \n"
2752+"MIME-Version: 1.0\n"
2753+"Content-Type: text/plain; charset=UTF-8\n"
2754+"Content-Transfer-Encoding: \n"
2755+"Plural-Forms: \n"
2756+
2757+#. module: account_banking
2758+#: wizard_view:account_banking.banking_import,import:0
2759+msgid "Results:"
2760+msgstr ""
2761+
2762+#. module: account_banking
2763+#: code:addons/account_banking/wizard/bank_import.py:0
2764+#, python-format
2765+msgid "Number of errors found"
2766+msgstr ""
2767+
2768+#. module: account_banking
2769+#: wizard_view:account_banking.banking_import,init:0
2770+msgid "Select the processing details:"
2771+msgstr ""
2772+
2773+#. module: account_banking
2774+#: constraint:ir.actions.act_window:0
2775+msgid "Invalid model name in the action definition."
2776+msgstr ""
2777+
2778+#. module: account_banking
2779+#: wizard_button:account_banking.banking_import,import,open:0
2780+msgid "_Open Statement"
2781+msgstr ""
2782+
2783+#. module: account_banking
2784+#: field:payment.line,date_done:0
2785+msgid "Date Confirmed"
2786+msgstr ""
2787+
2788+#. module: account_banking
2789+#: wizard_button:account_banking.banking_import,import,end:0
2790+msgid "_Close"
2791+msgstr ""
2792+
2793+#. module: account_banking
2794+#: model:ir.model,name:account_banking.model_account_banking_account_settings
2795+msgid "Default Journal for Bank Account"
2796+msgstr ""
2797+
2798+#. module: account_banking
2799+#: wizard_field:account_banking.banking_import,init,file:0
2800+msgid "Statements File"
2801+msgstr ""
2802+
2803+#. module: account_banking
2804+#: code:addons/account_banking/wizard/banktools.py:0
2805+#, python-format
2806+msgid "More than one bank account was found with the same number %(account_no)s"
2807+msgstr ""
2808+
2809+#. module: account_banking
2810+#: code:addons/account_banking/wizard/bank_import.py:0
2811+#, python-format
2812+msgid "Total number of transactions"
2813+msgstr ""
2814+
2815+#. module: account_banking
2816+#: code:addons/account_banking/account_banking.py:0
2817+#, python-format
2818+msgid "Account move line \"%s\" is not valid"
2819+msgstr ""
2820+
2821+#. module: account_banking
2822+#: help:account.banking.account.settings,default_debit_account_id:0
2823+msgid "The account to use when an unexpected payment is received. This can be needed when a customer pays in advance or when no matching invoice can be found. Mind that you can correct movements before confirming them."
2824+msgstr ""
2825+
2826+#. module: account_banking
2827+#: code:addons/account_banking/wizard/banktools.py:0
2828+#, python-format
2829+msgid "Bank account %(account_no)s was not found in the database"
2830+msgstr ""
2831+
2832+#. module: account_banking
2833+#: code:addons/account_banking/wizard/bank_import.py:0
2834+#, python-format
2835+msgid "Number of transactions skipped due to errors"
2836+msgstr ""
2837+
2838+#. module: account_banking
2839+#: code:addons/account_banking/account_banking.py:0
2840+#, python-format
2841+msgid "The expected balance (%.2f) is different '\n"
2842+" 'than the computed one. (%.2f)"
2843+msgstr ""
2844+
2845+#. module: account_banking
2846+#: code:addons/account_banking/wizard/bank_import.py:0
2847+#, python-format
2848+msgid "Statement for account %(bank_account)s uses different '\n"
2849+" 'currency than the defined bank journal."
2850+msgstr ""
2851+
2852+#. module: account_banking
2853+#: code:addons/account_banking/wizard/bank_import.py:0
2854+#, python-format
2855+msgid "Number of statements skipped due to errors"
2856+msgstr ""
2857+
2858+#. module: account_banking
2859+#: view:account.banking.account.settings:0
2860+msgid "Default Import Settings for Bank Account"
2861+msgstr ""
2862+
2863+#. module: account_banking
2864+#: help:account.banking.account.settings,default_credit_account_id:0
2865+msgid "The account to use when an unexpected payment was signaled. This can happen when a direct debit payment is cancelled by a customer, or when no matching payment can be found. Mind that you can correct movements before confirming them."
2866+msgstr ""
2867+
2868+#. module: account_banking
2869+#: code:addons/account_banking/wizard/bank_import.py:0
2870+#, python-format
2871+msgid "Unable to import parser %(parser)s. Parser class not found."
2872+msgstr ""
2873+
2874+#. module: account_banking
2875+#: selection:payment.line,export_state:0
2876+msgid "Cancelled"
2877+msgstr ""
2878+
2879+#. module: account_banking
2880+#: view:account.banking.imported.file:0
2881+#: field:account.banking.imported.file,statement_ids:0
2882+msgid "Statements"
2883+msgstr ""
2884+
2885+#. module: account_banking
2886+#: field:account.banking.account.settings,default_debit_account_id:0
2887+msgid "Default debit account"
2888+msgstr ""
2889+
2890+#. module: account_banking
2891+#: wizard_button:account_banking.banking_import,init,end:0
2892+msgid "_Cancel"
2893+msgstr ""
2894+
2895+#. module: account_banking
2896+#: selection:payment.line,export_state:0
2897+msgid "Draft"
2898+msgstr ""
2899+
2900+#. module: account_banking
2901+#: field:account.banking.imported.file,date:0
2902+msgid "Import Date"
2903+msgstr ""
2904+
2905+#. module: account_banking
2906+#: selection:payment.line,export_state:0
2907+msgid "Confirmed"
2908+msgstr ""
2909+
2910+#. module: account_banking
2911+#: view:account.banking.account.settings:0
2912+msgid "Default Accounts for Unknown Movements"
2913+msgstr ""
2914+
2915+#. module: account_banking
2916+#: view:account.bank.statement:0
2917+msgid "Confirm"
2918+msgstr ""
2919+
2920+#. module: account_banking
2921+#: field:account.banking.account.settings,default_credit_account_id:0
2922+msgid "Default credit account"
2923+msgstr ""
2924+
2925+#. module: account_banking
2926+#: code:addons/account_banking/wizard/bank_import.py:0
2927+#, python-format
2928+msgid "Statements found for account %(bank_account)s, '\n"
2929+" 'but no default journal was defined."
2930+msgstr ""
2931+
2932+#. module: account_banking
2933+#: field:account.bank.statement.line,international:0
2934+msgid "International Transaction"
2935+msgstr ""
2936+
2937+#. module: account_banking
2938+#: code:addons/account_banking/account_banking.py:0
2939+#, python-format
2940+msgid "Please verify that an account is defined in the journal."
2941+msgstr ""
2942+
2943+#. module: account_banking
2944+#: field:account.bank.statement.line,trans:0
2945+msgid "Bank Transaction ID"
2946+msgstr ""
2947+
2948+#. module: account_banking
2949+#: code:addons/account_banking/wizard/bank_import.py:0
2950+#, python-format
2951+msgid "Statement %(id)s known - skipped"
2952+msgstr ""
2953+
2954+#. module: account_banking
2955+#: selection:payment.line,export_state:0
2956+msgid "Sent"
2957+msgstr ""
2958+
2959+#. module: account_banking
2960+#: code:addons/account_banking/account_banking.py:0
2961+#, python-format
2962+msgid "Error !"
2963+msgstr ""
2964+
2965+#. module: account_banking
2966+#: code:addons/account_banking/account_banking.py:0
2967+#, python-format
2968+msgid "The account entries lines are not in valid state."
2969+msgstr ""
2970+
2971+#. module: account_banking
2972+#: model:ir.actions.act_window,name:account_banking.action_account_banking_journals
2973+#: model:ir.ui.menu,name:account_banking.menu_action_account_banking_bank_journals
2974+msgid "Default Import Settings for Bank Accounts"
2975+msgstr ""
2976+
2977+#. module: account_banking
2978+#: model:ir.actions.wizard,name:account_banking.wizard_account_banking_import_file
2979+#: model:ir.ui.menu,name:account_banking.menu_account_banking_import_wizard
2980+msgid "Import Bank Statements File"
2981+msgstr ""
2982+
2983+#. module: account_banking
2984+#: help:account_banking.banking_import,init,file:0
2985+msgid "The Transactions File to import. Please note that while it is perfectly safe to reload the same file multiple times or to load in timeframe overlapping statements files, there are formats that may introduce different sequencing, which may create double entries.\n"
2986+"\n"
2987+"To stay on the safe side, always load bank statements files using the same format."
2988+msgstr ""
2989+
2990+#. module: account_banking
2991+#: constraint:ir.ui.view:0
2992+msgid "Invalid XML for View Architecture!"
2993+msgstr ""
2994+
2995+#. module: account_banking
2996+#: view:account.banking.imported.file:0
2997+msgid "Imported Bank Statements"
2998+msgstr ""
2999+
3000+#. module: account_banking
3001+#: wizard_view:account_banking.banking_import,import:0
3002+#: wizard_view:account_banking.banking_import,init:0
3003+msgid "Import Bank Transactions File"
3004+msgstr ""
3005+
3006+#. module: account_banking
3007+#: code:addons/account_banking/wizard/banktools.py:0
3008+#, python-format
3009+msgid "Account %(account_no)s is not owned by %(partner)s"
3010+msgstr ""
3011+
3012+#. module: account_banking
3013+#: wizard_button:account_banking.banking_import,init,import:0
3014+msgid "_Ok"
3015+msgstr ""
3016+
3017+#. module: account_banking
3018+#: code:addons/account_banking/wizard/banktools.py:0
3019+#, python-format
3020+msgid "More then one possible match found for partner with name %(name)s"
3021+msgstr ""
3022+
3023+#. module: account_banking
3024+#: field:account.banking.imported.file,state:0
3025+#: field:payment.line,export_state:0
3026+msgid "State"
3027+msgstr ""
3028+
3029+#. module: account_banking
3030+#: code:addons/account_banking/wizard/bank_import.py:0
3031+#, python-format
3032+msgid "ERROR!"
3033+msgstr ""
3034+
3035+#. module: account_banking
3036+#: code:addons/account_banking/wizard/banktools.py:0
3037+#, python-format
3038+msgid "No suitable period found for date %(date)s"
3039+msgstr ""
3040+
3041+#. module: account_banking
3042+#: code:addons/account_banking/wizard/banktools.py:0
3043+#, python-format
3044+msgid "Multiple overlapping periods for date %(date)s"
3045+msgstr ""
3046+
3047+#. module: account_banking
3048+#: field:account.banking.account.settings,company_id:0
3049+#: field:account.banking.imported.file,company_id:0
3050+#: wizard_field:account_banking.banking_import,init,company:0
3051+msgid "Company"
3052+msgstr ""
3053+
3054+#. module: account_banking
3055+#: wizard_field:account_banking.banking_import,import,log:0
3056+msgid "Log"
3057+msgstr ""
3058+
3059+#. module: account_banking
3060+#: field:account.banking.imported.file,file:0
3061+msgid "Raw Data"
3062+msgstr ""
3063+
3064+#. module: account_banking
3065+#: code:addons/account_banking/account_banking.py:0
3066+#, python-format
3067+msgid "Configration Error !"
3068+msgstr ""
3069+
3070+#. module: account_banking
3071+#: model:ir.module.module,description:account_banking.module_meta_information
3072+msgid "\n"
3073+" Module to do banking.\n"
3074+"\n"
3075+" This modules tries to combine all current banking import and export\n"
3076+" schemes. Rationale for this is that it is quite common to have foreign\n"
3077+" bank account numbers next to national bank account numbers. The current\n"
3078+" approach, which hides the national banking interface schemes in the\n"
3079+" l10n_xxx modules, makes it very difficult to use these simultanious.\n"
3080+" A more banking oriented approach seems more logical and cleaner.\n"
3081+"\n"
3082+" Changes to default OpenERP:\n"
3083+"\n"
3084+" * Puts focus on the real life messaging with banks:\n"
3085+" + Bank statement lines upgraded to independent bank transactions.\n"
3086+" + Banking statements have no special accountancy meaning, they're just\n"
3087+" message envelopes for a number of bank transactions.\n"
3088+" + Bank statements can be either encoded by hand to reflect the document\n"
3089+" version of Bank Statements, or created as an optional side effect of\n"
3090+" importing Bank Transactions.\n"
3091+"\n"
3092+" * Preparations for SEPA:\n"
3093+" + IBAN accounts are the standard in the SEPA countries\n"
3094+" + local accounts are derived from SEPA (excluding Turkey) but are\n"
3095+" considered to be identical to the corresponding SEPA account.\n"
3096+" + Banks are identified with either Country + Bank code + Branch code or BIC\n"
3097+" + Each bank can have its own pace in introducing SEPA into their\n"
3098+" communication with their customers.\n"
3099+" + National online databases can be used to convert BBAN's to IBAN's.\n"
3100+"\n"
3101+" * Adds dropin extensible import facility for bank communication in:\n"
3102+" + MultiBank (NL) format transaction files,\n"
3103+" - (todo) MT940 (Swift) format transaction files,\n"
3104+" - (todo) CODA (BE) format transaction files,\n"
3105+" - (wish) SEPA Credits (ISO 200022) messages,\n"
3106+"\n"
3107+" * Extends payments for digital banking:\n"
3108+" + Adapted workflow in payments to reflect banking operations\n"
3109+" + Relies on account_payment mechanics to extend with export generators.\n"
3110+" - ClieOp3 (NL) payment and direct debit orders files available as\n"
3111+" account_banking_nl_clieop\n"
3112+" - (wish) BTL91 (NL) payment orders files (no format description available),\n"
3113+" - (wish) SEPA Direct Debits (ISO 200022) messages\n"
3114+"\n"
3115+" * Additional features for the import/export mechanism:\n"
3116+" + Automatic matching and creation of bank accounts, banks and partners,\n"
3117+" during import of statements.\n"
3118+" + Automatic matching with invoices and payments.\n"
3119+" + Sound import mechanism, allowing multiple imports of the same\n"
3120+" transactions repeated over multiple files.\n"
3121+" + Journal configuration per bank account.\n"
3122+" + Business logic and format parsing strictly separated to ease the\n"
3123+" development of new parsers.\n"
3124+" + No special configuration needed for the parsers, new parsers are\n"
3125+" recognized and made available at server (re)start.\n"
3126+" "
3127+msgstr ""
3128+
3129+#. module: account_banking
3130+#: model:ir.actions.act_window,name:account_banking.act_account_payment_account_bank_statement
3131+msgid "Bank Statements File"
3132+msgstr ""
3133+
3134+#. module: account_banking
3135+#: code:addons/account_banking/parsers/models.py:0
3136+#, python-format
3137+msgid "This is a stub. Please implement your own."
3138+msgstr ""
3139+
3140+#. module: account_banking
3141+#: view:account.banking.imported.file:0
3142+#: model:ir.actions.act_window,name:account_banking.action_account_banking_imported_files
3143+#: model:ir.ui.menu,name:account_banking.menu_action_account_banking_imported_files
3144+msgid "Imported Bank Statements Files"
3145+msgstr ""
3146+
3147+#. module: account_banking
3148+#: field:account.bank.statement,banking_id:0
3149+msgid "Imported File"
3150+msgstr ""
3151+
3152+#. module: account_banking
3153+#: view:account.banking.imported.file:0
3154+#: field:account.banking.imported.file,log:0
3155+msgid "Import Log"
3156+msgstr ""
3157+
3158+#. module: account_banking
3159+#: code:addons/account_banking/wizard/bank_import.py:0
3160+#, python-format
3161+msgid "The imported statements appear to be invalid! Check your file."
3162+msgstr ""
3163+
3164+#. module: account_banking
3165+#: code:addons/account_banking/wizard/bank_import.py:0
3166+#, python-format
3167+msgid "Number of statements loaded"
3168+msgstr ""
3169+
3170+#. module: account_banking
3171+#: model:ir.ui.menu,name:account_banking.menu_finance_banking_actions
3172+#: model:ir.ui.menu,name:account_banking.menu_finance_banking_settings
3173+msgid "Banking"
3174+msgstr ""
3175+
3176+#. module: account_banking
3177+#: selection:account.banking.imported.file,state:0
3178+msgid "Error"
3179+msgstr ""
3180+
3181+#. module: account_banking
3182+#: code:addons/account_banking/account_banking.py:0
3183+#, python-format
3184+msgid "Unable to reconcile entry \"%s\": %.2f"
3185+msgstr ""
3186+
3187+#. module: account_banking
3188+#: view:account.banking.imported.file:0
3189+msgid "Import Details"
3190+msgstr ""
3191+
3192+#. module: account_banking
3193+#: field:account.bank.statement.line,period_id:0
3194+msgid "Period"
3195+msgstr ""
3196+
3197+#. module: account_banking
3198+#: selection:payment.line,export_state:0
3199+msgid "Done"
3200+msgstr ""
3201+
3202+#. module: account_banking
3203+#: view:payment.order:0
3204+msgid "Select Invoices to Pay"
3205+msgstr ""
3206+
3207+#. module: account_banking
3208+#: field:account.banking.imported.file,user_id:0
3209+msgid "Responsible User"
3210+msgstr ""
3211+
3212+#. module: account_banking
3213+#: code:addons/account_banking/account_banking.py:0
3214+#, python-format
3215+msgid "The statement balance is incorrect !\n"
3216+msgstr ""
3217+
3218+#. module: account_banking
3219+#: constraint:ir.model:0
3220+msgid "The Object name must start with x_ and not contain any special character !"
3221+msgstr ""
3222+
3223+#. module: account_banking
3224+#: selection:account.banking.imported.file,state:0
3225+msgid "Unfinished"
3226+msgstr ""
3227+
3228+#. module: account_banking
3229+#: code:addons/account_banking/wizard/bank_import.py:0
3230+#, python-format
3231+msgid "Statements found for unknown account %(bank_account)s"
3232+msgstr ""
3233+
3234+#. module: account_banking
3235+#: model:ir.module.module,shortdesc:account_banking.module_meta_information
3236+msgid "Account Banking"
3237+msgstr ""
3238+
3239+#. module: account_banking
3240+#: code:addons/account_banking/wizard/bank_import.py:0
3241+#, python-format
3242+msgid "Total number of statements"
3243+msgstr ""
3244+
3245+#. module: account_banking
3246+#: field:account.banking.imported.file,format:0
3247+#: wizard_field:account_banking.banking_import,init,parser:0
3248+msgid "File Format"
3249+msgstr ""
3250+
3251+#. module: account_banking
3252+#: field:account.banking.account.settings,journal_id:0
3253+msgid "Journal"
3254+msgstr ""
3255+
3256+#. module: account_banking
3257+#: selection:account.banking.imported.file,state:0
3258+msgid "Finished"
3259+msgstr ""
3260+
3261+#. module: account_banking
3262+#: code:addons/account_banking/wizard/banktools.py:0
3263+#, python-format
3264+msgid "No suitable fiscal year found for company %(company_name)s"
3265+msgstr ""
3266+
3267+#. module: account_banking
3268+#: view:account.banking.account.settings:0
3269+msgid "Bank Account Details"
3270+msgstr ""
3271+
3272+#. module: account_banking
3273+#: code:addons/account_banking/wizard/bank_import.py:0
3274+#, python-format
3275+msgid "Unable to link transaction %(trans)s to invoice: '\n"
3276+" '%(no_candidates)s candidates found; can\'t choose."
3277+msgstr ""
3278+
3279+#. module: account_banking
3280+#: field:account.bank.statement.line,partner_bank_id:0
3281+#: field:account.banking.account.settings,partner_bank_id:0
3282+msgid "Bank Account"
3283+msgstr ""
3284+
3285+#. module: account_banking
3286+#: code:addons/account_banking/wizard/bank_import.py:0
3287+#, python-format
3288+msgid "Number of transactions loaded"
3289+msgstr ""
3290+
3291+#. module: account_banking
3292+#: code:addons/account_banking/wizard/banktools.py:0
3293+#, python-format
3294+msgid "Multiple overlapping fiscal years found for date %(date)s"
3295+msgstr ""
3296+
3297+#. module: account_banking
3298+#: model:ir.model,name:account_banking.model_account_banking_imported_file
3299+msgid "Imported Bank Statements File"
3300+msgstr ""
3301+
3302
3303=== added file 'account_banking/i18n/en_US.po'
3304--- account_banking/i18n/en_US.po 1970-01-01 00:00:00 +0000
3305+++ account_banking/i18n/en_US.po 2010-03-04 01:53:21 +0000
3306@@ -0,0 +1,562 @@
3307+# Translation of OpenERP Server.
3308+# This file contains the translation of the following modules:
3309+# * account_banking
3310+#
3311+msgid ""
3312+msgstr ""
3313+"Project-Id-Version: OpenERP Server 5.0.7\n"
3314+"Report-Msgid-Bugs-To: support@openerp.com\n"
3315+"POT-Creation-Date: 2010-01-08 15:30:50+0000\n"
3316+"PO-Revision-Date: 2010-01-08 15:30:50+0000\n"
3317+"Last-Translator: <>\n"
3318+"Language-Team: \n"
3319+"MIME-Version: 1.0\n"
3320+"Content-Type: text/plain; charset=UTF-8\n"
3321+"Content-Transfer-Encoding: \n"
3322+"Plural-Forms: \n"
3323+
3324+#. module: account_banking
3325+#: wizard_view:account_banking.banking_import,import:0
3326+msgid "Results:"
3327+msgstr ""
3328+
3329+#. module: account_banking
3330+#: code:addons/account_banking/wizard/bank_import.py:0
3331+#, python-format
3332+msgid "Number of errors found"
3333+msgstr ""
3334+
3335+#. module: account_banking
3336+#: wizard_view:account_banking.banking_import,init:0
3337+msgid "Select the processing details:"
3338+msgstr ""
3339+
3340+#. module: account_banking
3341+#: constraint:ir.actions.act_window:0
3342+msgid "Invalid model name in the action definition."
3343+msgstr ""
3344+
3345+#. module: account_banking
3346+#: wizard_button:account_banking.banking_import,import,open:0
3347+msgid "_Open Statement"
3348+msgstr ""
3349+
3350+#. module: account_banking
3351+#: field:payment.line,date_done:0
3352+msgid "Date Confirmed"
3353+msgstr ""
3354+
3355+#. module: account_banking
3356+#: wizard_button:account_banking.banking_import,import,end:0
3357+msgid "_Close"
3358+msgstr ""
3359+
3360+#. module: account_banking
3361+#: model:ir.model,name:account_banking.model_account_banking_account_settings
3362+msgid "Default Journal for Bank Account"
3363+msgstr ""
3364+
3365+#. module: account_banking
3366+#: wizard_field:account_banking.banking_import,init,file:0
3367+msgid "Statements File"
3368+msgstr ""
3369+
3370+#. module: account_banking
3371+#: code:addons/account_banking/wizard/banktools.py:0
3372+#, python-format
3373+msgid "More than one bank account was found with the same number %(account_no)s"
3374+msgstr ""
3375+
3376+#. module: account_banking
3377+#: code:addons/account_banking/wizard/bank_import.py:0
3378+#, python-format
3379+msgid "Total number of transactions"
3380+msgstr ""
3381+
3382+#. module: account_banking
3383+#: code:addons/account_banking/account_banking.py:0
3384+#, python-format
3385+msgid "Account move line \"%s\" is not valid"
3386+msgstr ""
3387+
3388+#. module: account_banking
3389+#: help:account.banking.account.settings,default_debit_account_id:0
3390+msgid "The account to use when an unexpected payment is received. This can be needed when a customer pays in advance or when no matching invoice can be found. Mind that you can correct movements before confirming them."
3391+msgstr ""
3392+
3393+#. module: account_banking
3394+#: code:addons/account_banking/wizard/banktools.py:0
3395+#, python-format
3396+msgid "Bank account %(account_no)s was not found in the database"
3397+msgstr ""
3398+
3399+#. module: account_banking
3400+#: code:addons/account_banking/wizard/bank_import.py:0
3401+#, python-format
3402+msgid "Number of transactions skipped due to errors"
3403+msgstr ""
3404+
3405+#. module: account_banking
3406+#: code:addons/account_banking/account_banking.py:0
3407+#, python-format
3408+msgid "The expected balance (%.2f) is different '\n"
3409+" 'than the computed one. (%.2f)"
3410+msgstr ""
3411+
3412+#. module: account_banking
3413+#: code:addons/account_banking/wizard/bank_import.py:0
3414+#, python-format
3415+msgid "Statement for account %(bank_account)s uses different '\n"
3416+" 'currency than the defined bank journal."
3417+msgstr ""
3418+
3419+#. module: account_banking
3420+#: code:addons/account_banking/wizard/bank_import.py:0
3421+#, python-format
3422+msgid "Number of statements skipped due to errors"
3423+msgstr ""
3424+
3425+#. module: account_banking
3426+#: view:account.banking.account.settings:0
3427+msgid "Default Import Settings for Bank Account"
3428+msgstr ""
3429+
3430+#. module: account_banking
3431+#: help:account.banking.account.settings,default_credit_account_id:0
3432+msgid "The account to use when an unexpected payment was signaled. This can happen when a direct debit payment is cancelled by a customer, or when no matching payment can be found. Mind that you can correct movements before confirming them."
3433+msgstr ""
3434+
3435+#. module: account_banking
3436+#: code:addons/account_banking/wizard/bank_import.py:0
3437+#, python-format
3438+msgid "Unable to import parser %(parser)s. Parser class not found."
3439+msgstr ""
3440+
3441+#. module: account_banking
3442+#: selection:payment.line,export_state:0
3443+msgid "Cancelled"
3444+msgstr ""
3445+
3446+#. module: account_banking
3447+#: view:account.banking.imported.file:0
3448+#: field:account.banking.imported.file,statement_ids:0
3449+msgid "Statements"
3450+msgstr ""
3451+
3452+#. module: account_banking
3453+#: field:account.banking.account.settings,default_debit_account_id:0
3454+msgid "Default debit account"
3455+msgstr ""
3456+
3457+#. module: account_banking
3458+#: wizard_button:account_banking.banking_import,init,end:0
3459+msgid "_Cancel"
3460+msgstr ""
3461+
3462+#. module: account_banking
3463+#: selection:payment.line,export_state:0
3464+msgid "Draft"
3465+msgstr ""
3466+
3467+#. module: account_banking
3468+#: field:account.banking.imported.file,date:0
3469+msgid "Import Date"
3470+msgstr ""
3471+
3472+#. module: account_banking
3473+#: selection:payment.line,export_state:0
3474+msgid "Confirmed"
3475+msgstr ""
3476+
3477+#. module: account_banking
3478+#: view:account.banking.account.settings:0
3479+msgid "Default Accounts for Unknown Movements"
3480+msgstr ""
3481+
3482+#. module: account_banking
3483+#: view:account.bank.statement:0
3484+msgid "Confirm"
3485+msgstr ""
3486+
3487+#. module: account_banking
3488+#: field:account.banking.account.settings,default_credit_account_id:0
3489+msgid "Default credit account"
3490+msgstr ""
3491+
3492+#. module: account_banking
3493+#: code:addons/account_banking/wizard/bank_import.py:0
3494+#, python-format
3495+msgid "Statements found for account %(bank_account)s, '\n"
3496+" 'but no default journal was defined."
3497+msgstr ""
3498+
3499+#. module: account_banking
3500+#: field:account.bank.statement.line,international:0
3501+msgid "International Transaction"
3502+msgstr ""
3503+
3504+#. module: account_banking
3505+#: code:addons/account_banking/account_banking.py:0
3506+#, python-format
3507+msgid "Please verify that an account is defined in the journal."
3508+msgstr ""
3509+
3510+#. module: account_banking
3511+#: field:account.bank.statement.line,trans:0
3512+msgid "Bank Transaction ID"
3513+msgstr ""
3514+
3515+#. module: account_banking
3516+#: code:addons/account_banking/wizard/bank_import.py:0
3517+#, python-format
3518+msgid "Statement %(id)s known - skipped"
3519+msgstr ""
3520+
3521+#. module: account_banking
3522+#: selection:payment.line,export_state:0
3523+msgid "Sent"
3524+msgstr ""
3525+
3526+#. module: account_banking
3527+#: code:addons/account_banking/account_banking.py:0
3528+#, python-format
3529+msgid "Error !"
3530+msgstr ""
3531+
3532+#. module: account_banking
3533+#: code:addons/account_banking/account_banking.py:0
3534+#, python-format
3535+msgid "The account entries lines are not in valid state."
3536+msgstr ""
3537+
3538+#. module: account_banking
3539+#: model:ir.actions.act_window,name:account_banking.action_account_banking_journals
3540+#: model:ir.ui.menu,name:account_banking.menu_action_account_banking_bank_journals
3541+msgid "Default Import Settings for Bank Accounts"
3542+msgstr ""
3543+
3544+#. module: account_banking
3545+#: model:ir.actions.wizard,name:account_banking.wizard_account_banking_import_file
3546+#: model:ir.ui.menu,name:account_banking.menu_account_banking_import_wizard
3547+msgid "Import Bank Statements File"
3548+msgstr ""
3549+
3550+#. module: account_banking
3551+#: help:account_banking.banking_import,init,file:0
3552+msgid "The Transactions File to import. Please note that while it is perfectly safe to reload the same file multiple times or to load in timeframe overlapping statements files, there are formats that may introduce different sequencing, which may create double entries.\n"
3553+"\n"
3554+"To stay on the safe side, always load bank statements files using the same format."
3555+msgstr ""
3556+
3557+#. module: account_banking
3558+#: constraint:ir.ui.view:0
3559+msgid "Invalid XML for View Architecture!"
3560+msgstr ""
3561+
3562+#. module: account_banking
3563+#: view:account.banking.imported.file:0
3564+msgid "Imported Bank Statements"
3565+msgstr ""
3566+
3567+#. module: account_banking
3568+#: wizard_view:account_banking.banking_import,import:0
3569+#: wizard_view:account_banking.banking_import,init:0
3570+msgid "Import Bank Transactions File"
3571+msgstr ""
3572+
3573+#. module: account_banking
3574+#: code:addons/account_banking/wizard/banktools.py:0
3575+#, python-format
3576+msgid "Account %(account_no)s is not owned by %(partner)s"
3577+msgstr ""
3578+
3579+#. module: account_banking
3580+#: wizard_button:account_banking.banking_import,init,import:0
3581+msgid "_Ok"
3582+msgstr ""
3583+
3584+#. module: account_banking
3585+#: code:addons/account_banking/wizard/banktools.py:0
3586+#, python-format
3587+msgid "More then one possible match found for partner with name %(name)s"
3588+msgstr ""
3589+
3590+#. module: account_banking
3591+#: field:account.banking.imported.file,state:0
3592+#: field:payment.line,export_state:0
3593+msgid "State"
3594+msgstr ""
3595+
3596+#. module: account_banking
3597+#: code:addons/account_banking/wizard/bank_import.py:0
3598+#, python-format
3599+msgid "ERROR!"
3600+msgstr ""
3601+
3602+#. module: account_banking
3603+#: code:addons/account_banking/wizard/banktools.py:0
3604+#, python-format
3605+msgid "No suitable period found for date %(date)s"
3606+msgstr ""
3607+
3608+#. module: account_banking
3609+#: code:addons/account_banking/wizard/banktools.py:0
3610+#, python-format
3611+msgid "Multiple overlapping periods for date %(date)s"
3612+msgstr ""
3613+
3614+#. module: account_banking
3615+#: field:account.banking.account.settings,company_id:0
3616+#: field:account.banking.imported.file,company_id:0
3617+#: wizard_field:account_banking.banking_import,init,company:0
3618+msgid "Company"
3619+msgstr ""
3620+
3621+#. module: account_banking
3622+#: wizard_field:account_banking.banking_import,import,log:0
3623+msgid "Log"
3624+msgstr ""
3625+
3626+#. module: account_banking
3627+#: field:account.banking.imported.file,file:0
3628+msgid "Raw Data"
3629+msgstr ""
3630+
3631+#. module: account_banking
3632+#: code:addons/account_banking/account_banking.py:0
3633+#, python-format
3634+msgid "Configration Error !"
3635+msgstr ""
3636+
3637+#. module: account_banking
3638+#: model:ir.module.module,description:account_banking.module_meta_information
3639+msgid "\n"
3640+" Module to do banking.\n"
3641+"\n"
3642+" This modules tries to combine all current banking import and export\n"
3643+" schemes. Rationale for this is that it is quite common to have foreign\n"
3644+" bank account numbers next to national bank account numbers. The current\n"
3645+" approach, which hides the national banking interface schemes in the\n"
3646+" l10n_xxx modules, makes it very difficult to use these simultanious.\n"
3647+" A more banking oriented approach seems more logical and cleaner.\n"
3648+"\n"
3649+" Changes to default OpenERP:\n"
3650+"\n"
3651+" * Puts focus on the real life messaging with banks:\n"
3652+" + Bank statement lines upgraded to independent bank transactions.\n"
3653+" + Banking statements have no special accountancy meaning, they're just\n"
3654+" message envelopes for a number of bank transactions.\n"
3655+" + Bank statements can be either encoded by hand to reflect the document\n"
3656+" version of Bank Statements, or created as an optional side effect of\n"
3657+" importing Bank Transactions.\n"
3658+"\n"
3659+" * Preparations for SEPA:\n"
3660+" + IBAN accounts are the standard in the SEPA countries\n"
3661+" + local accounts are derived from SEPA (excluding Turkey) but are\n"
3662+" considered to be identical to the corresponding SEPA account.\n"
3663+" + Banks are identified with either Country + Bank code + Branch code or BIC\n"
3664+" + Each bank can have its own pace in introducing SEPA into their\n"
3665+" communication with their customers.\n"
3666+" + National online databases can be used to convert BBAN's to IBAN's.\n"
3667+"\n"
3668+" * Adds dropin extensible import facility for bank communication in:\n"
3669+" + MultiBank (NL) format transaction files,\n"
3670+" - (todo) MT940 (Swift) format transaction files,\n"
3671+" - (todo) CODA (BE) format transaction files,\n"
3672+" - (wish) SEPA Credits (ISO 200022) messages,\n"
3673+"\n"
3674+" * Extends payments for digital banking:\n"
3675+" + Adapted workflow in payments to reflect banking operations\n"
3676+" + Relies on account_payment mechanics to extend with export generators.\n"
3677+" - ClieOp3 (NL) payment and direct debit orders files available as\n"
3678+" account_banking_nl_clieop\n"
3679+" - (wish) BTL91 (NL) payment orders files (no format description available),\n"
3680+" - (wish) SEPA Direct Debits (ISO 200022) messages\n"
3681+"\n"
3682+" * Additional features for the import/export mechanism:\n"
3683+" + Automatic matching and creation of bank accounts, banks and partners,\n"
3684+" during import of statements.\n"
3685+" + Automatic matching with invoices and payments.\n"
3686+" + Sound import mechanism, allowing multiple imports of the same\n"
3687+" transactions repeated over multiple files.\n"
3688+" + Journal configuration per bank account.\n"
3689+" + Business logic and format parsing strictly separated to ease the\n"
3690+" development of new parsers.\n"
3691+" + No special configuration needed for the parsers, new parsers are\n"
3692+" recognized and made available at server (re)start.\n"
3693+" "
3694+msgstr ""
3695+
3696+#. module: account_banking
3697+#: model:ir.actions.act_window,name:account_banking.act_account_payment_account_bank_statement
3698+msgid "Bank Statements File"
3699+msgstr ""
3700+
3701+#. module: account_banking
3702+#: code:addons/account_banking/parsers/models.py:0
3703+#, python-format
3704+msgid "This is a stub. Please implement your own."
3705+msgstr ""
3706+
3707+#. module: account_banking
3708+#: view:account.banking.imported.file:0
3709+#: model:ir.actions.act_window,name:account_banking.action_account_banking_imported_files
3710+#: model:ir.ui.menu,name:account_banking.menu_action_account_banking_imported_files
3711+msgid "Imported Bank Statements Files"
3712+msgstr ""
3713+
3714+#. module: account_banking
3715+#: field:account.bank.statement,banking_id:0
3716+msgid "Imported File"
3717+msgstr ""
3718+
3719+#. module: account_banking
3720+#: view:account.banking.imported.file:0
3721+#: field:account.banking.imported.file,log:0
3722+msgid "Import Log"
3723+msgstr ""
3724+
3725+#. module: account_banking
3726+#: code:addons/account_banking/wizard/bank_import.py:0
3727+#, python-format
3728+msgid "The imported statements appear to be invalid! Check your file."
3729+msgstr ""
3730+
3731+#. module: account_banking
3732+#: code:addons/account_banking/wizard/bank_import.py:0
3733+#, python-format
3734+msgid "Number of statements loaded"
3735+msgstr ""
3736+
3737+#. module: account_banking
3738+#: model:ir.ui.menu,name:account_banking.menu_finance_banking_actions
3739+#: model:ir.ui.menu,name:account_banking.menu_finance_banking_settings
3740+msgid "Banking"
3741+msgstr ""
3742+
3743+#. module: account_banking
3744+#: selection:account.banking.imported.file,state:0
3745+msgid "Error"
3746+msgstr ""
3747+
3748+#. module: account_banking
3749+#: code:addons/account_banking/account_banking.py:0
3750+#, python-format
3751+msgid "Unable to reconcile entry \"%s\": %.2f"
3752+msgstr ""
3753+
3754+#. module: account_banking
3755+#: view:account.banking.imported.file:0
3756+msgid "Import Details"
3757+msgstr ""
3758+
3759+#. module: account_banking
3760+#: field:account.bank.statement.line,period_id:0
3761+msgid "Period"
3762+msgstr ""
3763+
3764+#. module: account_banking
3765+#: selection:payment.line,export_state:0
3766+msgid "Done"
3767+msgstr ""
3768+
3769+#. module: account_banking
3770+#: view:payment.order:0
3771+msgid "Select Invoices to Pay"
3772+msgstr ""
3773+
3774+#. module: account_banking
3775+#: field:account.banking.imported.file,user_id:0
3776+msgid "Responsible User"
3777+msgstr ""
3778+
3779+#. module: account_banking
3780+#: code:addons/account_banking/account_banking.py:0
3781+#, python-format
3782+msgid "The statement balance is incorrect !\n"
3783+msgstr ""
3784+
3785+#. module: account_banking
3786+#: constraint:ir.model:0
3787+msgid "The Object name must start with x_ and not contain any special character !"
3788+msgstr ""
3789+
3790+#. module: account_banking
3791+#: selection:account.banking.imported.file,state:0
3792+msgid "Unfinished"
3793+msgstr ""
3794+
3795+#. module: account_banking
3796+#: code:addons/account_banking/wizard/bank_import.py:0
3797+#, python-format
3798+msgid "Statements found for unknown account %(bank_account)s"
3799+msgstr ""
3800+
3801+#. module: account_banking
3802+#: model:ir.module.module,shortdesc:account_banking.module_meta_information
3803+msgid "Account Banking"
3804+msgstr ""
3805+
3806+#. module: account_banking
3807+#: code:addons/account_banking/wizard/bank_import.py:0
3808+#, python-format
3809+msgid "Total number of statements"
3810+msgstr ""
3811+
3812+#. module: account_banking
3813+#: field:account.banking.imported.file,format:0
3814+#: wizard_field:account_banking.banking_import,init,parser:0
3815+msgid "File Format"
3816+msgstr ""
3817+
3818+#. module: account_banking
3819+#: field:account.banking.account.settings,journal_id:0
3820+msgid "Journal"
3821+msgstr ""
3822+
3823+#. module: account_banking
3824+#: selection:account.banking.imported.file,state:0
3825+msgid "Finished"
3826+msgstr ""
3827+
3828+#. module: account_banking
3829+#: code:addons/account_banking/wizard/banktools.py:0
3830+#, python-format
3831+msgid "No suitable fiscal year found for company %(company_name)s"
3832+msgstr ""
3833+
3834+#. module: account_banking
3835+#: view:account.banking.account.settings:0
3836+msgid "Bank Account Details"
3837+msgstr ""
3838+
3839+#. module: account_banking
3840+#: code:addons/account_banking/wizard/bank_import.py:0
3841+#, python-format
3842+msgid "Unable to link transaction %(trans)s to invoice: '\n"
3843+" '%(no_candidates)s candidates found; can\'t choose."
3844+msgstr ""
3845+
3846+#. module: account_banking
3847+#: field:account.bank.statement.line,partner_bank_id:0
3848+#: field:account.banking.account.settings,partner_bank_id:0
3849+msgid "Bank Account"
3850+msgstr ""
3851+
3852+#. module: account_banking
3853+#: code:addons/account_banking/wizard/bank_import.py:0
3854+#, python-format
3855+msgid "Number of transactions loaded"
3856+msgstr ""
3857+
3858+#. module: account_banking
3859+#: code:addons/account_banking/wizard/banktools.py:0
3860+#, python-format
3861+msgid "Multiple overlapping fiscal years found for date %(date)s"
3862+msgstr ""
3863+
3864+#. module: account_banking
3865+#: model:ir.model,name:account_banking.model_account_banking_imported_file
3866+msgid "Imported Bank Statements File"
3867+msgstr ""
3868+
3869
3870=== added file 'account_banking/i18n/nl_NL.po'
3871--- account_banking/i18n/nl_NL.po 1970-01-01 00:00:00 +0000
3872+++ account_banking/i18n/nl_NL.po 2010-03-04 01:53:21 +0000
3873@@ -0,0 +1,607 @@
3874+# Translation of OpenERP Server.
3875+# This file contains the translation of the following modules:
3876+# * account_banking
3877+#
3878+msgid ""
3879+msgstr ""
3880+"Project-Id-Version: OpenERP Server 5.0.7\n"
3881+"Report-Msgid-Bugs-To: support@openerp.com\n"
3882+"POT-Creation-Date: 2010-01-08 15:18:44+0000\n"
3883+"PO-Revision-Date: 2010-01-08 15:18:44+0000\n"
3884+"Last-Translator: <>\n"
3885+"Language-Team: \n"
3886+"MIME-Version: 1.0\n"
3887+"Content-Type: text/plain; charset=UTF-8\n"
3888+"Content-Transfer-Encoding: \n"
3889+"Plural-Forms: \n"
3890+
3891+#. module: account_banking
3892+#: wizard_view:account_banking.banking_import,import:0
3893+msgid "Results:"
3894+msgstr "Resultaat:"
3895+
3896+#. module: account_banking
3897+#: code:addons/account_banking/wizard/bank_import.py:0
3898+#, python-format
3899+msgid "Number of errors found"
3900+msgstr "Aantal gevonden fouten"
3901+
3902+#. module: account_banking
3903+#: wizard_view:account_banking.banking_import,init:0
3904+msgid "Select the processing details:"
3905+msgstr "Kies de verwerkings-details:"
3906+
3907+#. module: account_banking
3908+#: constraint:ir.actions.act_window:0
3909+msgid "Invalid model name in the action definition."
3910+msgstr "Ongeldige naam in actie-definitie."
3911+
3912+#. module: account_banking
3913+#: wizard_button:account_banking.banking_import,import,open:0
3914+msgid "_Open Statement"
3915+msgstr "_Open bankafschriften"
3916+
3917+#. module: account_banking
3918+#: field:payment.line,date_done:0
3919+msgid "Date Confirmed"
3920+msgstr "Bevestigingsdatum"
3921+
3922+#. module: account_banking
3923+#: wizard_button:account_banking.banking_import,import,end:0
3924+msgid "_Close"
3925+msgstr "_Sluit"
3926+
3927+#. module: account_banking
3928+#: model:ir.model,name:account_banking.model_account_banking_account_settings
3929+msgid "Default Journal for Bank Account"
3930+msgstr "Standaard dagboek voor bankrekening"
3931+
3932+#. module: account_banking
3933+#: wizard_field:account_banking.banking_import,init,file:0
3934+msgid "Statements File"
3935+msgstr "Transactiebestand"
3936+
3937+#. module: account_banking
3938+#: code:addons/account_banking/wizard/banktools.py:0
3939+#, python-format
3940+msgid "More than one bank account was found with the same number %(account_no)s"
3941+msgstr "Meer dan één bankrekening gevonden met hetzelfde rekeningnummer %(account_no)s"
3942+
3943+#. module: account_banking
3944+#: code:addons/account_banking/wizard/bank_import.py:0
3945+#, python-format
3946+msgid "Total number of transactions"
3947+msgstr "Totaal aantal transacties"
3948+
3949+#. module: account_banking
3950+#: code:addons/account_banking/account_banking.py:0
3951+#, python-format
3952+msgid "Account move line \"%s\" is not valid"
3953+msgstr "Boekingsregel \"%s\" is onjuist."
3954+
3955+#. module: account_banking
3956+#: help:account.banking.account.settings,default_debit_account_id:0
3957+msgid "The account to use when an unexpected payment is received. This can be needed when a customer pays in advance or when no matching invoice can be found. Mind that you can correct movements before confirming them."
3958+msgstr "De rekening waarop geboekt moet worden bij onverwachte betalingen. Dit kan nodig zijn als een klant vooruit betaalt of wanneer er geen overeenkomende factuur gevonden kan worden. Merk op dat u altijd boekingen kunt corrigeren voordat u deze bevestigt."
3959+
3960+#. module: account_banking
3961+#: code:addons/account_banking/wizard/banktools.py:0
3962+#, python-format
3963+msgid "Bank account %(account_no)s was not found in the database"
3964+msgstr "Bankrekening %(account)s niet gevonden in de database"
3965+
3966+#. module: account_banking
3967+#: code:addons/account_banking/wizard/bank_import.py:0
3968+#, python-format
3969+msgid "Number of transactions skipped due to errors"
3970+msgstr "Aantal overgeslagen transacties als gevolg van fouten"
3971+
3972+#. module: account_banking
3973+#: code:addons/account_banking/account_banking.py:0
3974+#, python-format
3975+msgid "The expected balance (%.2f) is different '\n"
3976+" 'than the computed one. (%.2f)"
3977+msgstr "Het verwachte saldo (%.2f) wijkt af van het berekende- (%.2f)."
3978+
3979+#. module: account_banking
3980+#: code:addons/account_banking/wizard/bank_import.py:0
3981+#, python-format
3982+msgid "Statement for account %(bank_account)s uses different '\n"
3983+" 'currency than the defined bank journal."
3984+msgstr "Afschrift voor bankrekening %(account)s gebruik andere valuta dan opgegeven in het bankdagboek."
3985+
3986+#. module: account_banking
3987+#: code:addons/account_banking/wizard/bank_import.py:0
3988+#, python-format
3989+msgid "Number of statements skipped due to errors"
3990+msgstr "Aantal afschriften overgeslagen door fouten"
3991+
3992+#. module: account_banking
3993+#: view:account.banking.account.settings:0
3994+msgid "Default Import Settings for Bank Account"
3995+msgstr "Standaardinstellingen voor bankrekeningen"
3996+
3997+#. module: account_banking
3998+#: help:account.banking.account.settings,default_credit_account_id:0
3999+msgid "The account to use when an unexpected payment was signaled. This can happen when a direct debit payment is cancelled by a customer, or when no matching payment can be found. Mind that you can correct movements before confirming them."
4000+msgstr "De te gebruiken rekening bij onverwachte betalingen. Dit kan voorkomen indien een incasso-opdracht door een klant is geannuleerd, of wanneer er geen overeenkomende betaling kan worden gevonden. Merk op dat u altijd boekingen kunt corrigeren voordat u deze bevestigt."
4001+
4002+#. module: account_banking
4003+#: code:addons/account_banking/wizard/bank_import.py:0
4004+#, python-format
4005+msgid "Unable to import parser %(parser)s. Parser class not found."
4006+msgstr "Niet in staat parser %(parser)s te importeren. Parser class niet gevonden."
4007+
4008+#. module: account_banking
4009+#: selection:payment.line,export_state:0
4010+msgid "Cancelled"
4011+msgstr "Geannuleerd"
4012+
4013+#. module: account_banking
4014+#: view:account.banking.imported.file:0
4015+#: field:account.banking.imported.file,statement_ids:0
4016+msgid "Statements"
4017+msgstr "Afschriften"
4018+
4019+#. module: account_banking
4020+#: field:account.banking.account.settings,default_debit_account_id:0
4021+msgid "Default debit account"
4022+msgstr "Standaard debet-rekening"
4023+
4024+#. module: account_banking
4025+
4026+#. module: account_banking
4027+#: field:account.banking.imported.file,date:0
4028+msgid "Import Date"
4029+msgstr "Importdatum"
4030+
4031+#. module: account_banking
4032+#: selection:payment.line,export_state:0
4033+msgid "Confirmed"
4034+msgstr "Bevestigd"
4035+
4036+#. module: account_banking
4037+#: view:account.banking.account.settings:0
4038+msgid "Default Accounts for Unknown Movements"
4039+msgstr "Standaard rekeningen voor onverwachte mutaties"
4040+
4041+#. module: account_banking
4042+#: view:account.bank.statement:0
4043+msgid "Confirm"
4044+msgstr "Bevestig"
4045+
4046+#. module: account_banking
4047+#: field:account.banking.account.settings,default_credit_account_id:0
4048+msgid "Default credit account"
4049+msgstr "Standaard credit-rekening"
4050+
4051+#. module: account_banking
4052+#: code:addons/account_banking/wizard/bank_import.py:0
4053+#, python-format
4054+msgid "Statements found for account %(bank_account)s, '\n"
4055+" 'but no default journal was defined."
4056+msgstr "Afschriften gevonden voor bankrekening %(bank_account)s, maar geen gedefinieerd dagboek gevonden hiervoor."
4057+
4058+#. module: account_banking
4059+#: field:account.bank.statement.line,international:0
4060+msgid "International Transaction"
4061+msgstr "Internationale transactie"
4062+
4063+#. module: account_banking
4064+#: code:addons/account_banking/account_banking.py:0
4065+#, python-format
4066+msgid "Please verify that an account is defined in the journal."
4067+msgstr "Controleer alstublieft of een rekening is opgegeven in het journaal"
4068+
4069+#. module: account_banking
4070+#: field:account.bank.statement.line,trans:0
4071+msgid "Bank Transaction ID"
4072+msgstr "Transactie ID bank"
4073+
4074+#. module: account_banking
4075+#: code:addons/account_banking/wizard/bank_import.py:0
4076+#, python-format
4077+msgid "Statement %(id)s known - skipped"
4078+msgstr "Afschrift %(id)s al bekend - overgeslagen"
4079+
4080+#. module: account_banking
4081+#: selection:payment.line,export_state:0
4082+msgid "Sent"
4083+msgstr "Verzonden"
4084+
4085+#. module: account_banking
4086+#: code:addons/account_banking/account_banking.py:0
4087+#, python-format
4088+msgid "Error !"
4089+msgstr "Fout !"
4090+
4091+#. module: account_banking
4092+#: code:addons/account_banking/account_banking.py:0
4093+#, python-format
4094+msgid "The account entries lines are not in valid state."
4095+msgstr "De boekingsregels zijn niet geldig."
4096+
4097+#. module: account_banking
4098+#: model:ir.actions.act_window,name:account_banking.action_account_banking_journals
4099+#: model:ir.ui.menu,name:account_banking.menu_action_account_banking_bank_journals
4100+msgid "Default Import Settings for Bank Accounts"
4101+msgstr "Standaardinstellingen voor bankrekeningen"
4102+
4103+#. module: account_banking
4104+#: model:ir.actions.wizard,name:account_banking.wizard_account_banking_import_file
4105+#: model:ir.ui.menu,name:account_banking.menu_account_banking_import_wizard
4106+msgid "Import Bank Statements File"
4107+msgstr "Importeer bankafschrift bestand"
4108+
4109+#. module: account_banking
4110+#: help:account_banking.banking_import,init,file:0
4111+msgid "The Transactions File to import. Please note that while it is perfectly safe to reload the same file multiple times or to load in timeframe overlapping statements files, there are formats that may introduce different sequencing, which may create double entries.\n"
4112+"\n"
4113+"To stay on the safe side, always load bank statements files using the same format."
4114+msgstr "Het te importeren transactiebestand. Let alstublieft op: hoewel het zondermeer veilig is om hetzelfde bestand meerdere keren te importeren of om in tijd overlappende bestanden te importeren, zijn er formaten die een ander nummeringsschema introduceren, wat tot problemen kan leiden.\n"
4115+"\n"
4116+"Om aan de veilige kant te blijven, importeer altijd transactiebestanden in hetzelfde formaat."
4117+
4118+#. module: account_banking
4119+#: constraint:ir.ui.view:0
4120+msgid "Invalid XML for View Architecture!"
4121+msgstr "Ongeldige XML voor overzicht"
4122+
4123+#. module: account_banking
4124+#: view:account.banking.imported.file:0
4125+msgid "Imported Bank Statements"
4126+msgstr "Geïmporteerde bankafschriften"
4127+
4128+#. module: account_banking
4129+#: wizard_view:account_banking.banking_import,import:0
4130+#: wizard_view:account_banking.banking_import,init:0
4131+msgid "Import Bank Transactions File"
4132+msgstr "Importeer banktransacties-bestand"
4133+
4134+#. module: account_banking
4135+#: code:addons/account_banking/wizard/banktools.py:0
4136+#, python-format
4137+msgid "Account %(account_no)s is not owned by %(partner)s"
4138+msgstr "Rekening %(account_no)s is geen eigendom van %(partner)s"
4139+
4140+#. module: account_banking
4141+#: wizard_button:account_banking.banking_import,init,import:0
4142+msgid "_Ok"
4143+msgstr "_Ok"
4144+
4145+#. module: account_banking
4146+#: code:addons/account_banking/wizard/banktools.py:0
4147+#, python-format
4148+msgid "More then one possible match found for partner with name %(name)s"
4149+msgstr "Meer dan één mogelijke match gevonden voor partner met naam %(name)s"
4150+
4151+#. module: account_banking
4152+#: field:account.banking.imported.file,state:0
4153+#: field:payment.line,export_state:0
4154+msgid "State"
4155+msgstr "Status"
4156+
4157+
4158+#. module: account_banking
4159+#: code:addons/account_banking/wizard/banktools.py:0
4160+#, python-format
4161+msgid "No suitable period found for date %(date)s"
4162+msgstr "Geen geschikte periode gevonden voor datum %(date)s"
4163+
4164+#. module: account_banking
4165+#: code:addons/account_banking/wizard/banktools.py:0
4166+#, python-format
4167+msgid "Multiple overlapping periods for date %(date)s"
4168+msgstr "Meerdere overlappende periodes gevonden voor datum %(date)s"
4169+
4170+#. module: account_banking
4171+#: field:account.banking.account.settings,company_id:0
4172+#: field:account.banking.imported.file,company_id:0
4173+#: wizard_field:account_banking.banking_import,init,company:0
4174+msgid "Company"
4175+msgstr "Bedrijf"
4176+
4177+#. module: account_banking
4178+#: wizard_field:account_banking.banking_import,import,log:0
4179+msgid "Log"
4180+msgstr "Logboek"
4181+
4182+#. module: account_banking
4183+#: field:account.banking.imported.file,file:0
4184+msgid "Raw Data"
4185+msgstr "Ruwe data"
4186+
4187+#. module: account_banking
4188+#: code:addons/account_banking/account_banking.py:0
4189+#, python-format
4190+msgid "Configration Error !"
4191+msgstr "Instellingsfout!"
4192+
4193+#. module: account_banking
4194+#: model:ir.module.module,description:account_banking.module_meta_information
4195+msgid "\n"
4196+" Module to do banking.\n"
4197+"\n"
4198+" This modules tries to combine all current banking import and export\n"
4199+" schemes. Rationale for this is that it is quite common to have foreign\n"
4200+" bank account numbers next to national bank account numbers. The current\n"
4201+" approach, which hides the national banking interface schemes in the\n"
4202+" l10n_xxx modules, makes it very difficult to use these simultanious.\n"
4203+" A more banking oriented approach seems more logical and cleaner.\n"
4204+"\n"
4205+" Changes to default OpenERP:\n"
4206+"\n"
4207+" * Puts focus on the real life messaging with banks:\n"
4208+" + Bank statement lines upgraded to independent bank transactions.\n"
4209+" + Banking statements have no special accountancy meaning, they're just\n"
4210+" message envelopes for a number of bank transactions.\n"
4211+" + Bank statements can be either encoded by hand to reflect the document\n"
4212+" version of Bank Statements, or created as an optional side effect of\n"
4213+" importing Bank Transactions.\n"
4214+"\n"
4215+" * Preparations for SEPA:\n"
4216+" + IBAN accounts are the standard in the SEPA countries\n"
4217+" + local accounts are derived from SEPA (excluding Turkey) but are\n"
4218+" considered to be identical to the corresponding SEPA account.\n"
4219+" + Banks are identified with either Country + Bank code + Branch code or BIC\n"
4220+" + Each bank can have its own pace in introducing SEPA into their\n"
4221+" communication with their customers.\n"
4222+" + National online databases can be used to convert BBAN's to IBAN's.\n"
4223+"\n"
4224+" * Adds dropin extensible import facility for bank communication in:\n"
4225+" + MultiBank (NL) format transaction files,\n"
4226+" - (todo) MT940 (Swift) format transaction files,\n"
4227+" - (todo) CODA (BE) format transaction files,\n"
4228+" - (wish) SEPA Credits (ISO 200022) messages,\n"
4229+"\n"
4230+" * Extends payments for digital banking:\n"
4231+" + Adapted workflow in payments to reflect banking operations\n"
4232+" + Relies on account_payment mechanics to extend with export generators.\n"
4233+" - ClieOp3 (NL) payment and direct debit orders files available as\n"
4234+" account_banking_nl_clieop\n"
4235+" - (wish) BTL91 (NL) payment orders files (no format description available),\n"
4236+" - (wish) SEPA Direct Debits (ISO 200022) messages\n"
4237+"\n"
4238+" * Additional features for the import/export mechanism:\n"
4239+" + Automatic matching and creation of bank accounts, banks and partners,\n"
4240+" during import of statements.\n"
4241+" + Automatic matching with invoices and payments.\n"
4242+" + Sound import mechanism, allowing multiple imports of the same\n"
4243+" transactions repeated over multiple files.\n"
4244+" + Journal configuration per bank account.\n"
4245+" + Business logic and format parsing strictly separated to ease the\n"
4246+" development of new parsers.\n"
4247+" + No special configuration needed for the parsers, new parsers are\n"
4248+" recognized and made available at server (re)start.\n"
4249+" "
4250+msgstr " Module voor bankzaken.\n"
4251+"\n"
4252+" Deze module probeert alle bestaande bankimport- en -exportschema's\n"
4253+" te combineren. Ratio hierachter is dat het vrij gebruikelijk is om\n"
4254+" buitenlandse bankrekeningen te hebben naast nationale-. De huidige\n"
4255+" benadering waarbij nationale bankinterfaces ondergebracht worden in\n"
4256+" de l10n_xxx modules, maakt het zeer lastig om deze naast elkaar te\n"
4257+" gebruiken. Een meer bank-geöriënteerde benadering lijkt logischer en\n"
4258+" 'schoner'.\n"
4259+"\n"
4260+" Wijzigingen op standaard OpenERP:\n"
4261+"\n"
4262+" * Legt focus op berichtuitwisseling met banken:\n"
4263+" + Bankafschriftregels opgewaardeerd naar onafhankelijke banktransacties.\n"
4264+" + Bankafschriften hebben geen speciale accountancy-betekenis, ze zijn\n"
4265+" slechts enveloppen voor een reeks banktransacties.\n"
4266+" + Bankafschriften kunnen hetzij met de hand worden ingevoerd als projectie\n"
4267+" van de papieren versie, of gemaakt worden als neveneffect van het\n"
4268+" importeren van banktransacties.\n"
4269+"\n"
4270+" * Voorbereidingen voor SEPA:\n"
4271+" + IBAN bankrekeningen zijn de standaard in de SEPA-landen\n"
4272+" + lokale bankrekeningen worden afgeleid van SEPA (uitgezonderd Turkije)\n"
4273+" maar worden beschouwd als identiek aan de corresponderende IBAN-rekening.\n"
4274+" + Banken worden geïdentificeerd met hetzij land + bankcode + branchcode of BIC\n"
4275+" - Each bank can have its own pace in introducing SEPA into their\n"
4276+" communication with their customers.\n"
4277+" + Nationale online databases kunnen gebruikt worden om BBAN's naar IBAN's te\n"
4278+" converteren.\n"
4279+"\n"
4280+" * Geeft dropin uitbreidbare importvoorzieningen voor bankcommunicatie in:\n"
4281+" + MultiBank (NL) formaat transactiebestanden,\n"
4282+" - (todo) MT940 (Swift) formaat transactiebestanden,\n"
4283+" - (todo) CODA (BE) formaat transactiebestanden,\n"
4284+" - (wish) SEPA Credits (ISO 200022) berichten,\n"
4285+"\n"
4286+" * Breidt betalingen uit voor digitaal bankieren:\n"
4287+" + Werkstroom in betalingen aangepast voor bank-operaties\n"
4288+" + Bouwt op account_payment mechanieken voor uitbreidingen met export generatoren.\n"
4289+" - ClieOp3 (NL) betalings- en incasso-opdrachten beschikbaar in de\n"
4290+" account_banking_nl_clieop module\n"
4291+" - (wish) BTL91 (NL) batalingsopdrachten (geen formaatbeschrijving beschikbaar),\n"
4292+" - (wish) SEPA Direct Debits (ISO 200022) berichten\n"
4293+"\n"
4294+" * Toegevoegde mogelijkheden voor het import/export mechanisme:\n"
4295+" + Automatische koppeling en aanmaken van bankrekeningen, banken en relaties\n"
4296+" tijdens het importeren van transacties.\n"
4297+" + Automatisch koppelen met facturen en betalingen.\n"
4298+" + Solide importmechanisme dat meerdere imports van dezelfde transacties over\n"
4299+" over meerdere bestanden toestaat.\n"
4300+" + Dagboek-instellingen per bankrekening.\n"
4301+" + Business logica en bestands-parsing strikt gescheiden om de ontwikkeling\n"
4302+" van nieuwe parsers te vergemakkelijken\n"
4303+" + Geen speciale configuratie nodig voor de parsers, nieuwe parsers worden\n"
4304+" herkend en beschikbaar gemaakt voor gebuikers bij server(her)start.\n"
4305+" "
4306+
4307+#. module: account_banking
4308+#: model:ir.actions.act_window,name:account_banking.act_account_payment_account_bank_statement
4309+msgid "Bank Statements File"
4310+msgstr "Bankafschrift bestand"
4311+
4312+#. module: account_banking
4313+#: code:addons/account_banking/parsers/models.py:0
4314+#, python-format
4315+msgid "This is a stub. Please implement your own."
4316+msgstr "Dit is een stub. Maak alstublieft uw eigen versie."
4317+
4318+#. module: account_banking
4319+#: view:account.banking.imported.file:0
4320+#: model:ir.actions.act_window,name:account_banking.action_account_banking_imported_files
4321+#: model:ir.ui.menu,name:account_banking.menu_action_account_banking_imported_files
4322+msgid "Imported Bank Statements Files"
4323+msgstr "Geïmporteerde bankafschrift bestanden"
4324+
4325+#. module: account_banking
4326+#: field:account.bank.statement,banking_id:0
4327+msgid "Imported File"
4328+msgstr "Geïmporteerd bestand"
4329+
4330+#. module: account_banking
4331+#: view:account.banking.imported.file:0
4332+#: field:account.banking.imported.file,log:0
4333+msgid "Import Log"
4334+msgstr "Import log"
4335+
4336+#. module: account_banking
4337+#: code:addons/account_banking/wizard/bank_import.py:0
4338+#, python-format
4339+msgid "The imported statements appear to be invalid! Check your file."
4340+msgstr "De geïmporteerde afschriften lijken onjuist! Controleer uw bestand."
4341+
4342+#. module: account_banking
4343+#: code:addons/account_banking/wizard/bank_import.py:0
4344+#, python-format
4345+msgid "Number of statements loaded"
4346+msgstr "Aantal geladen afschriften"
4347+
4348+#. module: account_banking
4349+#: model:ir.ui.menu,name:account_banking.menu_finance_banking_actions
4350+#: model:ir.ui.menu,name:account_banking.menu_finance_banking_settings
4351+msgid "Banking"
4352+msgstr "Bankzaken"
4353+
4354+#. module: account_banking
4355+#: selection:account.banking.imported.file,state:0
4356+msgid "Error"
4357+msgstr "Fout"
4358+
4359+#. module: account_banking
4360+#: code:addons/account_banking/account_banking.py:0
4361+#, python-format
4362+msgid "Unable to reconcile entry \"%s\": %.2f"
4363+msgstr "Niet in staat boeking af te letteren \"%s\": %.2f"
4364+
4365+#. module: account_banking
4366+#: view:account.banking.imported.file:0
4367+msgid "Import Details"
4368+msgstr "Details import"
4369+
4370+#. module: account_banking
4371+#: field:account.bank.statement.line,period_id:0
4372+msgid "Period"
4373+msgstr "Periode"
4374+
4375+#. module: account_banking
4376+#: selection:payment.line,export_state:0
4377+msgid "Done"
4378+msgstr "Verwerkt"
4379+
4380+#. module: account_banking
4381+#: view:payment.order:0
4382+msgid "Select Invoices to Pay"
4383+msgstr "Kies te betalen facturen"
4384+
4385+#. module: account_banking
4386+#: field:account.banking.imported.file,user_id:0
4387+msgid "Responsible User"
4388+msgstr "Verantwoordelijke gebruiker"
4389+
4390+#. module: account_banking
4391+#: code:addons/account_banking/account_banking.py:0
4392+#, python-format
4393+msgid "The statement balance is incorrect !\n"
4394+msgstr "Het saldo op het afschrift is onjuist!\n"
4395+
4396+#. module: account_banking
4397+#: constraint:ir.model:0
4398+msgid "The Object name must start with x_ and not contain any special character !"
4399+msgstr "De objectnaam moet beginnen met x_ en mag geen speciale karakters bevatten !"
4400+
4401+#. module: account_banking
4402+#: selection:account.banking.imported.file,state:0
4403+msgid "Unfinished"
4404+msgstr "Onvoltooid"
4405+
4406+#. module: account_banking
4407+#: code:addons/account_banking/wizard/bank_import.py:0
4408+#, python-format
4409+msgid "Statements found for unknown account %(bank_account)s"
4410+msgstr "Afschriften gevonden voor onbekende bankrekening %(bank_account)s"
4411+
4412+#. module: account_banking
4413+#: model:ir.module.module,shortdesc:account_banking.module_meta_information
4414+msgid "Account Banking"
4415+msgstr "Account Banking"
4416+
4417+#. module: account_banking
4418+#: code:addons/account_banking/wizard/bank_import.py:0
4419+#, python-format
4420+msgid "Total number of statements"
4421+msgstr "Totaal aantal afschriften"
4422+
4423+#. module: account_banking
4424+#: field:account.banking.imported.file,format:0
4425+#: wizard_field:account_banking.banking_import,init,parser:0
4426+msgid "File Format"
4427+msgstr "Bestandsformaat"
4428+
4429+#. module: account_banking
4430+#: field:account.banking.account.settings,journal_id:0
4431+msgid "Journal"
4432+msgstr "Dagboek"
4433+
4434+#. module: account_banking
4435+#: selection:account.banking.imported.file,state:0
4436+msgid "Finished"
4437+msgstr "Gereed"
4438+
4439+#. module: account_banking
4440+#: code:addons/account_banking/wizard/banktools.py:0
4441+#, python-format
4442+msgid "No suitable fiscal year found for company %(company_name)s"
4443+msgstr "Geen geschikt boekjaar gevonden voor bedrijf %(company_name)s"
4444+
4445+#. module: account_banking
4446+#: view:account.banking.account.settings:0
4447+msgid "Bank Account Details"
4448+msgstr "Details bankrekening"
4449+
4450+#. module: account_banking
4451+#: code:addons/account_banking/wizard/bank_import.py:0
4452+#, python-format
4453+msgid "Unable to link transaction %(trans)s to invoice: '\n"
4454+" '%(no_candidates)s candidates found; can\'t choose."
4455+msgstr "Niet in staat transactie %(trans)s aan factuur te koppelen: '\n"
4456+" '%(no_candidates)s kandidaten gevonden; kan niet kiezen."
4457+
4458+#. module: account_banking
4459+#: field:account.bank.statement.line,partner_bank_id:0
4460+#: field:account.banking.account.settings,partner_bank_id:0
4461+msgid "Bank Account"
4462+msgstr "Bankrekening"
4463+
4464+#. module: account_banking
4465+#: code:addons/account_banking/wizard/bank_import.py:0
4466+#, python-format
4467+msgid "Number of transactions loaded"
4468+msgstr "Aantal geladen transacties"
4469+
4470+#. module: account_banking
4471+#: code:addons/account_banking/wizard/banktools.py:0
4472+#, python-format
4473+msgid "Multiple overlapping fiscal years found for date %(date)s"
4474+msgstr "Meerdere overlappende boekjaren gevonden voor datum %(date)s"
4475+
4476+#. module: account_banking
4477+#: model:ir.model,name:account_banking.model_account_banking_imported_file
4478+msgid "Imported Bank Statements File"
4479+msgstr "Geïmporteerde bankafschrift bestand"
4480+
4481
4482=== added directory 'account_banking/parsers'
4483=== added file 'account_banking/parsers/__init__.py'
4484--- account_banking/parsers/__init__.py 1970-01-01 00:00:00 +0000
4485+++ account_banking/parsers/__init__.py 2010-03-04 01:53:21 +0000
4486@@ -0,0 +1,24 @@
4487+# -*- encoding: utf-8 -*-
4488+##############################################################################
4489+#
4490+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
4491+# All Rights Reserved
4492+#
4493+# This program is free software: you can redistribute it and/or modify
4494+# it under the terms of the GNU General Public License as published by
4495+# the Free Software Foundation, either version 3 of the License, or
4496+# (at your option) any later version.
4497+#
4498+# This program is distributed in the hope that it will be useful,
4499+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4500+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4501+# GNU General Public License for more details.
4502+#
4503+# You should have received a copy of the GNU General Public License
4504+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4505+#
4506+##############################################################################
4507+
4508+import models
4509+
4510+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4511
4512=== added file 'account_banking/parsers/convert.py'
4513--- account_banking/parsers/convert.py 1970-01-01 00:00:00 +0000
4514+++ account_banking/parsers/convert.py 2010-03-04 01:53:21 +0000
4515@@ -0,0 +1,41 @@
4516+# -*- encoding: utf-8 -*-
4517+##############################################################################
4518+#
4519+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
4520+# All Rights Reserved
4521+#
4522+# This program is free software: you can redistribute it and/or modify
4523+# it under the terms of the GNU General Public License as published by
4524+# the Free Software Foundation, either version 3 of the License, or
4525+# (at your option) any later version.
4526+#
4527+# This program is distributed in the hope that it will be useful,
4528+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4529+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4530+# GNU General Public License for more details.
4531+#
4532+# You should have received a copy of the GNU General Public License
4533+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4534+#
4535+##############################################################################
4536+
4537+__all__ = ['str2date', 'date2str', 'date2date']
4538+
4539+import datetime
4540+
4541+def str2date(datestr, format='%d/%m/%y'):
4542+ '''Convert a string to a datatime object'''
4543+ return datetime.datetime.strptime(datestr, format)
4544+
4545+def date2str(date, format='%Y-%m-%d'):
4546+ '''Convert a datetime object to a string'''
4547+ return date.strftime(format)
4548+
4549+def date2date(datestr, fromfmt='%d/%m/%y', tofmt='%Y-%m-%d'):
4550+ '''
4551+ Convert a date in a string to another string, in a different
4552+ format
4553+ '''
4554+ return date2str(str2date(datestr, fromfmt), tofmt)
4555+
4556+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4557
4558=== added file 'account_banking/parsers/models.py'
4559--- account_banking/parsers/models.py 1970-01-01 00:00:00 +0000
4560+++ account_banking/parsers/models.py 2010-03-04 01:53:21 +0000
4561@@ -0,0 +1,161 @@
4562+# -*- encoding: utf-8 -*-
4563+##############################################################################
4564+#
4565+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
4566+# All Rights Reserved
4567+#
4568+# This program is free software: you can redistribute it and/or modify
4569+# it under the terms of the GNU General Public License as published by
4570+# the Free Software Foundation, either version 3 of the License, or
4571+# (at your option) any later version.
4572+#
4573+# This program is distributed in the hope that it will be useful,
4574+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4575+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4576+# GNU General Public License for more details.
4577+#
4578+# You should have received a copy of the GNU General Public License
4579+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4580+#
4581+##############################################################################
4582+
4583+class mem_bank_statement(object):
4584+ '''
4585+ A mem_bank_statement is a real life projection of a bank statement paper
4586+ containing a report of one or more transactions done. As these reports can
4587+ contain payments that originate in several accounting periods, period is an
4588+ attribute of mem_bank_transaction, not of mem_bank_statement.
4589+ Also note that the statement_id is copied from the bank statement, and not
4590+ generated from any sequence. This enables us to skip old data in new
4591+ statement files.
4592+ '''
4593+ # Lock attributes to enable parsers to trigger non-conformity faults
4594+ __slots__ = [
4595+ 'start_balance','end_balance', 'date', 'local_account',
4596+ 'local_currency', 'id', 'statements'
4597+ ]
4598+ def __init__(self, *args, **kwargs):
4599+ super(mem_bank_statement, self).__init__(*args, **kwargs)
4600+ self.id = ''
4601+ self.local_account = ''
4602+ self.local_currency = ''
4603+ self.start_balance = 0.0
4604+ self.end_balance = 0.0
4605+ self.date = ''
4606+ self.transactions = []
4607+
4608+ def is_valid(self):
4609+ '''
4610+ Final check: ok if calculated end_balance and parsed end_balance are
4611+ identical and perform a heuristic check on the transactions.
4612+ '''
4613+ if any([x for x in self.transactions if not x.is_valid()]):
4614+ return False
4615+ check = float(self.start_balance)
4616+ for transaction in self.transactions:
4617+ check += float(transaction.transferred_amount)
4618+ return abs(check - float(self.end_balance)) < 0.0001
4619+
4620+class mem_bank_transaction(object):
4621+ '''
4622+ A mem_bank_transaction is a real life copy of a bank transfer. Mapping to
4623+ OpenERP moves and linking to invoices and the like is done afterwards.
4624+ '''
4625+ # Lock attributes to enable parsers to trigger non-conformity faults
4626+ __slots__ = [
4627+ 'id', 'local_account', 'local_currency', 'execution_date',
4628+ 'effective_date', 'remote_owner', 'remote_account',
4629+ 'remote_currency', 'transferred_amount', 'transfer_type',
4630+ 'reference', 'message', 'statement_id',
4631+ ]
4632+
4633+ def __init__(self, *args, **kwargs):
4634+ super(mem_bank_transaction, self).__init__(*args, **kwargs)
4635+ self.id = ''
4636+ self.local_account = ''
4637+ self.local_currency = ''
4638+ self.execution_date = ''
4639+ self.effective_date = ''
4640+ self.remote_account = ''
4641+ self.remote_owner = ''
4642+ self.remote_currency = ''
4643+ self.transferred_amount = ''
4644+ self.transfer_type = ''
4645+ self.reference = ''
4646+ self.message = ''
4647+ self.statement_id = ''
4648+
4649+ def is_valid(self):
4650+ '''
4651+ Heuristic check: at least id, execution_date, remote_account and
4652+ transferred_amount should be filled to create a valid transfer.
4653+ '''
4654+ return (self.execution_date and self.remote_account
4655+ and self.transferred_amount and True) or False
4656+
4657+class parser_type(type):
4658+ parsers = []
4659+ parser_by_name = {}
4660+ parser_by_code = {}
4661+ parser_by_classname = {}
4662+
4663+ def __new__(metacls, clsname, bases, clsdict):
4664+ newcls = type.__new__(metacls, clsname, bases, clsdict)
4665+ if 'name' in clsdict and newcls.name:
4666+ metacls.parsers.append(newcls)
4667+ metacls.parser_by_name[newcls.name] = newcls
4668+ metacls.parser_by_code[newcls.code] = newcls
4669+ metacls.parser_by_classname[clsname] = newcls
4670+ return newcls
4671+
4672+ @classmethod
4673+ def get_parser_types(cls, sort='name'):
4674+ if sort == 'name':
4675+ keys = cls.parser_by_name.keys()
4676+ parsers = cls.parser_by_name
4677+ else:
4678+ keys = cls.parser_by_code.itervalues()
4679+ parsers = cls.parser_by_code
4680+ keys.sort()
4681+ return [(parsers[x].code, parsers[x].name) for x in keys]
4682+
4683+def create_parser(code):
4684+ if code in parser_type.parser_by_code:
4685+ return parser_type.parser_by_code[code]()
4686+ return None
4687+
4688+class parser(object):
4689+ '''
4690+ A parser delivers the interface for any parser object. Inherit from
4691+ it to implement your own.
4692+ You should at least implement the following at the class level:
4693+ name -> the name of the parser, shown to the user and
4694+ translatable.
4695+ code -> the identifier you care to give it. Not translatable
4696+ doc -> the description of the identifier. Shown to the user.
4697+ Translatable.
4698+
4699+ parse -> the method for the actual parsing.
4700+ '''
4701+ __metaclass__ = parser_type
4702+ name = None
4703+ code = None
4704+ doc = __doc__
4705+
4706+ def parse(self, data):
4707+ '''
4708+ Parse data.
4709+
4710+ data is a raw in memory file object. You have to split it in
4711+ whatever chunks you see fit for parsing. It should return a list
4712+ of mem_bank_statement objects. Every mem_bank_statement object
4713+ should contain a list of mem_bank_transaction objects.
4714+
4715+ For identification purposes, don't invent numbering of the transaction
4716+ numbers or bank statements ids on your own - stick with those provided
4717+ by your bank. Doing so enables the users to re-load old transaction
4718+ files without creating multiple identical bank statements.
4719+ '''
4720+ raise NotImplementedError(_('This is a stub. Please implement your own.'))
4721+
4722+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4723
4724=== added file 'account_banking/record.py'
4725--- account_banking/record.py 1970-01-01 00:00:00 +0000
4726+++ account_banking/record.py 2010-03-04 01:53:21 +0000
4727@@ -0,0 +1,182 @@
4728+# -*- encoding: utf-8 -*-
4729+##############################################################################
4730+#
4731+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
4732+# All Rights Reserved
4733+#
4734+# This program is free software: you can redistribute it and/or modify
4735+# it under the terms of the GNU General Public License as published by
4736+# the Free Software Foundation, either version 3 of the License, or
4737+# (at your option) any later version.
4738+#
4739+# This program is distributed in the hope that it will be useful,
4740+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4741+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4742+# GNU General Public License for more details.
4743+#
4744+# You should have received a copy of the GNU General Public License
4745+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4746+#
4747+##############################################################################
4748+
4749+__all__ = [
4750+ 'Field', 'Filler', 'DateField', 'NumberField', 'RightAlignedField',
4751+ 'RecordType', 'Record', 'asciify'
4752+]
4753+
4754+__doc__ = '''Ease working with fixed length records in files'''
4755+
4756+from datetime import datetime, date
4757+import unicodedata
4758+
4759+class Field(object):
4760+ '''Base Field class - fixed length left aligned string field in a record'''
4761+ def __init__(self, name, length=1, fillchar=' '):
4762+ self.name = name.replace(' ', '_')
4763+ self.length = length
4764+ self.fillchar = fillchar
4765+
4766+ def format(self, value):
4767+ value = str(value)
4768+ if len(value) > self.length:
4769+ return value[len(value) - self.length:]
4770+ return value.ljust(self.length, self.fillchar)
4771+
4772+ def take(self, buffer):
4773+ offset = hasattr(self, 'offset') and self.offset or 0
4774+ return buffer[offset:offset + self.length].rstrip(self.fillchar)
4775+
4776+ def __repr__(self):
4777+ return '%s "%s"' % (self.__class__.__name__, self.name)
4778+
4779+class Filler(Field):
4780+ '''Constant value field'''
4781+ def __init__(self, name, length=1, value=' '):
4782+ super(Filler, self).__init__(name, length)
4783+ self.value = str(value)
4784+
4785+ def take(self, buffer):
4786+ return self.format(buffer)
4787+
4788+ def format(self, value):
4789+ return super(Filler, self).format(
4790+ self.value * (self.length / len(self.value) +1)
4791+ )
4792+
4793+class DateField(Field):
4794+ '''Variable date field'''
4795+ def __init__(self, name, format='%Y-%m-%d', auto=False):
4796+ length = len(date.today().strftime(format))
4797+ super(DateField, self).__init__(name, length)
4798+ self.dateformat = format
4799+ self.auto = auto
4800+
4801+ def format(self, value):
4802+ if isinstance(value, (str, unicode)) and \
4803+ len(value.strip()) == self.length:
4804+ value = datetime.strptime(value, self.dateformat).date()
4805+ elif not isinstance(value, (datetime, date)):
4806+ value = date.today()
4807+ return value.strftime(self.dateformat)
4808+
4809+ def take(self, buffer):
4810+ value = super(DateField, self).take(buffer)
4811+ if value:
4812+ return datetime.strptime(value, self.dateformat).date()
4813+ return self.auto and date.today() or None
4814+
4815+class RightAlignedField(Field):
4816+ '''Deviation of Field: right aligned'''
4817+ def format(self, value):
4818+ if len(value) > self.length:
4819+ return value[:self.length]
4820+ return value.rjust(self.length, self.fillchar)
4821+
4822+ def take(self, buffer):
4823+ offset = hasattr(self, 'offset') and self.offset or 0
4824+ return buffer[offset:offset + self.length].lstrip(self.fillchar)
4825+
4826+class NumberField(RightAlignedField):
4827+ '''Deviation of Field: left zero filled'''
4828+ def __init__(self, *args, **kwargs):
4829+ kwargs['fillchar'] = '0'
4830+ super(NumberField, self).__init__(*args, **kwargs)
4831+
4832+ def format(self, value):
4833+ return super(NumberField, self).format(value and str(value) or '')
4834+
4835+class RecordType(object):
4836+ fields = []
4837+
4838+ def __init__(self, fields=[]):
4839+ if fields:
4840+ self.fields = fields
4841+ offset = 0
4842+ for field in self.fields:
4843+ field.offset = offset
4844+ offset += field.length
4845+
4846+ def __len__(self):
4847+ return reduce(lambda x,y: x+y.length, self.fields, 0)
4848+
4849+ def __contains__(self, key):
4850+ return any(lambda x, y=key: x.name == y, self.fields)
4851+
4852+ def __getitem__(self, key):
4853+ for field in self.fields:
4854+ if field.name == key:
4855+ return field
4856+ raise KeyError, 'No such field: %s' % key
4857+
4858+ def format(self, buffer):
4859+ result = []
4860+ for field in self.fields:
4861+ result.append(field.format(field.take(buffer)))
4862+ return ''.join(result)
4863+
4864+ def take(self, buffer):
4865+ return dict(zip([x.name for x in self.fields],
4866+ [x.take(buffer) for x in self.fields]
4867+ ))
4868+
4869+class Record(object):
4870+ _recordtype = None
4871+
4872+ def __init__(self, recordtype=None, value=''):
4873+ if hasattr(self, '_fields') and self._fields:
4874+ self._recordtype = RecordType(self._fields)
4875+ if not self._recordtype and not recordtype:
4876+ raise ValueError, 'No recordtype specified'
4877+ if not self._recordtype:
4878+ self._recordtype = recordtype()
4879+ self._length = len(self._recordtype)
4880+ self._value = value.ljust(self._length)[:self._length]
4881+
4882+ def __len__(self):
4883+ return self._length
4884+
4885+ def __setattr__(self, attr, value):
4886+ if attr.startswith('_'):
4887+ super(Record, self).__setattr__(attr, value)
4888+ else:
4889+ field = self._recordtype[attr]
4890+ self._value = self._value[:field.offset] + \
4891+ field.format(value) + \
4892+ self._value[field.offset + field.length:]
4893+
4894+ def __getattr__(self, attr):
4895+ if attr.startswith('_'):
4896+ return super(Record, self).__getattr__(attr)
4897+ field = self._recordtype[attr]
4898+ return field.take(self._value)
4899+
4900+ def __str__(self):
4901+ return self._recordtype.format(self._value)
4902+
4903+ def __unicode__(self):
4904+ return unicode(str(self))
4905+
4906+def asciify(str):
4907+ return unicodedata.normalize('NFKD', str).encode('ascii', 'ignore')
4908+
4909+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4910
4911=== added file 'account_banking/sepa.py'
4912--- account_banking/sepa.py 1970-01-01 00:00:00 +0000
4913+++ account_banking/sepa.py 2010-03-04 01:53:21 +0000
4914@@ -0,0 +1,421 @@
4915+# -*- encoding: utf-8 -*-
4916+##############################################################################
4917+#
4918+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
4919+# All Rights Reserved
4920+#
4921+# This program is free software: you can redistribute it and/or modify
4922+# it under the terms of the GNU General Public License as published by
4923+# the Free Software Foundation, either version 3 of the License, or
4924+# (at your option) any later version.
4925+#
4926+# This program is distributed in the hope that it will be useful,
4927+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4928+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4929+# GNU General Public License for more details.
4930+#
4931+# You should have received a copy of the GNU General Public License
4932+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4933+#
4934+##############################################################################
4935+
4936+# The information about SEPA account numbers in this module are collected
4937+# from ISO 13616-1, which can be found at SWIFT's website:
4938+# http://www.swift.com/solutions/messaging/information_products/bic_downloads_documents/pdfs/IBAN_Registry.pdf
4939+#
4940+# This module uses both SEPA and IBAN as seemingly interchangeble terms.
4941+# However, a SEPA account is a bank account in the SEPA zone, which is
4942+# represented by a IBAN number, which is build up from a ISO-693-1 two letter
4943+# country code, two check digits and a BBAN number, representing the
4944+# local/national accounting scheme.
4945+#
4946+# With the exception of Turkey, all countries use the full local adressing
4947+# scheme in the IBAN numbers, making it possible to deduce the BBAN from the
4948+# IBAN. As Turkey uses an additional code in the local scheme which is not
4949+# part of the BBAN, for accounts located in Turkeys banks it is not possible
4950+# to use the BBAN to reconstruct the local account.
4951+#
4952+# WARNING:
4953+# This module contains seemingly enough info to create IBAN's from BBAN's.
4954+# Although many BBAN/IBAN conversions seem algorithmic, there is enough
4955+# deviation to take the warning from SEPA seriously: this is the domain of the
4956+# account owning banks. Don't use it, unless you are prepared to loose your
4957+# money. It is for heuristic validation purposes only.
4958+
4959+__all__ = ['IBAN']
4960+
4961+def modulo_97_base10(buffer):
4962+ '''
4963+ Calculate the modulo 97 value of a string in base10
4964+ '''
4965+ checksum = int(buffer[0])
4966+ for digit in buffer[1:]:
4967+ checksum *= 10;
4968+ checksum += int(digit)
4969+ checksum %= 97
4970+ return checksum
4971+
4972+def base36_to_base10str(buffer):
4973+ '''
4974+ Convert a base36 string value to a string of base10 digits.
4975+ '''
4976+ result = ''
4977+ for digit in buffer:
4978+ if digit.isalpha():
4979+ result += str(ord(digit) - 55)
4980+ else:
4981+ result += digit
4982+ return result
4983+
4984+class BBANFormat(object):
4985+ '''
4986+ A BBANFormat is an auxilliary class for IBAN. It represents the composition
4987+ of a BBAN number from the different elements in order to translate a
4988+ IBAN number to a localized number. The reverse route, transforming a local
4989+ account to a SEPA account, is the sole responsibility of the banks.
4990+ '''
4991+
4992+ def __init__(self, ibanfmt, bbanfmt='%A', nolz=False):
4993+ '''
4994+ Specify the structure of the SEPA account in relation to the local
4995+ account. The XXZZ prefix that all SEPA accounts have is not part of
4996+ the structure in BBANFormat.
4997+
4998+ ibanfmt: string of identifiers from position 5 (start = 1):
4999+ A = Account position
5000+ N = Account digit
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: