Merge lp:~therp-nl/banking-addons/7.0-fix_post_date_vs_value_date_confusion into lp:banking-addons

Proposed by Stefan Rijnhart (Opener) on 2014-02-17
Status: Merged
Approved by: Holger Brunn (Therp) on 2014-03-24
Approved revision: 229
Merged at revision: 241
Proposed branch: lp:~therp-nl/banking-addons/7.0-fix_post_date_vs_value_date_confusion
Merge into: lp:banking-addons
Diff against target: 590 lines (+98/-67)
23 files modified
account_banking/__openerp__.py (+1/-1)
account_banking/banking_import_transaction.py (+6/-6)
account_banking/i18n/account_banking.pot (+3/-3)
account_banking/i18n/da.po (+3/-3)
account_banking/i18n/en.po (+3/-3)
account_banking/i18n/es_ES.po (+3/-3)
account_banking/i18n/hr.po (+3/-3)
account_banking/i18n/hu.po (+3/-3)
account_banking/i18n/nb.po (+3/-3)
account_banking/i18n/nl.po (+5/-5)
account_banking/i18n/pt_BR.po (+3/-3)
account_banking/i18n/ro.po (+3/-3)
account_banking/i18n/tr.po (+3/-3)
account_banking/migrations/7.0.0.3/pre-migration.py (+31/-0)
account_banking/parsers/models.py (+3/-3)
account_banking_camt/camt.py (+1/-1)
account_banking_fi_patu/patu.py (+1/-1)
account_banking_nl_abnamro/abnamro.py (+4/-4)
account_banking_nl_girotel/girotel.py (+2/-2)
account_banking_nl_ing/ing.py (+5/-5)
account_banking_nl_multibank/multibank.py (+4/-4)
account_banking_nl_triodos/triodos.py (+4/-4)
account_banking_uk_hsbc/hsbc_mt940.py (+1/-1)
To merge this branch: bzr merge lp:~therp-nl/banking-addons/7.0-fix_post_date_vs_value_date_confusion
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Approve on 2014-03-24
Yannick Vaucher @ Camptocamp code review, no tests 2014-02-17 Approve on 2014-02-24
Review via email: mp+206683@code.launchpad.net

Description of the change

Disambiguate the terminology concerning post date and value date. The only import filter that distinguished both dates was HBSC, which assigned value date to 'effective_date'. The recent CAMT filter copied this behaviour but as it turns out, the meaning of the value date (or rather the post date) was not honoured in processing the statement lines.

This branch implements using the post date for basically everything: statement line date, base date for determining statement reference, lookup of reconcilable items. To avoid further confusion, I'm applying the well known 'value date' terminology to the column name (migration included).

A basic fix for 6.1, without the column rename is here: https://code.launchpad.net/~therp-nl/banking-addons/6.1-fix_post_date_vs_value_date_confusion/+merge/206684

To post a comment you must log in.

LGTM

Thanks

review: Approve (code review, no tests)
Holger Brunn (Therp) (hbrunn) wrote :

#99, #114... contain the old msgid, I guess you have to rerun msgmerge with the updated pot?
#202 No Capital?

On the column renaming: Is that really necessary? Some google told me that 'value date' indeed seems to be the proper term. That's fine. But so is 'Posted date'. So if we rename columns, why not both?

review: Needs Fixing (code review)
227. By Stefan Rijnhart (Opener) on 2014-03-24

[MRG] target branch. Resolved version number conflict

228. By Stefan Rijnhart (Opener) on 2014-03-24

[FIX] Capitalize Dutch translation string

229. By Stefan Rijnhart (Opener) on 2014-03-24

[UPD] Update translation msgid

@holger Thanks for the review! I fixed the translations.

Well, the thing with disambiguation is that you only need to clear up one of the terms. Value date has a stronger connotation than the various terminology for date/posted date/execution date. I think the latter are all exchangable. I'm planning on changing the data model in a later proposal so that we only keep the 'value date' next to the standard 'date' field on the bank statement line. Would you be able to live with that for now?

