Stefan Rijnhart (Therp) has proposed merging 
lp:~therp-nl/banking-addons/6.1-fix_post_date_vs_value_date_confusion into 
lp:banking-addons/6.1.

Requested reviews:
  Banking Addons Core Editors (banking-addons-team)

For more details, see:
https://code.launchpad.net/~therp-nl/banking-addons/6.1-fix_post_date_vs_value_date_confusion/+merge/206684

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.

A more extensive fix for 7.0, which also takes care of the clarification in 
column names and titles is here: 
https://code.launchpad.net/~therp-nl/banking-addons/7.0-fix_post_date_vs_value_date_confusion/+merge/206683.
-- 
https://code.launchpad.net/~therp-nl/banking-addons/6.1-fix_post_date_vs_value_date_confusion/+merge/206684
Your team Banking Addons Core Editors is requested to review the proposed merge 
of lp:~therp-nl/banking-addons/6.1-fix_post_date_vs_value_date_confusion into 
lp:banking-addons/6.1.
=== modified file 'account_banking/banking_import_transaction.py'
--- account_banking/banking_import_transaction.py	2014-01-11 16:04:03 +0000
+++ account_banking/banking_import_transaction.py	2014-02-17 10:51:54 +0000
@@ -77,7 +77,7 @@
             ('type', '=', 'in_invoice'),
             ('partner_id', '=', account_info.bank_partner_id.id),
             ('company_id', '=', account_info.company_id.id),
-            ('date_invoice', '=', trans.effective_date),
+            ('date_invoice', '=', trans.execution_date),
             ('reference', '=', reference),
             ('amount_total', '=', amount),
             ]
@@ -104,7 +104,7 @@
                 period_id = period_id,
                 journal_id = account_info.invoice_journal_id.id,
                 account_id = account_info.bank_partner_id.property_account_payable.id,
-                date_invoice = trans.effective_date,
+                date_invoice = trans.execution_date,
                 reference_type = 'none',
                 reference = reference,
                 name = trans.reference or trans.message,
@@ -1218,7 +1218,7 @@
             # Link accounting period
             period_id = get_period(
                 self.pool, cr, uid,
-                str2date(transaction.effective_date,'%Y-%m-%d'), company,
+                str2date(transaction.execution_date, '%Y-%m-%d'), company,
                 results['log'])
             if not period_id:
                 results['trans_skipped_cnt'] += 1
@@ -1391,7 +1391,7 @@
             if not transaction.statement_line_id:
                 values.update(dict(
                         name = '%s.%s' % (transaction.statement, transaction.transaction),
-                        date = transaction.effective_date,
+                        date = transaction.execution_date,
                         amount = transaction.transferred_amount,
                         statement_id = transaction.statement_id.id,
                         note = transaction.message,
@@ -1590,8 +1590,8 @@
         'reference': fields.char('reference', size=1024),
         'local_account': fields.char('local_account', size=24),
         'local_currency': fields.char('local_currency', size=16),
-        'execution_date': fields.date('execution_date'),
-        'effective_date': fields.date('effective_date'),
+        'execution_date': fields.date('Posted date'),
+        'effective_date': fields.date('Value date'),
         'remote_account': fields.char('remote_account', size=24),
         'remote_currency': fields.char('remote_currency', size=16),
         'exchange_rate': fields.float('exchange_rate'),

=== modified file 'account_banking/parsers/models.py'
--- account_banking/parsers/models.py	2013-10-28 14:52:50 +0000
+++ account_banking/parsers/models.py	2014-02-17 10:51:54 +0000
@@ -86,10 +86,10 @@
         # The currency the bank used to process the transferred amount
 
         'execution_date',
-        # The requested execution date of the action - order date if you like
+        # The posted date of the action
 
         'effective_date',
-        # The real execution date of the action
+        # The value date of the action
 
         'remote_account',
         # The account of the other party

=== modified file 'account_banking_nl_abnamro/abnamro.py'
--- account_banking_nl_abnamro/abnamro.py	2013-06-04 14:35:21 +0000
+++ account_banking_nl_abnamro/abnamro.py	2014-02-17 10:51:54 +0000
@@ -68,7 +68,7 @@
         self.execution_date = str2date(self.date, '%Y%m%d')
         self.effective_date = str2date(self.date, '%Y%m%d')
         # Set statement_id based on week number
-        self.statement_id = self.effective_date.strftime('%Yw%W')
+        self.statement_id = self.execution_date.strftime('%Yw%W')
         self.id = str(subno).zfill(4)
 
 class transaction(models.mem_bank_transaction):
@@ -368,7 +368,7 @@
             msg = transaction_message(line, subno)
             if not statement_id:
                 statement_id = self.get_unique_statement_id(
-                    cr, msg.effective_date.strftime('%Yw%W'))
+                    cr, msg.execution_date.strftime('%Yw%W'))
             msg.statement_id = statement_id
             if stmnt:
                 stmnt.import_transaction(msg)

=== modified file 'account_banking_nl_ing/ing.py'
--- account_banking_nl_ing/ing.py	2012-10-04 08:56:19 +0000
+++ account_banking_nl_ing/ing.py	2014-02-17 10:51:54 +0000
@@ -224,7 +224,7 @@
             msg = transaction_message(line, subno)
             if not statement_id:
                 statement_id = self.get_unique_statement_id(
-                    cr, msg.effective_date.strftime('%Yw%W'))
+                    cr, msg.execution_date.strftime('%Yw%W'))
             msg.statement_id = statement_id
             if stmnt:
                 stmnt.import_transaction(msg)

=== modified file 'account_banking_nl_triodos/triodos.py'
--- account_banking_nl_triodos/triodos.py	2013-05-19 20:32:36 +0000
+++ account_banking_nl_triodos/triodos.py	2014-02-17 10:51:54 +0000
@@ -212,7 +212,7 @@
             msg = transaction_message(line, subno)
             if not statement_id:
                 statement_id = self.get_unique_statement_id(
-                    cr, msg.effective_date.strftime('%Yw%W'))
+                    cr, msg.execution_date.strftime('%Yw%W'))
             msg.statement_id = statement_id
             if stmnt:
                 stmnt.import_transaction(msg)

-- 
Mailing list: https://launchpad.net/~banking-addons-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~banking-addons-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to