[RFR] Rename 'effective date' to standard 'value date'

This commit is contained in:
Stefan Rijnhart
2014-02-14 17:02:08 +01:00
parent deb51bf68b
commit d70982a28b
23 changed files with 78 additions and 47 deletions

View File

@@ -26,7 +26,7 @@
{
'name': 'Account Banking',
'version': '0.1.136',
'version': '0.2.0',
'license': 'AGPL-3',
'author': 'Banking addons community',
'website': 'https://launchpad.net/banking-addons',

View File

@@ -1291,7 +1291,7 @@ class banking_import_transaction(orm.Model):
'local_account': fields.char('local_account', size=24),
'local_currency': fields.char('local_currency', size=16),
'execution_date': fields.date('Posted date'),
'effective_date': fields.date('Value date'),
'value_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'),

View File

@@ -288,7 +288,7 @@ msgstr ""
#. module: account_banking
#: field:banking.import.transaction,execution_date:0
msgid "execution_date"
msgid "Posted date"
msgstr ""
#. module: account_banking
@@ -785,8 +785,8 @@ msgid "Payment Difference"
msgstr ""
#. module: account_banking
#: field:banking.import.transaction,effective_date:0
msgid "effective_date"
#: field:banking.import.transaction,value_date:0
msgid "Value date"
msgstr ""
#. module: account_banking

View File

@@ -801,8 +801,8 @@ msgid "Payment Difference"
msgstr ""
#. module: account_banking
#: field:banking.import.transaction,effective_date:0
msgid "effective_date"
#: field:banking.import.transaction,value_date:0
msgid "value_date"
msgstr ""
#. module: account_banking

View File

@@ -807,8 +807,8 @@ msgid "Payment Difference"
msgstr ""
#. module: account_banking
#: field:banking.import.transaction,effective_date:0
msgid "effective_date"
#: field:banking.import.transaction,value_date:0
msgid "value_date"
msgstr ""
#. module: account_banking

View File

@@ -801,8 +801,8 @@ msgid "Payment Difference"
msgstr ""
#. module: account_banking
#: field:banking.import.transaction,effective_date:0
msgid "effective_date"
#: field:banking.import.transaction,value_date:0
msgid "value_date"
msgstr ""
#. module: account_banking

View File

@@ -807,8 +807,8 @@ msgid "Payment Difference"
msgstr ""
#. module: account_banking
#: field:banking.import.transaction,effective_date:0
msgid "effective_date"
#: field:banking.import.transaction,value_date:0
msgid "value_date"
msgstr ""
#. module: account_banking

View File

@@ -814,8 +814,8 @@ msgid "Payment Difference"
msgstr ""
#. module: account_banking
#: field:banking.import.transaction,effective_date:0
msgid "effective_date"
#: field:banking.import.transaction,value_date:0
msgid "value_date"
msgstr ""
#. module: account_banking

View File

@@ -801,8 +801,8 @@ msgid "Payment Difference"
msgstr ""
#. module: account_banking
#: field:banking.import.transaction,effective_date:0
msgid "effective_date"
#: field:banking.import.transaction,value_date:0
msgid "value_date"
msgstr ""
#. module: account_banking

View File

@@ -301,8 +301,8 @@ msgstr "Transactie gegevens"
#. module: account_banking
#: field:banking.import.transaction,execution_date:0
msgid "execution_date"
msgstr "execution_date"
msgid "Posted date"
msgstr "Boekdatum"
#. module: account_banking
#: field:banking.import.line,account_id:0
@@ -822,9 +822,9 @@ msgid "Payment Difference"
msgstr "Betaalverschil"
#. module: account_banking
#: field:banking.import.transaction,effective_date:0
msgid "effective_date"
msgstr "effective_date"
#: field:banking.import.transaction,value_date:0
msgid "Value date"
msgstr "valutadatum"
#. module: account_banking
#: view:account.bank.statement.line:0

View File

@@ -801,8 +801,8 @@ msgid "Payment Difference"
msgstr ""
#. module: account_banking
#: field:banking.import.transaction,effective_date:0
msgid "effective_date"
#: field:banking.import.transaction,value_date:0
msgid "value_date"
msgstr ""
#. module: account_banking

View File

@@ -801,8 +801,8 @@ msgid "Payment Difference"
msgstr ""
#. module: account_banking
#: field:banking.import.transaction,effective_date:0
msgid "effective_date"
#: field:banking.import.transaction,value_date:0
msgid "value_date"
msgstr ""
#. module: account_banking

View File

@@ -801,8 +801,8 @@ msgid "Payment Difference"
msgstr ""
#. module: account_banking
#: field:banking.import.transaction,effective_date:0
msgid "effective_date"
#: field:banking.import.transaction,value_date:0
msgid "value_date"
msgstr ""
#. module: account_banking

View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Therp BV (<http://therp.nl>).
# All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
def migrate(cr, version):
if not version:
return
# Rename value date column
cr.execute(
"""
ALTER TABLE banking_import_transaction
RENAME COLUMN effective_date TO value_date
""")

View File

@@ -88,7 +88,7 @@ class mem_bank_transaction(object):
'execution_date',
# The posted date of the action
'effective_date',
'value_date',
# The value date of the action
'remote_account',

View File

@@ -182,7 +182,7 @@ CAMT Format parser
"""
entry_details = {
'execution_date': self.xpath(node, './ns:BookgDt/ns:Dt')[0].text,
'effective_date': self.xpath(node, './ns:ValDt/ns:Dt')[0].text,
'value_date': self.xpath(node, './ns:ValDt/ns:Dt')[0].text,
'transfer_type': self.get_transfer_type(node),
'transferred_amount': self.parse_amount(node)
}

View File

@@ -39,7 +39,7 @@ class transaction(models.mem_bank_transaction):
"remote_currency": "currency",
"transferred_amount": "amount",
"execution_date": "recorddate",
"effective_date": "paymentdate",
"value_date": "paymentdate",
"transfer_type": "eventtype",
"reference": "refnr",
"eventcode": "eventcode",

View File

@@ -67,7 +67,7 @@ class transaction_message(object):
self.transferred_amount = float(
self.transferred_amount.replace(',', '.'))
self.execution_date = str2date(self.date, '%Y%m%d')
self.effective_date = str2date(self.date, '%Y%m%d')
self.value_date = str2date(self.date, '%Y%m%d')
# Set statement_id based on week number
self.statement_id = self.execution_date.strftime('%Yw%W')
self.id = str(subno).zfill(4)
@@ -77,7 +77,7 @@ class transaction(models.mem_bank_transaction):
Implementation of transaction communication class for account_banking.
'''
attrnames = ['local_account', 'local_currency', 'transferred_amount',
'blob', 'execution_date', 'effective_date', 'id',
'blob', 'execution_date', 'value_date', 'id',
]
type_map = {

View File

@@ -120,7 +120,7 @@ class transaction_message(object):
self.remote_account = self.remote_account.zfill(10)
else:
self.remote_account = False
self.execution_date = self.effective_date = self.date
self.execution_date = self.value_date = self.date
self.remote_owner = self.remote_owner.rstrip()
self.message = self.message.rstrip()
self.genid()
@@ -137,7 +137,7 @@ class transaction(models.mem_bank_transaction):
'''
attrnames = [ 'statement_id', 'remote_account', 'remote_owner',
'remote_currency', 'transferred_amount', 'execution_date',
'effective_date', 'transfer_type', 'message',
'value_date', 'transfer_type', 'message',
]
type_map = {

View File

@@ -68,10 +68,10 @@ class transaction_message(object):
if self.debcred == 'Af':
self.transferred_amount = -self.transferred_amount
try:
self.execution_date = self.effective_date = str2date(self.date, '%Y%m%d')
self.execution_date = self.value_date = str2date(self.date, '%Y%m%d')
except ValueError:
self.execution_date = self.effective_date = str2date(self.date, '%d-%m-%Y')
self.statement_id = '' #self.effective_date.strftime('%Yw%W')
self.execution_date = self.value_date = str2date(self.date, '%d-%m-%Y')
self.statement_id = '' #self.value_date.strftime('%Yw%W')
self.id = str(subno).zfill(4)
self.reference = ''
# Normalize basic account numbers
@@ -85,7 +85,7 @@ class transaction(models.mem_bank_transaction):
'''
attrnames = ['local_account', 'remote_account',
'remote_owner', 'transferred_amount',
'execution_date', 'effective_date', 'transfer_type',
'execution_date', 'value_date', 'transfer_type',
'id', 'reference', 'statement_id', 'message',
]

View File

@@ -44,7 +44,7 @@ class transaction_message(object):
attrnames = [
'date', 'local_account', 'remote_account', 'remote_owner', 'u1', 'u2',
'u3', 'local_currency', 'start_balance', 'remote_currency',
'transferred_amount', 'execution_date', 'effective_date', 'nr1',
'transferred_amount', 'execution_date', 'value_date', 'nr1',
'transfer_type', 'nr2', 'reference', 'message', 'statement_id'
]
@@ -82,7 +82,7 @@ class transaction_message(object):
self.start_balance = float(self.start_balance)
self.transferred_amount = float(self.transferred_amount)
self.execution_date = str2date(self.execution_date, '%d-%m-%Y')
self.effective_date = str2date(self.effective_date, '%d-%m-%Y')
self.value_date = str2date(self.value_date, '%d-%m-%Y')
self.id = str(subno).zfill(4)
class transaction(models.mem_bank_transaction):
@@ -91,7 +91,7 @@ class transaction(models.mem_bank_transaction):
'''
attrnames = ['local_account', 'local_currency', 'remote_account',
'remote_owner', 'remote_currency', 'transferred_amount',
'execution_date', 'effective_date', 'transfer_type',
'execution_date', 'value_date', 'transfer_type',
'reference', 'message', 'statement_id', 'id',
]
@@ -152,7 +152,7 @@ class transaction(models.mem_bank_transaction):
have their transfer_type set to 'OPN'.
'''
return (self.transferred_amount and self.execution_date and
self.effective_date) and (
self.value_date) and (
self.remote_account or
self.transfer_type in [
'KST', 'PRV', 'BTL', 'BEA', 'OPN', 'KNT', 'DIV',

View File

@@ -65,8 +65,8 @@ class transaction_message(object):
if self.debcred == 'Debet':
self.transferred_amount = -self.transferred_amount
self.execution_date = str2date(self.date, '%d-%m-%Y')
self.effective_date = str2date(self.date, '%d-%m-%Y')
self.statement_id = '' # self.effective_date.strftime('%Yw%W') # Set statement_id based on week number
self.value_date = str2date(self.date, '%d-%m-%Y')
self.statement_id = ''
self.id = str(subno).zfill(4)
# Normalize basic account numbers
self.remote_account = self.remote_account.replace('.', '').zfill(10)
@@ -78,7 +78,7 @@ class transaction(models.mem_bank_transaction):
'''
attrnames = ['local_account', 'remote_account',
'remote_owner', 'transferred_amount',
'execution_date', 'effective_date', 'transfer_type',
'execution_date', 'value_date', 'transfer_type',
'reference', 'id',
]

View File

@@ -40,7 +40,7 @@ class transaction(models.mem_bank_transaction):
mapping = {
'execution_date' : 'valuedate',
'effective_date' : 'valuedate',
'value_date' : 'valuedate',
'local_currency' : 'currency',
'transfer_type' : 'bookingcode',
'reference' : 'custrefno',