Holger Brunn (Therp) (hbrunn) wrote :

yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_banking/__openerp__.py'
2--- account_banking/__openerp__.py 2014-03-17 07:38:04 +0000
3+++ account_banking/__openerp__.py 2014-03-24 11:46:10 +0000
4@@ -26,7 +26,7 @@
5
6 {
7 'name': 'Account Banking',
8- 'version': '0.2',
9+ 'version': '0.3',
10 'license': 'AGPL-3',
11 'author': 'Banking addons community',
12 'website': 'https://launchpad.net/banking-addons',
13
14=== modified file 'account_banking/banking_import_transaction.py'
15--- account_banking/banking_import_transaction.py 2014-01-21 07:55:55 +0000
16+++ account_banking/banking_import_transaction.py 2014-03-24 11:46:10 +0000
17@@ -74,7 +74,7 @@
18 ('type', '=', 'in_invoice'),
19 ('partner_id', 'child_of', account_info.bank_partner_id.id),
20 ('company_id', '=', account_info.company_id.id),
21- ('date_invoice', '=', trans.effective_date),
22+ ('date_invoice', '=', trans.execution_date),
23 ('reference', '=', reference),
24 ('amount_total', '=', amount),
25 ]
26@@ -101,7 +101,7 @@
27 period_id = period_id,
28 journal_id = account_info.invoice_journal_id.id,
29 account_id = account_info.bank_partner_id.property_account_payable.id,
30- date_invoice = trans.effective_date,
31+ date_invoice = trans.execution_date,
32 reference_type = 'none',
33 reference = reference,
34 name = trans.reference or trans.message,
35@@ -943,7 +943,7 @@
36
37 # Link accounting period
38 period_id = banktools.get_period(
39- self.pool, cr, uid, transaction.effective_date,
40+ self.pool, cr, uid, transaction.execution_date,
41 company, results['log'])
42 if not period_id:
43 results['trans_skipped_cnt'] += 1
44@@ -959,7 +959,7 @@
45 else:
46 values = {
47 'name': '%s.%s' % (transaction.statement, transaction.transaction),
48- 'date': transaction.effective_date,
49+ 'date': transaction.execution_date,
50 'amount': transaction.transferred_amount,
51 'statement_id': transaction.statement_id.id,
52 'note': transaction.message,
53@@ -1290,8 +1290,8 @@
54 'reference': fields.char('reference', size=1024),
55 'local_account': fields.char('local_account', size=24),
56 'local_currency': fields.char('local_currency', size=16),
57- 'execution_date': fields.date('execution_date'),
58- 'effective_date': fields.date('effective_date'),
59+ 'execution_date': fields.date('Posted date'),
60+ 'value_date': fields.date('Value date'),
61 'remote_account': fields.char('remote_account', size=24),
62 'remote_currency': fields.char('remote_currency', size=16),
63 'exchange_rate': fields.float('exchange_rate'),
64
65=== modified file 'account_banking/i18n/account_banking.pot'
66--- account_banking/i18n/account_banking.pot 2013-11-13 08:13:18 +0000
67+++ account_banking/i18n/account_banking.pot 2014-03-24 11:46:10 +0000
68@@ -288,7 +288,7 @@
69
70 #. module: account_banking
71 #: field:banking.import.transaction,execution_date:0
72-msgid "execution_date"
73+msgid "Posted date"
74 msgstr ""
75
76 #. module: account_banking
77@@ -785,8 +785,8 @@
78 msgstr ""
79
80 #. module: account_banking
81-#: field:banking.import.transaction,effective_date:0
82-msgid "effective_date"
83+#: field:banking.import.transaction,value_date:0
84+msgid "Value date"
85 msgstr ""
86
87 #. module: account_banking
88
89=== modified file 'account_banking/i18n/da.po'
90--- account_banking/i18n/da.po 2014-03-21 06:57:59 +0000
91+++ account_banking/i18n/da.po 2014-03-24 11:46:10 +0000
92@@ -293,7 +293,7 @@
93
94 #. module: account_banking
95 #: field:banking.import.transaction,execution_date:0
96-msgid "execution_date"
97+msgid "Posted date"
98 msgstr ""
99
100 #. module: account_banking
101@@ -801,8 +801,8 @@
102 msgstr ""
103
104 #. module: account_banking
105-#: field:banking.import.transaction,effective_date:0
106-msgid "effective_date"
107+#: field:banking.import.transaction,value_date:0
108+msgid "Value date"
109 msgstr ""
110
111 #. module: account_banking
112
113=== modified file 'account_banking/i18n/en.po'
114--- account_banking/i18n/en.po 2014-03-21 06:57:59 +0000
115+++ account_banking/i18n/en.po 2014-03-24 11:46:10 +0000
116@@ -292,7 +292,7 @@
117
118 #. module: account_banking
119 #: field:banking.import.transaction,execution_date:0
120-msgid "execution_date"
121+msgid "Posted date"
122 msgstr ""
123
124 #. module: account_banking
125@@ -807,8 +807,8 @@
126 msgstr ""
127
128 #. module: account_banking
129-#: field:banking.import.transaction,effective_date:0
130-msgid "effective_date"
131+#: field:banking.import.transaction,value_date:0
132+msgid "Value date"
133 msgstr ""
134
135 #. module: account_banking
136
137=== modified file 'account_banking/i18n/es_ES.po'
138--- account_banking/i18n/es_ES.po 2014-03-21 06:57:59 +0000
139+++ account_banking/i18n/es_ES.po 2014-03-24 11:46:10 +0000
140@@ -293,7 +293,7 @@
141
142 #. module: account_banking
143 #: field:banking.import.transaction,execution_date:0
144-msgid "execution_date"
145+msgid "Posted date"
146 msgstr ""
147
148 #. module: account_banking
149@@ -801,8 +801,8 @@
150 msgstr ""
151
152 #. module: account_banking
153-#: field:banking.import.transaction,effective_date:0
154-msgid "effective_date"
155+#: field:banking.import.transaction,value_date:0
156+msgid "Value date"
157 msgstr ""
158
159 #. module: account_banking
160
161=== modified file 'account_banking/i18n/hr.po'
162--- account_banking/i18n/hr.po 2014-03-21 06:57:59 +0000
163+++ account_banking/i18n/hr.po 2014-03-24 11:46:10 +0000
164@@ -293,7 +293,7 @@
165
166 #. module: account_banking
167 #: field:banking.import.transaction,execution_date:0
168-msgid "execution_date"
169+msgid "Posted date"
170 msgstr ""
171
172 #. module: account_banking
173@@ -807,8 +807,8 @@
174 msgstr ""
175
176 #. module: account_banking
177-#: field:banking.import.transaction,effective_date:0
178-msgid "effective_date"
179+#: field:banking.import.transaction,value_date:0
180+msgid "Value date"
181 msgstr ""
182
183 #. module: account_banking
184
185=== modified file 'account_banking/i18n/hu.po'
186--- account_banking/i18n/hu.po 2014-03-21 06:57:59 +0000
187+++ account_banking/i18n/hu.po 2014-03-24 11:46:10 +0000
188@@ -303,7 +303,7 @@
189
190 #. module: account_banking
191 #: field:banking.import.transaction,execution_date:0
192-msgid "execution_date"
193+msgid "Posted date"
194 msgstr "execution_date"
195
196 #. module: account_banking
197@@ -814,8 +814,8 @@
198 msgstr ""
199
200 #. module: account_banking
201-#: field:banking.import.transaction,effective_date:0
202-msgid "effective_date"
203+#: field:banking.import.transaction,value_date:0
204+msgid "Value date"
205 msgstr ""
206
207 #. module: account_banking
208
209=== modified file 'account_banking/i18n/nb.po'
210--- account_banking/i18n/nb.po 2014-03-21 06:57:59 +0000
211+++ account_banking/i18n/nb.po 2014-03-24 11:46:10 +0000
212@@ -293,7 +293,7 @@
213
214 #. module: account_banking
215 #: field:banking.import.transaction,execution_date:0
216-msgid "execution_date"
217+msgid "Posted date"
218 msgstr ""
219
220 #. module: account_banking
221@@ -801,8 +801,8 @@
222 msgstr ""
223
224 #. module: account_banking
225-#: field:banking.import.transaction,effective_date:0
226-msgid "effective_date"
227+#: field:banking.import.transaction,value_date:0
228+msgid "Value date"
229 msgstr ""
230
231 #. module: account_banking
232
233=== modified file 'account_banking/i18n/nl.po'
234--- account_banking/i18n/nl.po 2014-03-21 06:57:59 +0000
235+++ account_banking/i18n/nl.po 2014-03-24 11:46:10 +0000
236@@ -301,8 +301,8 @@
237
238 #. module: account_banking
239 #: field:banking.import.transaction,execution_date:0
240-msgid "execution_date"
241-msgstr "execution_date"
242+msgid "Posted date"
243+msgstr "Boekdatum"
244
245 #. module: account_banking
246 #: field:banking.import.line,account_id:0
247@@ -822,9 +822,9 @@
248 msgstr "Betaalverschil"
249
250 #. module: account_banking
251-#: field:banking.import.transaction,effective_date:0
252-msgid "effective_date"
253-msgstr "effective_date"
254+#: field:banking.import.transaction,value_date:0
255+msgid "Value date"
256+msgstr "Valutadatum"
257
258 #. module: account_banking
259 #: view:account.bank.statement.line:0
260
261=== modified file 'account_banking/i18n/pt_BR.po'
262--- account_banking/i18n/pt_BR.po 2014-03-21 06:57:59 +0000
263+++ account_banking/i18n/pt_BR.po 2014-03-24 11:46:10 +0000
264@@ -293,7 +293,7 @@
265
266 #. module: account_banking
267 #: field:banking.import.transaction,execution_date:0
268-msgid "execution_date"
269+msgid "Posted date"
270 msgstr ""
271
272 #. module: account_banking
273@@ -801,8 +801,8 @@
274 msgstr ""
275
276 #. module: account_banking
277-#: field:banking.import.transaction,effective_date:0
278-msgid "effective_date"
279+#: field:banking.import.transaction,value_date:0
280+msgid "Value date"
281 msgstr ""
282
283 #. module: account_banking
284
285=== modified file 'account_banking/i18n/ro.po'
286--- account_banking/i18n/ro.po 2014-03-21 06:57:59 +0000
287+++ account_banking/i18n/ro.po 2014-03-24 11:46:10 +0000
288@@ -293,7 +293,7 @@
289
290 #. module: account_banking
291 #: field:banking.import.transaction,execution_date:0
292-msgid "execution_date"
293+msgid "Posted date"
294 msgstr ""
295
296 #. module: account_banking
297@@ -801,8 +801,8 @@
298 msgstr ""
299
300 #. module: account_banking
301-#: field:banking.import.transaction,effective_date:0
302-msgid "effective_date"
303+#: field:banking.import.transaction,value_date:0
304+msgid "Value date"
305 msgstr ""
306
307 #. module: account_banking
308
309=== modified file 'account_banking/i18n/tr.po'
310--- account_banking/i18n/tr.po 2014-03-21 06:57:59 +0000
311+++ account_banking/i18n/tr.po 2014-03-24 11:46:10 +0000
312@@ -293,7 +293,7 @@
313
314 #. module: account_banking
315 #: field:banking.import.transaction,execution_date:0
316-msgid "execution_date"
317+msgid "Posted date"
318 msgstr ""
319
320 #. module: account_banking
321@@ -801,8 +801,8 @@
322 msgstr ""
323
324 #. module: account_banking
325-#: field:banking.import.transaction,effective_date:0
326-msgid "effective_date"
327+#: field:banking.import.transaction,value_date:0
328+msgid "Value date"
329 msgstr ""
330
331 #. module: account_banking
332
333=== added directory 'account_banking/migrations/7.0.0.3'
334=== added file 'account_banking/migrations/7.0.0.3/pre-migration.py'
335--- account_banking/migrations/7.0.0.3/pre-migration.py 1970-01-01 00:00:00 +0000
336+++ account_banking/migrations/7.0.0.3/pre-migration.py 2014-03-24 11:46:10 +0000
337@@ -0,0 +1,31 @@
338+# -*- coding: utf-8 -*-
339+##############################################################################
340+#
341+# Copyright (C) 2014 Therp BV (<http://therp.nl>).
342+# All Rights Reserved
343+#
344+# This program is free software: you can redistribute it and/or modify
345+# it under the terms of the GNU Affero General Public License as
346+# published by the Free Software Foundation, either version 3 of the
347+# License, or (at your option) any later version.
348+#
349+# This program is distributed in the hope that it will be useful,
350+# but WITHOUT ANY WARRANTY; without even the implied warranty of
351+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
352+# GNU Affero General Public License for more details.
353+#
354+# You should have received a copy of the GNU Affero General Public License
355+# along with this program. If not, see <http://www.gnu.org/licenses/>.
356+#
357+##############################################################################
358+
359+def migrate(cr, version):
360+ if not version:
361+ return
362+
363+ # Rename value date column
364+ cr.execute(
365+ """
366+ ALTER TABLE banking_import_transaction
367+ RENAME COLUMN effective_date TO value_date
368+ """)
369
370=== modified file 'account_banking/parsers/models.py'
371--- account_banking/parsers/models.py 2014-01-05 02:07:34 +0000
372+++ account_banking/parsers/models.py 2014-03-24 11:46:10 +0000
373@@ -86,10 +86,10 @@
374 # The currency the bank used to process the transferred amount
375
376 'execution_date',
377- # The requested execution date of the action - order date if you like
378+ # The posted date of the action
379
380- 'effective_date',
381- # The real execution date of the action
382+ 'value_date',
383+ # The value date of the action
384
385 'remote_account',
386 # The account of the other party
387
388=== modified file 'account_banking_camt/camt.py'
389--- account_banking_camt/camt.py 2014-03-20 11:03:58 +0000
390+++ account_banking_camt/camt.py 2014-03-24 11:46:10 +0000
391@@ -182,7 +182,7 @@
392 """
393 entry_details = {
394 'execution_date': self.xpath(node, './ns:BookgDt/ns:Dt')[0].text,
395- 'effective_date': self.xpath(node, './ns:ValDt/ns:Dt')[0].text,
396+ 'value_date': self.xpath(node, './ns:ValDt/ns:Dt')[0].text,
397 'transfer_type': self.get_transfer_type(node),
398 'transferred_amount': self.parse_amount(node)
399 }
400
401=== modified file 'account_banking_fi_patu/patu.py'
402--- account_banking_fi_patu/patu.py 2013-04-15 13:59:50 +0000
403+++ account_banking_fi_patu/patu.py 2014-03-24 11:46:10 +0000
404@@ -39,7 +39,7 @@
405 "remote_currency": "currency",
406 "transferred_amount": "amount",
407 "execution_date": "recorddate",
408- "effective_date": "paymentdate",
409+ "value_date": "paymentdate",
410 "transfer_type": "eventtype",
411 "reference": "refnr",
412 "eventcode": "eventcode",
413
414=== modified file 'account_banking_nl_abnamro/abnamro.py'
415--- account_banking_nl_abnamro/abnamro.py 2013-10-02 08:56:55 +0000
416+++ account_banking_nl_abnamro/abnamro.py 2014-03-24 11:46:10 +0000
417@@ -67,9 +67,9 @@
418 self.transferred_amount = float(
419 self.transferred_amount.replace(',', '.'))
420 self.execution_date = str2date(self.date, '%Y%m%d')
421- self.effective_date = str2date(self.date, '%Y%m%d')
422+ self.value_date = str2date(self.date, '%Y%m%d')
423 # Set statement_id based on week number
424- self.statement_id = self.effective_date.strftime('%Yw%W')
425+ self.statement_id = self.execution_date.strftime('%Yw%W')
426 self.id = str(subno).zfill(4)
427
428 class transaction(models.mem_bank_transaction):
429@@ -77,7 +77,7 @@
430 Implementation of transaction communication class for account_banking.
431 '''
432 attrnames = ['local_account', 'local_currency', 'transferred_amount',
433- 'blob', 'execution_date', 'effective_date', 'id',
434+ 'blob', 'execution_date', 'value_date', 'id',
435 ]
436
437 type_map = {
438@@ -369,7 +369,7 @@
439 msg = transaction_message(line, subno)
440 if not statement_id:
441 statement_id = self.get_unique_statement_id(
442- cr, msg.effective_date.strftime('%Yw%W'))
443+ cr, msg.execution_date.strftime('%Yw%W'))
444 msg.statement_id = statement_id
445 if stmnt:
446 stmnt.import_transaction(msg)
447
448=== modified file 'account_banking_nl_girotel/girotel.py'
449--- account_banking_nl_girotel/girotel.py 2013-08-02 12:51:00 +0000
450+++ account_banking_nl_girotel/girotel.py 2014-03-24 11:46:10 +0000
451@@ -120,7 +120,7 @@
452 self.remote_account = self.remote_account.zfill(10)
453 else:
454 self.remote_account = False
455- self.execution_date = self.effective_date = self.date
456+ self.execution_date = self.value_date = self.date
457 self.remote_owner = self.remote_owner.rstrip()
458 self.message = self.message.rstrip()
459 self.genid()
460@@ -137,7 +137,7 @@
461 '''
462 attrnames = [ 'statement_id', 'remote_account', 'remote_owner',
463 'remote_currency', 'transferred_amount', 'execution_date',
464- 'effective_date', 'transfer_type', 'message',
465+ 'value_date', 'transfer_type', 'message',
466 ]
467
468 type_map = {
469
470=== modified file 'account_banking_nl_ing/ing.py'
471--- account_banking_nl_ing/ing.py 2013-06-05 12:30:03 +0000
472+++ account_banking_nl_ing/ing.py 2014-03-24 11:46:10 +0000
473@@ -68,10 +68,10 @@
474 if self.debcred == 'Af':
475 self.transferred_amount = -self.transferred_amount
476 try:
477- self.execution_date = self.effective_date = str2date(self.date, '%Y%m%d')
478+ self.execution_date = self.value_date = str2date(self.date, '%Y%m%d')
479 except ValueError:
480- self.execution_date = self.effective_date = str2date(self.date, '%d-%m-%Y')
481- self.statement_id = '' #self.effective_date.strftime('%Yw%W')
482+ self.execution_date = self.value_date = str2date(self.date, '%d-%m-%Y')
483+ self.statement_id = '' #self.value_date.strftime('%Yw%W')
484 self.id = str(subno).zfill(4)
485 self.reference = ''
486 # Normalize basic account numbers
487@@ -85,7 +85,7 @@
488 '''
489 attrnames = ['local_account', 'remote_account',
490 'remote_owner', 'transferred_amount',
491- 'execution_date', 'effective_date', 'transfer_type',
492+ 'execution_date', 'value_date', 'transfer_type',
493 'id', 'reference', 'statement_id', 'message',
494 ]
495
496@@ -279,7 +279,7 @@
497 msg = transaction_message(line, subno)
498 if not statement_id:
499 statement_id = self.get_unique_statement_id(
500- cr, msg.effective_date.strftime('%Yw%W'))
501+ cr, msg.execution_date.strftime('%Yw%W'))
502 msg.statement_id = statement_id
503 if stmnt:
504 stmnt.import_transaction(msg)
505
506=== modified file 'account_banking_nl_multibank/multibank.py'
507--- account_banking_nl_multibank/multibank.py 2013-04-15 13:59:50 +0000
508+++ account_banking_nl_multibank/multibank.py 2014-03-24 11:46:10 +0000
509@@ -44,7 +44,7 @@
510 attrnames = [
511 'date', 'local_account', 'remote_account', 'remote_owner', 'u1', 'u2',
512 'u3', 'local_currency', 'start_balance', 'remote_currency',
513- 'transferred_amount', 'execution_date', 'effective_date', 'nr1',
514+ 'transferred_amount', 'execution_date', 'value_date', 'nr1',
515 'transfer_type', 'nr2', 'reference', 'message', 'statement_id'
516 ]
517
518@@ -82,7 +82,7 @@
519 self.start_balance = float(self.start_balance)
520 self.transferred_amount = float(self.transferred_amount)
521 self.execution_date = str2date(self.execution_date, '%d-%m-%Y')
522- self.effective_date = str2date(self.effective_date, '%d-%m-%Y')
523+ self.value_date = str2date(self.value_date, '%d-%m-%Y')
524 self.id = str(subno).zfill(4)
525
526 class transaction(models.mem_bank_transaction):
527@@ -91,7 +91,7 @@
528 '''
529 attrnames = ['local_account', 'local_currency', 'remote_account',
530 'remote_owner', 'remote_currency', 'transferred_amount',
531- 'execution_date', 'effective_date', 'transfer_type',
532+ 'execution_date', 'value_date', 'transfer_type',
533 'reference', 'message', 'statement_id', 'id',
534 ]
535
536@@ -152,7 +152,7 @@
537 have their transfer_type set to 'OPN'.
538 '''
539 return (self.transferred_amount and self.execution_date and
540- self.effective_date) and (
541+ self.value_date) and (
542 self.remote_account or
543 self.transfer_type in [
544 'KST', 'PRV', 'BTL', 'BEA', 'OPN', 'KNT', 'DIV',
545
546=== modified file 'account_banking_nl_triodos/triodos.py'
547--- account_banking_nl_triodos/triodos.py 2013-11-17 19:15:43 +0000
548+++ account_banking_nl_triodos/triodos.py 2014-03-24 11:46:10 +0000
549@@ -65,8 +65,8 @@
550 if self.debcred == 'Debet':
551 self.transferred_amount = -self.transferred_amount
552 self.execution_date = str2date(self.date, '%d-%m-%Y')
553- self.effective_date = str2date(self.date, '%d-%m-%Y')
554- self.statement_id = '' # self.effective_date.strftime('%Yw%W') # Set statement_id based on week number
555+ self.value_date = str2date(self.date, '%d-%m-%Y')
556+ self.statement_id = ''
557 self.id = str(subno).zfill(4)
558 # Normalize basic account numbers
559 self.remote_account = self.remote_account.replace('.', '').zfill(10)
560@@ -78,7 +78,7 @@
561 '''
562 attrnames = ['local_account', 'remote_account',
563 'remote_owner', 'transferred_amount',
564- 'execution_date', 'effective_date', 'transfer_type',
565+ 'execution_date', 'value_date', 'transfer_type',
566 'reference', 'id',
567 ]
568
569@@ -212,7 +212,7 @@
570 msg = transaction_message(line, subno)
571 if not statement_id:
572 statement_id = self.get_unique_statement_id(
573- cr, msg.effective_date.strftime('%Yw%W'))
574+ cr, msg.execution_date.strftime('%Yw%W'))
575 msg.statement_id = statement_id
576 if stmnt:
577 stmnt.import_transaction(msg)
578
579=== modified file 'account_banking_uk_hsbc/hsbc_mt940.py'
580--- account_banking_uk_hsbc/hsbc_mt940.py 2012-04-30 17:11:56 +0000
581+++ account_banking_uk_hsbc/hsbc_mt940.py 2014-03-24 11:46:10 +0000
582@@ -40,7 +40,7 @@
583
584 mapping = {
585 'execution_date' : 'valuedate',
586- 'effective_date' : 'valuedate',
587+ 'value_date' : 'valuedate',
588 'local_currency' : 'currency',
589 'transfer_type' : 'bookingcode',
590 'reference' : 'custrefno',

Subscribers

People subscribed via source and target branches

to status/vote changes: