[DEL]All old object and views which are now useless

bzr revid: dle@openerp.com-20121205173801-9abvk3u03mxvwp91
This commit is contained in:
dle@openerp.com 2012-12-05 18:38:01 +01:00
parent 652f81427e
commit 4333defecd
16 changed files with 652 additions and 6276 deletions

View File

@ -20,7 +20,6 @@
#
##############################################################################
import l10n_be_coda
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -93,12 +93,6 @@ If required, you can manually adjust the descriptions via the CODA configuration
'depends': ['account_voucher','base_iban', 'l10n_be_invoice_bba', 'account_bank_statement_extensions'],
'demo': [],
'data': [
'l10n_be_coda_trans_type.xml',
'l10n_be_coda_trans_code.xml',
'l10n_be_coda_trans_category.xml',
'l10n_be_coda_comm_type.xml',
'security/ir.model.access.csv',
'security/account_security.xml',
'l10n_be_coda_wizard.xml',
'l10n_be_coda_view.xml',
],

View File

@ -1,499 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2012 Noviat nv/sa (www.noviat.be). 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/>.
#
##############################################################################
from osv import osv, fields
import decimal_precision as dp
from tools.translate import _
import logging
_logger = logging.getLogger(__name__)
class coda_bank_account(osv.osv):
_name = 'coda.bank.account'
_description = 'CODA Bank Account Configuration'
def _check_account_pain(self, cr, uid, context=None):
res = self.pool.get('ir.module.module').search(cr, uid, [('name', '=', 'account_pain'), ('state', '=', 'installed')])
return res and True or False
def _check_currency(self, cr, uid, ids, context=None):
obj_cba = self.browse(cr, uid, ids[0], context=context)
if (obj_cba.state == 'normal') and obj_cba.journal:
if obj_cba.journal.currency and (obj_cba.currency != obj_cba.journal.currency):
return False
if not obj_cba.journal.currency and (obj_cba.currency != obj_cba.company_id.currency_id):
return False
return True
_columns = {
'name': fields.char('Name', size=64, required=True),
'bank_id': fields.many2one('res.partner.bank', 'Bank Account', required=True,
help='Bank Account Number.\nThe CODA import function will find its CODA processing parameters on this number.'),
'description1': fields.char('Primary Account Description', size=35,
help='The Primary or Secondary Account Description should match the corresponding Account Description in the CODA file.'),
'description2': fields.char('Secondary Account Description', size=35,
help='The Primary or Secondary Account Description should match the corresponding Account Description in the CODA file.'),
'state': fields.selection([
('normal', 'Normal'),
('info', 'Info')],
'Type', required=True, select=1,
help='No Bank Statements will be generated for CODA Bank Statements from Bank Accounts of type \'Info\'.'),
'journal': fields.many2one('account.journal', 'Journal',
domain=[('type', '=', 'bank')],
states={'normal': [('required', True)], 'info': [('required', False)]},
help='Bank Journal for the Bank Statement'),
'currency': fields.many2one('res.currency', 'Currency', required=True,
help='The currency of the CODA Bank Statement'),
'coda_st_naming': fields.char('Bank Statement Naming Policy', size=64,
help="Define the rules to create the name of the Bank Statements generated by the CODA processing." \
"\nE.g. %(code)s%(y)s/%(paper)s" \
"\n\nVariables:" \
"\nBank Journal Code: %(code)s" \
"\nYear (of CODA 'New Balance Date') with Century: %(year)s" \
"\nYear (of CODA 'New Balance Date') without Century: %(y)s" \
"\nCODA sequence number: %(coda)s" \
"\nPaper Statement sequence number (as specified on 'Old Balance' record): %(paper_ob)s" \
"\nPaper Statement sequence number (as specified on 'New Balance' record): %(paper)s"),
'awaiting_account': fields.many2one('account.account', 'Default Account for Unrecognized Movement', domain=[('type', '!=', 'view')], required=True,
help='Set here the default account that will be used if the partner cannot be unambiguously identified.'),
'transfer_account': fields.many2one('account.account', 'Default Internal Transfer Account', domain=[('code', 'like', '58%'), ('type', '!=', 'view')], required=True,
help='Set here the default account that will be used for internal transfer between own bank accounts (e.g. transfer between current and deposit bank accounts).'),
'account_mapping_ids': fields.one2many('coda.account.mapping.rule', 'coda_bank_account_id', 'Account Mapping Rules'),
'find_payment': fields.boolean('Lookup Payment Reference',
help='Invoice lookup and reconciliation via the SEPA EndToEndReference.' \
'\nInstall the \'account_pain\' module if you want to take advantage of this feature.'),
'find_bbacom': fields.boolean('Lookup Structured Communication of type \'BBA\'',
help='Partner lookup and reconciliation via the \'BBA\' Structured Communication.' \
'\nA partial reconciliation will be created when there is no exact match between the Invoice and Bank Transaction amounts.'),
'find_inv_number': fields.boolean('Lookup Invoice Number',
help='Partner lookup and reconciliation via the Invoice Number when a communication in free format is used.' \
'\nA reconciliation will only be created in case of exact match between the Invoice and Bank Transaction amounts.'),
'find_partner': fields.boolean('Lookup Partner',
help='Partner lookup via Bank Account Number in order to facilitate the reconciliation.'),
'update_partner': fields.boolean('Update Partner Bank Accounts',
help='Update Partner record when the Counterparty\'s Bank Account has not been registered yet.'),
'balance_start_enforce': fields.boolean('Prevent invalid Opening Balances',
help="Do not process Statements with an Opening Balance that doesn't match the previous Closing Balance."),
'discard_dup': fields.boolean('Discard Duplicates',
help="Duplicate Bank Statements will be discarded. Select the corresponding 'CODA Bank Statement' in order to view the contents of such duplicates."),
'active': fields.boolean('Active', help='If the active field is set to False, it will allow you to hide the Bank Account without removing it.'),
'company_id': fields.many2one('res.company', 'Company', required=True),
}
_defaults = {
'currency': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
'state': 'normal',
'coda_st_naming': '%(code)s/%(y)s/%(coda)s',
'active': True,
'find_payment': _check_account_pain,
'find_bbacom': True,
'find_inv_number': True,
'find_partner': True,
'update_partner': True,
'balance_start_enforce': True,
'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
}
_sql_constraints = [
('account_uniq_1', 'unique (bank_id, description1, currency)', 'The combination of Bank Account, Account Description and Currency must be unique !'),
('account_uniq_2', 'unique (bank_id, description2, currency)', 'The combination of Bank Account, Account Description and Currency must be unique !'),
]
_constraints = [
(_check_currency, '\n\nConfiguration Error! \nThe Bank Account Currency should match the Journal Currency !', ['currency', 'journal']),
]
_order = 'name'
def name_get(self, cr, uid, ids, context=None):
res = []
if not len(ids):
return res
for id in self.browse(cr, uid, ids, context=context):
res.append((id.id, (id.bank_id.iban or id.bank_id.acc_number) + ' (' + id.currency.name + ')' + \
(id.description1 and (' - ' + id.description1) or '')))
return res
def copy(self, cr, uid, id, default=None, context=None):
cba = self.browse(cr, uid, id, context=context)
if not default:
default = {}
default = default.copy()
default.update({'journal_id': None})
default['description1'] = cba['description1'] or ''
default['description2'] = cba['description2'] or ''
default['name'] = (cba['name'] or '') + ' (copy)'
default['state'] = cba['state']
return super(coda_bank_account, self).copy(cr, uid, id, default, context)
def onchange_state(self, cr, uid, ids, state):
return state == 'info' and {'value': {'journal': None}} or {}
coda_bank_account()
class account_coda(osv.osv):
_name = 'account.coda'
_description = 'Object to store CODA Data Files'
_order = 'coda_creation_date desc'
_columns = {
'name': fields.char('CODA Filename', size=128, readonly=True),
'coda_data': fields.binary('CODA File', readonly=True),
'statement_ids': fields.one2many('coda.bank.statement', 'coda_id', 'Generated CODA Bank Statements', readonly=True),
'note': fields.text('Import Log', readonly=True),
'coda_creation_date': fields.date('CODA Creation Date', readonly=True, select=True),
'date': fields.date('Import Date', readonly=True, select=True),
'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True)
}
_defaults = {
'date': fields.date.context_today,
'user_id': lambda self, cr, uid, context: uid,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account.coda', context=c),
}
_sql_constraints = [
('coda_uniq', 'unique (name, coda_creation_date)', 'This CODA has already been imported !')
]
def unlink(self, cr, uid, ids, context=None):
if context is None:
context = {}
context.update({'coda_unlink': True})
coda_st_obj = self.pool.get('coda.bank.statement')
bank_st_obj = self.pool.get('account.bank.statement')
for coda in self.browse(cr, uid, ids, context=context):
for coda_statement in coda.statement_ids:
if not context.get('coda_statement_unlink', False):
if coda_st_obj.exists(cr, uid, coda_statement.id, context=context):
coda_st_obj.unlink(cr, uid, [coda_statement.id], context=context)
if not context.get('bank_statement_unlink', False):
if coda_st_obj.exists(cr, uid, coda_statement.id, context=context) and (coda_statement.type == 'normal') and bank_st_obj.exists(cr, uid, coda_statement.statement_id.id, context=context):
bank_st_obj.unlink(cr, uid, [coda_statement.statement_id.id], context=context)
context.update({'coda_unlink': False})
return super(account_coda, self).unlink(cr, uid, ids, context=context)
account_coda()
class account_coda_trans_type(osv.osv):
_name = 'account.coda.trans.type'
_description = 'CODA transaction type'
_rec_name = 'type'
_columns = {
'type': fields.char('Transaction Type', size=1, required=True),
'parent_id': fields.many2one('account.coda.trans.type', 'Parent'),
'description': fields.text('Description', translate=True),
}
account_coda_trans_type()
class account_coda_trans_code(osv.osv):
_name = 'account.coda.trans.code'
_description = 'CODA transaction code'
_rec_name = 'code'
_columns = {
'code': fields.char('Code', size=2, required=True, select=1),
'type': fields.selection([
('code', 'Transaction Code'),
('family', 'Transaction Family')],
'Type', required=True, select=1),
'parent_id': fields.many2one('account.coda.trans.code', 'Family', select=1),
'description': fields.char('Description', size=128, translate=True, select=2),
'comment': fields.text('Comment', translate=True),
}
account_coda_trans_code()
class account_coda_trans_category(osv.osv):
_name = 'account.coda.trans.category'
_description = 'CODA transaction category'
_rec_name = 'category'
_columns = {
'category': fields.char('Transaction Category', size=3, required=True),
'description': fields.char('Description', size=256, translate=True),
}
account_coda_trans_category()
class account_coda_comm_type(osv.osv):
_name = 'account.coda.comm.type'
_description = 'CODA structured communication type'
_rec_name = 'code'
_columns = {
'code': fields.char('Structured Communication Type', size=3, required=True, select=1),
'description': fields.char('Description', size=128, translate=True),
}
_sql_constraints = [
('code_uniq', 'unique (code)', 'The Structured Communication Code must be unique !')
]
account_coda_comm_type()
class coda_bank_statement(osv.osv):
_name = 'coda.bank.statement'
_description = 'CODA Bank Statement'
def _default_journal_id(self, cr, uid, context={}):
if context.get('journal_id', False):
return context['journal_id']
return False
def _end_balance(self, cursor, user, ids, name, attr, context=None):
res = {}
statements = self.browse(cursor, user, ids, context=context)
for statement in statements:
res[statement.id] = statement.balance_start
for line in statement.line_ids:
res[statement.id] += line.amount
for r in res:
res[r] = round(res[r], 2)
return res
def _get_period(self, cr, uid, context={}):
periods = self.pool.get('account.period').find(cr, uid)
if periods:
return periods[0]
else:
return False
_order = 'date desc'
_columns = {
'name': fields.char('Name', size=64, required=True, readonly=True),
'date': fields.date('Date', required=True, readonly=True),
'coda_creation_date': fields.date('CODA Creation Date', readonly=True),
'old_balance_date': fields.date('Old Balance Date', readonly=True),
'new_balance_date': fields.date('New Balance Date', readonly=True),
'coda_id': fields.many2one('account.coda', 'CODA Data File', ondelete='cascade'),
'type': fields.selection([
('normal', 'Normal'),
('info', 'Info')],
'Type', required=True, readonly=True,
help='No Bank Statements are associated with CODA Bank Statements of type \'Info\'.'),
'statement_id': fields.many2one('account.bank.statement', 'Associated Bank Statement'),
'journal_id': fields.many2one('account.journal', 'Journal', readonly=True, domain=[('type', '=', 'bank')]),
'coda_bank_account_id': fields.many2one('coda.bank.account', 'Bank Account', readonly=True),
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True),
'balance_start': fields.float('Starting Balance', digits_compute=dp.get_precision('Account'), readonly=True),
'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Account'), readonly=True),
'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance'),
'line_ids': fields.one2many('coda.bank.statement.line',
'statement_id', 'CODA Bank Statement lines', readonly=True),
'currency': fields.many2one('res.currency', 'Currency', required=True, readonly=True,
help='The currency of the CODA Bank Statement'),
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
}
_defaults = {
'type': 'normal',
'currency': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
'journal_id': _default_journal_id,
'period_id': _get_period,
}
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
if context is None:
context = {}
res = super(coda_bank_statement, self).search(cr, uid, args=args, offset=offset, limit=limit, order=order,
context=context, count=count)
if context.get('bank_statement', False) and not res:
raise osv.except_osv('Warning', _('No CODA Bank Statement found for this Bank Statement!'))
return res
def unlink(self, cr, uid, ids, context=None):
if context is None:
context = {}
context.update({'coda_statement_unlink': True})
coda_obj = self.pool.get('account.coda')
bank_st_obj = self.pool.get('account.bank.statement')
# find all CODA bank statements that are associated with the selected CODA bank statements via a common CODA file
new_ids = []
for coda_statement in self.browse(cr, uid, ids, context=context):
if coda_obj.exists(cr, uid, coda_statement.coda_id.id, context=context):
new_ids += [x.id for x in coda_obj.browse(cr, uid, coda_statement.coda_id.id, context=context).statement_ids]
# unlink CODA banks statements as well as associated bank statements and CODA files
for coda_statement in self.browse(cr, uid, new_ids, context=context):
if coda_statement.statement_id.state == 'confirm':
raise osv.except_osv(_('Invalid action !'),
_("Cannot delete CODA Bank Statement '%s' of Journal '%s'." \
"\nThe associated Bank Statement has already been confirmed !" \
"\nPlease undo this action first!") \
% (coda_statement.name, coda_statement.journal_id.name))
else:
if not context.get('coda_unlink', False):
if coda_statement.coda_id and coda_obj.exists(cr, uid, coda_statement.coda_id.id, context=context):
coda_obj.unlink(cr, uid, [coda_statement.coda_id.id], context=context)
if not context.get('bank_statement_unlink', False):
if coda_statement.statement_id and bank_st_obj.exists(cr, uid, coda_statement.statement_id.id, context=context):
bank_st_obj.unlink(cr, uid, [coda_statement.statement_id.id], context=context)
context.update({'coda_statement_unlink': False})
return super(coda_bank_statement, self).unlink(cr, uid, new_ids, context=context)
coda_bank_statement()
class account_bank_statement(osv.osv):
_inherit = 'account.bank.statement'
_columns = {
'coda_statement_id': fields.many2one('coda.bank.statement', 'Associated CODA Bank Statement'),
}
# _sql_constraints = [
# ('name_company_uniq', 'unique (name,company_id)', 'The name of the Bank Statement must be unique per company !')
# ]
def unlink(self, cr, uid, ids, context=None):
if context is None:
context = {}
context.update({'bank_statement_unlink': True})
coda_obj = self.pool.get('account.coda')
coda_st_obj = self.pool.get('coda.bank.statement')
# find all statements that are associated with the selected bank statements via a common CODA file
ids_plus = []
for statement in self.browse(cr, uid, ids, context=context):
if statement.coda_statement_id:
for x in coda_obj.browse(cr, uid, statement.coda_statement_id.coda_id.id, context=context).statement_ids:
if x.type == 'normal':
ids_plus += [x.statement_id.id]
# unlink banks statements as well as associated CODA bank statements and CODA files
for statement in self.browse(cr, uid, ids_plus, context=context):
if not context.get('coda_statement_unlink', False):
if statement.coda_statement_id and coda_st_obj.exists(cr, uid, statement.coda_statement_id.id, context=context):
coda_st_obj.unlink(cr, uid, [statement.coda_statement_id.id], context=context)
if not context.get('coda_unlink', False):
if statement.coda_statement_id \
and coda_st_obj.exists(cr, uid, statement.coda_statement_id.id, context=context) \
and statement.coda_statement_id.coda_id \
and coda_obj.exists(cr, uid, statement.coda_statement_id.coda_id.id, context=context):
coda_obj.unlink(cr, uid, [statement.coda_statement_id.coda_id.id], context=context)
context.update({'bank_statement_unlink': False})
new_ids = list(set(ids + ids_plus))
return super(account_bank_statement, self).unlink(cr, uid, new_ids, context=context)
account_bank_statement()
class coda_bank_statement_line(osv.osv):
_name = 'coda.bank.statement.line'
_order = 'sequence'
_description = 'CODA Bank Statement Line'
_columns = {
'name': fields.char('Communication', size=268, required=True),
'sequence': fields.integer('Sequence'),
'date': fields.date('Entry Date', required=True),
'val_date': fields.date('Valuta Date'),
'account_id': fields.many2one('account.account', 'Account'),
'type': fields.selection([
('supplier', 'Supplier'),
('customer', 'Customer'),
('general', 'General'),
('globalisation', 'Globalisation'),
('information', 'Information'),
('communication', 'Free Communication'),
], 'Type', required=True),
'globalisation_level': fields.integer('Globalisation Level',
help="The value which is mentioned (1 to 9), specifies the hierarchy level"
" of the globalisation of which this record is the first."
"\nThe same code will be repeated at the end of the globalisation."),
'globalisation_amount': fields.float('Globalisation Amount', digits_compute=dp.get_precision('Account')),
'globalisation_id': fields.many2one('account.bank.statement.line.global', 'Globalisation ID', readonly=True,
help="Code to identify transactions belonging to the same globalisation level within a batch payment"),
'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
'partner_id': fields.many2one('res.partner', 'Partner'),
'counterparty_name': fields.char('Counterparty Name', size=35),
'counterparty_bic': fields.char('Counterparty BIC', size=11),
'counterparty_number': fields.char('Counterparty Number', size=34),
'counterparty_currency': fields.char('Counterparty Currency', size=3),
'payment_reference': fields.char('Payment Reference', size=35,
help="Payment Reference. For SEPA (SCT or SDD) transactions, the PaymentInformationIdentification "\
"is recorded in this field pertaining to a globalisation, and the EndToEndReference for " \
"simple transactions or for the details of a globalisation."),
'statement_id': fields.many2one('coda.bank.statement', 'CODA Bank Statement',
select=True, required=True, ondelete='cascade'),
'coda_bank_account_id': fields.related('statement_id', 'coda_bank_account_id', type='many2one', relation='coda.bank.account', string='Bank Account', store=True, readonly=True),
'ref': fields.char('Reference', size=32),
'note': fields.text('Notes'),
'company_id': fields.related('statement_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
}
#TODO : Check this function. account_bank_statement_line Seems undefined : )
def unlink(self, cr, uid, ids, context=None):
if context is None:
context = {}
if context.get('block_statement_line_delete', False):
raise osv.except_osv('Warning', _('Delete operation not allowed !'))
return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
coda_bank_statement_line()
class account_bank_statement_line_global(osv.osv):
_inherit = 'account.bank.statement.line.global'
_columns = {
'coda_statement_line_ids': fields.one2many('coda.bank.statement.line', 'globalisation_id', 'CODA Bank Statement Lines', readonly=True),
}
account_bank_statement_line_global()
class coda_account_mapping_rule(osv.osv):
_name = 'coda.account.mapping.rule'
_description = 'Rules Engine to assign accounts during CODA parsing'
_order = 'sequence'
_columns = {
'coda_bank_account_id': fields.many2one('coda.bank.account', 'CODA Bank Account', ondelete='cascade'),
'sequence': fields.integer('Sequence', help='Determines the order of the rules to assign accounts'),
'name': fields.char('Rule Name', size=128, required=True),
# matching criteria
'trans_type_id': fields.many2one('account.coda.trans.type', 'Transaction Type'),
'trans_family_id': fields.many2one('account.coda.trans.code', 'Transaction Family', domain=[('type', '=', 'family')]),
'trans_code_id': fields.many2one('account.coda.trans.code', 'Transaction Code', domain=[('type', '=', 'code')]),
'trans_category_id': fields.many2one('account.coda.trans.category', 'Transaction Category'),
'struct_comm_type_id': fields.many2one('account.coda.comm.type', 'Structured Communication Type'),
'partner_id': fields.many2one('res.partner', 'Partner', ondelete='cascade'),
# resulting general account
'account_id': fields.many2one('account.account', 'Account', ondelete='cascade', required=True, domain=[('type', '!=', 'view')]),
'active': fields.boolean('Active', help='Switch on/off this rule.'),
}
_defaults = {
'active': True,
}
def account_id_get(self, cr, uid, coda_bank_account_id, trans_type_id=None, trans_family_id=None,
trans_code_id=None, trans_category_id=None, struct_comm_type_id=None, partner_id=None, context=None):
cr.execute('SELECT account_id, trans_type_id, trans_family_id, trans_code_id, trans_category_id, struct_comm_type_id, partner_id ' \
'FROM coda_account_mapping_rule ' \
'WHERE active = TRUE AND coda_bank_account_id = %s ' \
'ORDER BY sequence' % coda_bank_account_id
)
rules = cr.fetchall()
condition = '(not rule[1] or (trans_type_id == rule[1])) and (not rule[2] or (trans_family_id == rule[2])) ' \
'and (not rule[3] or (trans_code_id == rule[3])) and (not rule[4] or (trans_category_id == rule[4])) ' \
'and (not rule[5] or (struct_comm_type_id == rule[5])) and (not rule[6] or (partner_id == rule[6]))'
account_id = None
for rule in rules:
if eval(condition):
account_id = rule[0]
break
return account_id
coda_account_mapping_rule()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,140 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- account.coda.comm.type -->
<record id="acct_001" model="account.coda.comm.type">
<field name="code">001</field>
<field name="description">Data concerning the counterparty</field>
</record>
<record id="acct_002" model="account.coda.comm.type">
<field name="code">002</field>
<field name="description">Communication of the bank</field>
</record>
<record id="acct_003" model="account.coda.comm.type">
<field name="code">003</field>
<field name="description">RBP data</field>
</record>
<record id="acct_004" model="account.coda.comm.type">
<field name="code">004</field>
<field name="description">Counterpartys banker</field>
</record>
<record id="acct_005" model="account.coda.comm.type">
<field name="code">005</field>
<field name="description">Data concerning the correspondent</field>
</record>
<record id="acct_006" model="account.coda.comm.type">
<field name="code">006</field>
<field name="description">Information concerning the detail amount</field>
</record>
<record id="acct_007" model="account.coda.comm.type">
<field name="code">007</field>
<field name="description">Information concerning the detail cash</field>
</record>
<record id="acct_008" model="account.coda.comm.type">
<field name="code">008</field>
<field name="description">Identification of the de ultimate beneficiary/creditor (SEPA SCT/SDD)</field>
</record>
<record id="acct_009" model="account.coda.comm.type">
<field name="code">009</field>
<field name="description">Identification of the de ultimate ordering customer/debtor (SEPA SCT/SDD)</field>
</record>
<record id="acct_010" model="account.coda.comm.type">
<field name="code">010</field>
<field name="description">Information pertaining to sale or purchase of securities</field>
</record>
<record id="acct_011" model="account.coda.comm.type">
<field name="code">011</field>
<field name="description">Information pertaining to coupons</field>
</record>
<record id="acct_100" model="account.coda.comm.type">
<field name="code">100</field>
<field name="description">(SEPA) payment with a structured format communication applying the ISO standard 11649: Structured creditor reference to remittance information</field>
</record>
<record id="acct_101" model="account.coda.comm.type">
<field name="code">101</field>
<field name="description">Credit transfer or cash payment with structured format communication</field>
</record>
<record id="acct_102" model="account.coda.comm.type">
<field name="code">102</field>
<field name="description">Credit transfer or cash payment with reconstituted structured format communication</field>
</record>
<record id="acct_103" model="account.coda.comm.type">
<field name="code">103</field>
<field name="description">number (e.g. of the cheque, of the card, etc.)</field>
</record>
<record id="acct_104" model="account.coda.comm.type">
<field name="code">104</field>
<field name="description">Equivalent in EUR</field>
</record>
<record id="acct_105" model="account.coda.comm.type">
<field name="code">105</field>
<field name="description">original amount of the transaction</field>
</record>
<record id="acct_106" model="account.coda.comm.type">
<field name="code">106</field>
<field name="description">Method of calculation (VAT, withholding tax on income, commission, etc.)</field>
</record>
<record id="acct_107" model="account.coda.comm.type">
<field name="code">107</field>
<field name="description">Direct debit DOM80</field>
</record>
<record id="acct_108" model="account.coda.comm.type">
<field name="code">108</field>
<field name="description">Closing</field>
</record>
<record id="acct_111" model="account.coda.comm.type">
<field name="code">111</field>
<field name="description">POS credit Globalisation</field>
</record>
<record id="acct_112" model="account.coda.comm.type">
<field name="code">112</field>
<field name="description">ATM payment (usually Eurocheque card)</field>
</record>
<record id="acct_113" model="account.coda.comm.type">
<field name="code">113</field>
<field name="description">ATM/POS debit</field>
</record>
<record id="acct_114" model="account.coda.comm.type">
<field name="code">114</field>
<field name="description">POS credit - individual transaction</field>
</record>
<record id="acct_115" model="account.coda.comm.type">
<field name="code">115</field>
<field name="description">Terminal cash deposit</field>
</record>
<record id="acct_120" model="account.coda.comm.type">
<field name="code">120</field>
<field name="description">Correction of a transaction</field>
</record>
<record id="acct_121" model="account.coda.comm.type">
<field name="code">121</field>
<field name="description">Commercial bills</field>
</record>
<record id="acct_122" model="account.coda.comm.type">
<field name="code">122</field>
<field name="description">Bills - calculation of interest</field>
</record>
<record id="acct_123" model="account.coda.comm.type">
<field name="code">123</field>
<field name="description">Fees and commissions</field>
</record>
<record id="acct_124" model="account.coda.comm.type">
<field name="code">124</field>
<field name="description">Number of the credit card</field>
</record>
<record id="acct_125" model="account.coda.comm.type">
<field name="code">125</field>
<field name="description">Credit</field>
</record>
<record id="acct_126" model="account.coda.comm.type">
<field name="code">126</field>
<field name="description">Term investments</field>
</record>
<record id="acct_127" model="account.coda.comm.type">
<field name="code">127</field>
<field name="description">European direct debit (SEPA)</field>
</record>
</data>
</openerp>

View File

@ -1,440 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- account.coda.trans.category -->
<record id="actrca_000" model="account.coda.trans.category">
<field name="category">000</field>
<field name="description">Net amount</field>
</record>
<record id="actrca_001" model="account.coda.trans.category">
<field name="category">001</field>
<field name="description">Interest received</field>
</record>
<record id="actrca_002" model="account.coda.trans.category">
<field name="category">002</field>
<field name="description">Interest paid</field>
</record>
<record id="actrca_003" model="account.coda.trans.category">
<field name="category">003</field>
<field name="description">Credit commission</field>
</record>
<record id="actrca_004" model="account.coda.trans.category">
<field name="category">004</field>
<field name="description">Postage</field>
</record>
<record id="actrca_005" model="account.coda.trans.category">
<field name="category">005</field>
<field name="description">Renting of letterbox</field>
</record>
<record id="actrca_006" model="account.coda.trans.category">
<field name="category">006</field>
<field name="description">Various fees/commissions</field>
</record>
<record id="actrca_007" model="account.coda.trans.category">
<field name="category">007</field>
<field name="description">Access right to database</field>
</record>
<record id="actrca_008" model="account.coda.trans.category">
<field name="category">008</field>
<field name="description">Information charges</field>
</record>
<record id="actrca_009" model="account.coda.trans.category">
<field name="category">009</field>
<field name="description">Travelling expenses</field>
</record>
<record id="actrca_010" model="account.coda.trans.category">
<field name="category">010</field>
<field name="description">Writ service fee</field>
</record>
<record id="actrca_011" model="account.coda.trans.category">
<field name="category">011</field>
<field name="description">VAT</field>
</record>
<record id="actrca_012" model="account.coda.trans.category">
<field name="category">012</field>
<field name="description">Exchange commission</field>
</record>
<record id="actrca_013" model="account.coda.trans.category">
<field name="category">013</field>
<field name="description">Payment commission</field>
</record>
<record id="actrca_014" model="account.coda.trans.category">
<field name="category">014</field>
<field name="description">Collection commission</field>
</record>
<record id="actrca_015" model="account.coda.trans.category">
<field name="category">015</field>
<field name="description">Correspondent charges</field>
</record>
<record id="actrca_016" model="account.coda.trans.category">
<field name="category">016</field>
<field name="description">BLIW/IBLC dues</field>
</record>
<record id="actrca_017" model="account.coda.trans.category">
<field name="category">017</field>
<field name="description">Research costs</field>
</record>
<record id="actrca_018" model="account.coda.trans.category">
<field name="category">018</field>
<field name="description">Tental guarantee charges</field>
</record>
<record id="actrca_019" model="account.coda.trans.category">
<field name="category">019</field>
<field name="description">Tax on physical delivery</field>
</record>
<record id="actrca_020" model="account.coda.trans.category">
<field name="category">020</field>
<field name="description">Costs of physical delivery</field>
</record>
<record id="actrca_021" model="account.coda.trans.category">
<field name="category">021</field>
<field name="description">Costs for drawing up a bank cheque</field>
</record>
<record id="actrca_022" model="account.coda.trans.category">
<field name="category">022</field>
<field name="description">Priority costs</field>
</record>
<record id="actrca_023" model="account.coda.trans.category">
<field name="category">023</field>
<field name="description">Exercising fee</field>
</record>
<record id="actrca_024" model="account.coda.trans.category">
<field name="category">024</field>
<field name="description">Growth premium</field>
</record>
<record id="actrca_025" model="account.coda.trans.category">
<field name="category">025</field>
<field name="description">Individual entry for exchange charges</field>
</record>
<record id="actrca_026" model="account.coda.trans.category">
<field name="category">026</field>
<field name="description">Handling commission</field>
</record>
<record id="actrca_027" model="account.coda.trans.category">
<field name="category">027</field>
<field name="description">Charges for unpaid bills</field>
</record>
<record id="actrca_028" model="account.coda.trans.category">
<field name="category">028</field>
<field name="description">Fidelity premium</field>
</record>
<record id="actrca_029" model="account.coda.trans.category">
<field name="category">029</field>
<field name="description">Protest charges</field>
</record>
<record id="actrca_030" model="account.coda.trans.category">
<field name="category">030</field>
<field name="description">Account insurance</field>
</record>
<record id="actrca_031" model="account.coda.trans.category">
<field name="category">031</field>
<field name="description">Charges foreign cheque</field>
</record>
<record id="actrca_032" model="account.coda.trans.category">
<field name="category">032</field>
<field name="description">Drawing up a circular cheque</field>
</record>
<record id="actrca_033" model="account.coda.trans.category">
<field name="category">033</field>
<field name="description">Charges for a foreign bill</field>
</record>
<record id="actrca_034" model="account.coda.trans.category">
<field name="category">034</field>
<field name="description">Reinvestment fee</field>
</record>
<record id="actrca_035" model="account.coda.trans.category">
<field name="category">035</field>
<field name="description">Charges foreign documentary bill</field>
</record>
<record id="actrca_036" model="account.coda.trans.category">
<field name="category">036</field>
<field name="description">Costs relating to a refused cheque</field>
</record>
<record id="actrca_037" model="account.coda.trans.category">
<field name="category">037</field>
<field name="description">Commission for handling charges</field>
</record>
<record id="actrca_039" model="account.coda.trans.category">
<field name="category">039</field>
<field name="description">Telecommunications</field>
</record>
<record id="actrca_041" model="account.coda.trans.category">
<field name="category">041</field>
<field name="description">Credit card costs</field>
</record>
<record id="actrca_042" model="account.coda.trans.category">
<field name="category">042</field>
<field name="description">Payment card costs</field>
</record>
<record id="actrca_043" model="account.coda.trans.category">
<field name="category">043</field>
<field name="description">Insurance costs</field>
</record>
<record id="actrca_045" model="account.coda.trans.category">
<field name="category">045</field>
<field name="description">Handling costs</field>
</record>
<record id="actrca_047" model="account.coda.trans.category">
<field name="category">047</field>
<field name="description">Charges extension bill</field>
</record>
<record id="actrca_049" model="account.coda.trans.category">
<field name="category">049</field>
<field name="description">Fiscal stamps/stamp duty</field>
</record>
<record id="actrca_050" model="account.coda.trans.category">
<field name="category">050</field>
<field name="description">Capital term investment</field>
</record>
<record id="actrca_051" model="account.coda.trans.category">
<field name="category">051</field>
<field name="description">Withholding tax</field>
</record>
<record id="actrca_052" model="account.coda.trans.category">
<field name="category">052</field>
<field name="description">Residence state tax</field>
</record>
<record id="actrca_053" model="account.coda.trans.category">
<field name="category">053</field>
<field name="description">Printing of forms</field>
</record>
<record id="actrca_055" model="account.coda.trans.category">
<field name="category">055</field>
<field name="description">Repayment loan or credit capital</field>
</record>
<record id="actrca_057" model="account.coda.trans.category">
<field name="category">057</field>
<field name="description">Interest subsidy</field>
</record>
<record id="actrca_058" model="account.coda.trans.category">
<field name="category">058</field>
<field name="description">Capital premium</field>
</record>
<record id="actrca_059" model="account.coda.trans.category">
<field name="category">059</field>
<field name="description">Default interest</field>
</record>
<record id="actrca_061" model="account.coda.trans.category">
<field name="category">061</field>
<field name="description">Charging fees for transactions</field>
</record>
<record id="actrca_063" model="account.coda.trans.category">
<field name="category">063</field>
<field name="description">Rounding differences</field>
</record>
<record id="actrca_065" model="account.coda.trans.category">
<field name="category">065</field>
<field name="description">Interest payment advice</field>
</record>
<record id="actrca_066" model="account.coda.trans.category">
<field name="category">066</field>
<field name="description">Fixed loan advance - reimbursement</field>
</record>
<record id="actrca_067" model="account.coda.trans.category">
<field name="category">067</field>
<field name="description">Fixed loan advance - extension</field>
</record>
<record id="actrca_068" model="account.coda.trans.category">
<field name="category">068</field>
<field name="description">Countervalue of an entry</field>
</record>
<record id="actrca_069" model="account.coda.trans.category">
<field name="category">069</field>
<field name="description">Forward arbitrage contracts : sum to be supplied by customer</field>
</record>
<record id="actrca_070" model="account.coda.trans.category">
<field name="category">070</field>
<field name="description">Forward arbitrage contracts : sum to be supplied by bank</field>
</record>
<record id="actrca_071" model="account.coda.trans.category">
<field name="category">071</field>
<field name="description">Fixed loan advance - availability</field>
</record>
<record id="actrca_072" model="account.coda.trans.category">
<field name="category">072</field>
<field name="description">Countervalue of commission to third party</field>
</record>
<record id="actrca_073" model="account.coda.trans.category">
<field name="category">073</field>
<field name="description">Costs of ATM abroad</field>
</record>
<record id="actrca_074" model="account.coda.trans.category">
<field name="category">074</field>
<field name="description">Mailing costs</field>
</record>
<record id="actrca_100" model="account.coda.trans.category">
<field name="category">100</field>
<field name="description">Gross amount</field>
</record>
<record id="actrca_200" model="account.coda.trans.category">
<field name="category">200</field>
<field name="description">Overall documentary credit charges</field>
</record>
<record id="actrca_201" model="account.coda.trans.category">
<field name="category">201</field>
<field name="description">Advice notice commission</field>
</record>
<record id="actrca_202" model="account.coda.trans.category">
<field name="category">202</field>
<field name="description">Advising commission | Additional advising commission</field>
</record>
<record id="actrca_203" model="account.coda.trans.category">
<field name="category">203</field>
<field name="description">Confirmation fee | Additional confirmation fee | Commitment fee | Flat fee | Confirmation reservation commission | Additional reservation commission</field>
</record>
<record id="actrca_204" model="account.coda.trans.category">
<field name="category">204</field>
<field name="description">Amendment fee</field>
</record>
<record id="actrca_205" model="account.coda.trans.category">
<field name="category">205</field>
<field name="description">Documentary payment commission | Document commission | Drawdown fee | Negotiation fee</field>
</record>
<record id="actrca_206" model="account.coda.trans.category">
<field name="category">206</field>
<field name="description">Surety fee/payment under reserve</field>
</record>
<record id="actrca_207" model="account.coda.trans.category">
<field name="category">207</field>
<field name="description">Non-conformity fee</field>
</record>
<record id="actrca_208" model="account.coda.trans.category">
<field name="category">208</field>
<field name="description">Commitment fee deferred payment</field>
</record>
<record id="actrca_209" model="account.coda.trans.category">
<field name="category">209</field>
<field name="description">Transfer commission</field>
</record>
<record id="actrca_210" model="account.coda.trans.category">
<field name="category">210</field>
<field name="description">Commitment fee</field>
</record>
<record id="actrca_211" model="account.coda.trans.category">
<field name="category">211</field>
<field name="description">Credit arrangement fee | Additional credit arrangement fee</field>
</record>
<record id="actrca_212" model="account.coda.trans.category">
<field name="category">212</field>
<field name="description">Warehousing fee</field>
</record>
<record id="actrca_213" model="account.coda.trans.category">
<field name="category">213</field>
<field name="description">Financing fee</field>
</record>
<record id="actrca_214" model="account.coda.trans.category">
<field name="category">214</field>
<field name="description">Issue commission (delivery order)</field>
</record>
<record id="actrca_400" model="account.coda.trans.category">
<field name="category">400</field>
<field name="description">Acceptance fee</field>
</record>
<record id="actrca_401" model="account.coda.trans.category">
<field name="category">401</field>
<field name="description">Visa charges</field>
</record>
<record id="actrca_402" model="account.coda.trans.category">
<field name="category">402</field>
<field name="description">Certification costs</field>
</record>
<record id="actrca_403" model="account.coda.trans.category">
<field name="category">403</field>
<field name="description">Minimum discount rate</field>
</record>
<record id="actrca_404" model="account.coda.trans.category">
<field name="category">404</field>
<field name="description">Discount commission</field>
</record>
<record id="actrca_405" model="account.coda.trans.category">
<field name="category">405</field>
<field name="description">Bill guarantee commission</field>
</record>
<record id="actrca_406" model="account.coda.trans.category">
<field name="category">406</field>
<field name="description">Collection charges</field>
</record>
<record id="actrca_407" model="account.coda.trans.category">
<field name="category">407</field>
<field name="description">Costs Article 45</field>
</record>
<record id="actrca_408" model="account.coda.trans.category">
<field name="category">408</field>
<field name="description">Cover commission</field>
</record>
<record id="actrca_409" model="account.coda.trans.category">
<field name="category">409</field>
<field name="description">Safe deposit charges</field>
</record>
<record id="actrca_410" model="account.coda.trans.category">
<field name="category">410</field>
<field name="description">Reclamation charges</field>
</record>
<record id="actrca_411" model="account.coda.trans.category">
<field name="category">411</field>
<field name="description">Fixed collection charge</field>
</record>
<record id="actrca_412" model="account.coda.trans.category">
<field name="category">412</field>
<field name="description">Advice of expiry charges</field>
</record>
<record id="actrca_413" model="account.coda.trans.category">
<field name="category">413</field>
<field name="description">Acceptance charges</field>
</record>
<record id="actrca_414" model="account.coda.trans.category">
<field name="category">414</field>
<field name="description">Regularisation charges</field>
</record>
<record id="actrca_415" model="account.coda.trans.category">
<field name="category">415</field>
<field name="description">Surety fee</field>
</record>
<record id="actrca_416" model="account.coda.trans.category">
<field name="category">416</field>
<field name="description">Charges for the deposit of security</field>
</record>
<record id="actrca_418" model="account.coda.trans.category">
<field name="category">418</field>
<field name="description">Endorsement commission</field>
</record>
<record id="actrca_419" model="account.coda.trans.category">
<field name="category">419</field>
<field name="description">Bank service fee</field>
</record>
<record id="actrca_420" model="account.coda.trans.category">
<field name="category">420</field>
<field name="description">Retention charges</field>
</record>
<record id="actrca_425" model="account.coda.trans.category">
<field name="category">425</field>
<field name="description">Foreign broker's commission</field>
</record>
<record id="actrca_426" model="account.coda.trans.category">
<field name="category">426</field>
<field name="description">Belgian broker's commission</field>
</record>
<record id="actrca_427" model="account.coda.trans.category">
<field name="category">427</field>
<field name="description">Belgian Stock Exchange tax</field>
</record>
<record id="actrca_428" model="account.coda.trans.category">
<field name="category">428</field>
<field name="description">Interest accrued</field>
</record>
<record id="actrca_429" model="account.coda.trans.category">
<field name="category">429</field>
<field name="description">Foreign Stock Exchange tax</field>
</record>
<record id="actrca_430" model="account.coda.trans.category">
<field name="category">430</field>
<field name="description">Recovery of foreign tax</field>
</record>
<record id="actrca_431" model="account.coda.trans.category">
<field name="category">431</field>
<field name="description">Delivery of a copy</field>
</record>
</data>
</openerp>

File diff suppressed because it is too large Load Diff

View File

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- account.coda.trans.type -->
<record id="actt_0" model="account.coda.trans.type">
<field name="type">0</field>
<field name="description">Simple amount without detailed data; e.g. : an individual credit transfer (free of charges).</field>
</record>
<record id="actt_1" model="account.coda.trans.type">
<field name="type">1</field>
<field name="description">Amount as totalised by the customer; e.g. a file regrouping payments of wages or payments made to suppliers or a file regrouping collections for which the customer is debited or credited with one single amount. As a matter of principle, this type is also used when no detailed data is following (type 5).</field>
</record>
<record id="actt_5" model="account.coda.trans.type">
<field name="type">5</field>
<field name="parent_id" ref="actt_1"/>
<field name="description">Detail of 1. Standard procedure is no detailing. However, the customer may ask for detailed data to be included into his file after the overall record (type 1).</field>
</record>
<record id="actt_2" model="account.coda.trans.type">
<field name="type">2</field>
<field name="description">Amount as totalised by the bank; e.g. : the total amount of a series of credit transfers with a structured communication As a matter of principle, this type will also be used when no detailed data (type 6 or 7) is following.</field>
</record>
<record id="actt_6" model="account.coda.trans.type">
<field name="type">6</field>
<field name="parent_id" ref="actt_2"/>
<field name="description">Detail of 2. Simple amount without detailed data. Normally, data of this kind comes after type 2. The customer may ask for a separate file containing the detailed data. In that case, one will speak of a separate application. The records in a separate application keep type 6.</field>
</record>
<record id="actt_7" model="account.coda.trans.type">
<field name="type">7</field>
<field name="parent_id" ref="actt_2"/>
<field name="description">Detail of 2. Simple account with detailed data The records in a separate application keep type 7.</field>
</record>
<record id="actt_9" model="account.coda.trans.type">
<field name="type">9</field>
<field name="parent_id" ref="actt_7"/>
<field name="description">Detail of 7. The records in a separate application keep type 9.</field>
</record>
<record id="actt_3" model="account.coda.trans.type">
<field name="type">3</field>
<field name="description">Simple amount with detailed data; e.g. in case of charges for cross-border credit transfers.</field>
</record>
<record id="actt_8" model="account.coda.trans.type">
<field name="type">8</field>
<field name="parent_id" ref="actt_3"/>
<field name="description">Detail of 3.</field>
</record>
</data>
</openerp>

View File

@ -1,547 +1,6 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!-- CODA Configuration -->
<menuitem id="menu_manage_coda" name="CODA Configuration" parent="account.menu_finance_configuration" sequence="30"/>
<!-- CODA Bank Account Configuration -->
<record id="view_coda_bank_account_search" model="ir.ui.view">
<field name="name">coda.bank.account.search</field>
<field name="model">coda.bank.account</field>
<field name="arch" type="xml">
<search string="CODA Bank Account Configuration">
<filter string="Normal" domain="[('state','=','normal')]" icon="terp-folder-green"/>
<filter string="Info" domain="[('state','=','info')]" icon="terp-folder-yellow"/>
<field name="name"/>
<field name="bank_id"/>
<field name="description1"/>
<field name="journal"/>
<field name="currency" groups="base.group_multi_currency"/>
<field name="company_id" groups="base.group_multi_company"/>
<group expand="0" string="Group By...">
<filter string="Bank Account" icon="terp-folder-yellow" domain="[]" context="{'group_by':'bank_id'}"/>
<filter string="Currency" icon="terp-dolar" domain="[]" context="{'group_by':'currency'}" groups="base.group_multi_currency"/>
</group>
</search>
</field>
</record>
<record id="view_coda_bank_account_list" model="ir.ui.view">
<field name="name">coda.bank.account.list</field>
<field name="model">coda.bank.account</field>
<field name="arch" type="xml">
<tree string="CODA Bank Account Configuration">
<field name="name"/>
<field name="bank_id"/>
<field name="currency" groups="base.group_multi_currency"/>
<field name="description1"/>
<field name="journal"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_coda_bank_account_form" model="ir.ui.view">
<field name="name">coda.bank.account.form</field>
<field name="model">coda.bank.account</field>
<field name="arch" type="xml">
<form string="CODA Bank Account Configuration" version="7.0">
<group col="4">
<field name="name" colspan="4"/>
<field name="bank_id" domain="[('partner_id.ref_companies', 'in', [company_id])]"/>
<field name="description1"/>
<field name="currency" groups="base.group_multi_currency"/>
<field name="description2"/>
<field name="coda_st_naming"/>
<field name="state" on_change="onchange_state(state)"/>
<field name="journal" attrs="{'invisible':[('state','=','info')]}"/>
<newline/>
<field name="find_payment"/>
<field name="find_bbacom"/>
<field name="find_inv_number"/>
<field name="find_partner"/>
<field name="update_partner"/>
<field name="balance_start_enforce"/>
<field name="discard_dup"/>
<field name="active"/>
<field name="company_id" widget='selection' groups="base.group_multi_company"/>
</group>
<notebook colspan="4">
<page string="Default Accounts">
<group string="Default Account Mapping">
<field name="awaiting_account"/>
<field name="transfer_account"/>
</group>
</page>
<page string="Accounts Mapping">
<field colspan="4" name="account_mapping_ids" nolabel="1">
<tree string="Account Mapping Rules">
<field name="sequence"/>
<field name="name"/>
<field name="trans_type_id"/>
<field name="trans_family_id"/>
<field name="trans_code_id"/>
<field name="trans_category_id"/>
<field name="struct_comm_type_id"/>
<field name="partner_id"/>
<field name="account_id"/>
</tree>
<form string="Account Mapping Rules">
<field name="name"/>
<field name="account_id"/>
<field name="sequence"/>
<field name="active"/>
<separator string="Conditions" colspan="4"/>
<field name="trans_type_id"/>
<field name="trans_family_id"/>
<field name="trans_code_id"/>
<field name="trans_category_id"/>
<field name="struct_comm_type_id"/>
<field name="partner_id"/>
</form>
</field>
</page>
</notebook>
</form>
</field>
</record>
<record id="action_coda_bank_account_form" model="ir.actions.act_window">
<field name="name">CODA Bank Account Configuration</field>
<field name="res_model">coda.bank.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_coda_bank_account_search"/>
</record>
<menuitem action="action_coda_bank_account_form" id="menu_action_coda_bank_account_form" parent="menu_manage_coda" sequence="1" groups="base.group_no_one"/>
<!-- CODA Transaction Types -->
<record id="view_account_coda_trans_type_tree" model="ir.ui.view">
<field name="name">account.coda.trans.type.tree</field>
<field name="model">account.coda.trans.type</field>
<field name="arch" type="xml">
<tree string="CODA Transaction Types">
<field name="type"/>
<field name="parent_id"/>
<field name="description"/>
</tree>
</field>
</record>
<record id="view_account_coda_trans_type_form" model="ir.ui.view">
<field name="name">account.coda.trans.type.form</field>
<field name="model">account.coda.trans.type</field>
<field name="arch" type="xml">
<form string="CODA Transaction Type" version="7.0">
<group col="4">
<field name="type"/>
<field name="parent_id"/>
<field name="description" colspan="4"/>
</group>
</form>
</field>
</record>
<record id="action_account_coda_trans_type_form" model="ir.actions.act_window">
<field name="name">CODA Transaction Types</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.coda.trans.type</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_account_coda_trans_type_form" id="menu_action_account_coda_trans_type_form" parent="menu_manage_coda" sequence="2" groups="base.group_no_one"/>
<!-- CODA Transaction Codes -->
<record id="view_account_coda_trans_code_tree" model="ir.ui.view">
<field name="name">account.coda.trans.code.tree</field>
<field name="model">account.coda.trans.code</field>
<field name="arch" type="xml">
<tree string="CODA Transaction Codes">
<field name="code"/>
<field name="type"/>
<field name="parent_id"/>
<field name="description"/>
</tree>
</field>
</record>
<record id="view_account_coda_trans_code_form" model="ir.ui.view">
<field name="name">account.coda.trans.code.form</field>
<field name="model">account.coda.trans.code</field>
<field name="arch" type="xml">
<form string="CODA Transaction Code" version="7.0">
<group col="4">
<field name="code"/>
<field name="type"/>
<field name="parent_id"/>
<field name="description"/>
</group>
<field name="comment"/>
</form>
</field>
</record>
<record id="action_account_coda_trans_code_form" model="ir.actions.act_window">
<field name="name">CODA Transaction Codes</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.coda.trans.code</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_account_coda_trans_code_form" id="menu_action_account_coda_trans_code_form" parent="menu_manage_coda" sequence="3" groups="base.group_no_one"/>
<!-- CODA Transaction Categories -->
<record id="view_account_coda_trans_category_tree" model="ir.ui.view">
<field name="name">account.coda.trans.category.tree</field>
<field name="model">account.coda.trans.category</field>
<field name="arch" type="xml">
<tree string="CODA Transaction Categories">
<field name="category"/>
<field name="description"/>
</tree>
</field>
</record>
<record id="view_account_coda_trans_category_form" model="ir.ui.view">
<field name="name">account.coda.trans.category.form</field>
<field name="model">account.coda.trans.category</field>
<field name="arch" type="xml">
<form string="CODA Transaction Category" version="7.0">
<field name="category"/>
<field name="description"/>
</form>
</field>
</record>
<record id="action_account_coda_trans_category_form" model="ir.actions.act_window">
<field name="name">CODA Transaction Categories</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.coda.trans.category</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_account_coda_trans_category_form" id="menu_action_account_coda_trans_category_form" parent="menu_manage_coda" sequence="4" groups="base.group_no_one"/>
<!-- CODA Structured Communication Types -->
<record id="view_account_coda_comm_type_tree" model="ir.ui.view">
<field name="name">account.coda.comm.type.tree</field>
<field name="model">account.coda.comm.type</field>
<field name="arch" type="xml">
<tree string="CODA Structured Communication Types">
<field name="code"/>
<field name="description"/>
</tree>
</field>
</record>
<record id="view_account_coda_comm_type_form" model="ir.ui.view">
<field name="name">account.coda.comm.type.form</field>
<field name="model">account.coda.comm.type</field>
<field name="arch" type="xml">
<form string="CODA Structured Communication Type" version="7.0">
<field name="code"/>
<field name="description"/>
</form>
</field>
</record>
<record id="action_account_coda_comm_type_form" model="ir.actions.act_window">
<field name="name">CODA Structured Communication Types</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.coda.comm.type</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_account_coda_comm_type_form" id="menu_action_account_coda_comm_type_form" parent="menu_manage_coda" sequence="5" groups="base.group_no_one"/>
<!-- CODA Processing -->
<menuitem name="CODA Processing" parent="account.menu_finance_bank_and_cash" id="menu_account_coda" sequence="40"/>
<menuitem name="Import CODA File" parent="menu_account_coda" id="menu_account_coda_import" action="action_account_coda_import" sequence="41"/>
<!-- CODA Files -->
<record model="ir.ui.view" id="view_account_coda_tree">
<field name="name">account.coda.tree</field>
<field name="model">account.coda</field>
<field name="arch" type="xml">
<tree string="CODA Files" create="false">
<field name="coda_creation_date"/>
<field name="name"/>
<field name="date"/>
<field name="user_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_account_coda_form">
<field name="name">account.coda.form</field>
<field name="model">account.coda</field>
<field name="arch" type="xml">
<form string="CODA File" version="7.0" create="false">
<sheet>
<group col="4">
<field name="coda_creation_date"/>
<field name="name"/>
<field name="coda_data" filename="name"/>
<field name="date"/>
<field name="user_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<separator string="Additional Information"/>
<field name="note"/>
<field name="statement_ids"/>
</sheet>
</form>
</field>
</record>
<record id="view_account_coda_filter" model="ir.ui.view">
<field name="name">account.coda.search</field>
<field name="model">account.coda</field>
<field name="arch" type="xml">
<search string="Search CODA Files">
<field name="coda_creation_date"/>
<field name="date"/>
<field name="user_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<group expand="0" string="Group By...">
<filter string="CODA Creation Date" icon="terp-go-month" domain="[]" context="{'group_by':'coda_creation_date'}"/>
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Company" icon="terp-go-home" domain="[]" groups="base.group_multi_company" context="{'group_by':'company_id'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_imported_coda_files">
<field name="name">Imported CODA Files</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.coda</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_coda_tree"/>
<field name="search_view_id" ref="view_account_coda_filter"/>
</record>
<menuitem name="Imported CODA Files" parent="menu_account_coda" id="menu_imported_coda_files" action="action_imported_coda_files" sequence="42"/>
<!-- CODA Bank Statements -->
<record id="view_coda_bank_statement_list" model="ir.ui.view">
<field name="name">coda.bank.statement.list</field>
<field name="model">coda.bank.statement</field>
<field name="arch" type="xml">
<tree colors="red:balance_end_real!=balance_end" string="CODA Bank Statements">
<field name="name"/>
<field name="coda_creation_date"/>
<field name="coda_bank_account_id"/>
<field name="old_balance_date"/>
<field name="new_balance_date"/>
<field name="balance_start"/>
<field name="balance_end_real"/>
<field name="balance_end"/>
<field name="type"/>
</tree>
</field>
</record>
<record id="view_coda_bank_statement_form" model="ir.ui.view">
<field name="name">coda.bank.statement.form</field>
<field name="model">coda.bank.statement</field>
<field name="arch" type="xml">
<form string="CODA Bank Statement">
<field name="name"/>
<field name="coda_creation_date"/>
<field name="coda_bank_account_id"/>
<field name="currency"/>
<field name="type"/>
<newline/>
<field name="balance_start"/>
<field name="balance_end_real"/>
<field name="old_balance_date"/>
<field name="new_balance_date"/>
<notebook colspan="4">
<page string="Transactions">
<field colspan="4" name="line_ids" nolabel="1">
<tree string="CODA Statement Lines">
<field name="sequence" string="Seq"/>
<field name="date"/>
<field name="val_date"/>
<field name="ref"/>
<field name="name" width="250"/>
<field name="type"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="amount"/>
<field name="globalisation_amount" string="Glob. Amount"/>
<field name="globalisation_id" string="Glob. Id"/>
</tree>
<form string="CODA Statement Lines">
<field name="sequence" string="Seq"/>
<field name="date"/>
<field name="val_date"/>
<field name="name"/>
<field name="type"/>
<field name="partner_id"/>
<field domain="[('type', '&lt;&gt;', 'view')]" name="account_id"/>
<field name="amount"/>
<field name="ref"/>
<field name="globalisation_amount"/>
<field name="globalisation_level"/>
<field name="globalisation_id"/>
<separator colspan="4" string="Notes"/>
<field colspan="4" name="note" nolabel="1"/>
</form>
</field>
</page>
</notebook>
<group colspan="4">
<field name="balance_end"/>
</group>
</form>
</field>
</record>
<record id="view_coda_bank_statement_search" model="ir.ui.view">
<field name="name">coda.bank.statement.search</field>
<field name="model">coda.bank.statement</field>
<field name="arch" type="xml">
<search string="Search CODA Bank Statements">
<filter string="Normal" domain="[('type','=','normal')]" icon="terp-folder-green"/>
<filter string="Info" domain="[('type','=','info')]" icon="terp-folder-yellow"/>
<field name="name"/>
<field name="coda_creation_date"/>
<field name="old_balance_date"/>
<field name="new_balance_date"/>
<field name="period_id"/>
<field name="coda_bank_account_id"/>
<field name="journal_id" domain="[('type', '=', 'bank')]"/>
<group expand="0" string="Group By...">
<filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
<filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_coda_bank_statements">
<field name="name">CODA Bank Statements</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">coda.bank.statement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_coda_bank_statement_list"/>
<field name="search_view_id" ref="view_coda_bank_statement_search"/>
<field name="help">The CODA Bank Statements contain the information encoded in their originating CODA file in a human readable format. The Bank Statements associated with a CODA contain the subset of the CODA Bank Statement data that is required for the creation of the Accounting Entries.</field>
</record>
<menuitem name="CODA Bank Statements" parent="menu_account_coda" id="menu_coda_bank_statements" action="action_coda_bank_statements" sequence="43"/>
<!-- CODA Bank Statement Line View -->
<record id="view_coda_bank_statement_line_list" model="ir.ui.view">
<field name="name">coda.bank.statement.line.list</field>
<field name="model">coda.bank.statement.line</field>
<field name="arch" type="xml">
<tree string="CODA Statement Lines" create="false">
<field name="sequence" readonly="1" invisible="1"/>
<field name="coda_bank_account_id" readonly="1"/>
<field name="date" readonly="1"/>
<field name="val_date" readonly="1"/>
<field name="name"/>
<field name="statement_id" readonly="1"/>
<field name="ref" readonly="1"/>
<field name="partner_id" />
<field name="type" />
<field name="account_id" />
<field name="amount" readonly="1" sum="Total Amount"/>
<field name="globalisation_id" string="Glob. Id"/>
<field name="globalisation_amount" string="Glob. Am."/>
</tree>
</field>
</record>
<record id="view_coda_bank_statement_line_form" model="ir.ui.view">
<field name="name">coda.bank.statement.line.form</field>
<field name="model">coda.bank.statement.line</field>
<field name="arch" type="xml">
<form string="CODA Statement Line" version="7.0" create="false">
<group col="4">
<field name="statement_id"/>
<field name="coda_bank_account_id"/>
<field name="date"/>
<field name="val_date"/>
<field name="name"/>
<field name="ref" readonly="0"/>
<field name="partner_id"/>
<field name="type" />
<field domain="[('type', '&lt;&gt;', 'view')]" name="account_id"/>
<field name="amount"/>
<field name="globalisation_id"/>
<field name="sequence" readonly="0"/>
</group>
<separator string="Notes"/>
<field name="note"/>
</form>
</field>
</record>
<record id="view_coda_bank_statement_line_filter" model="ir.ui.view">
<field name="name">coda.bank.statement.line.filter</field>
<field name="model">coda.bank.statement.line</field>
<field name="arch" type="xml">
<search string="Search Bank Transactions">
<field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Bank Transaction"/>
<field name="val_date"/>
<filter name="debit" string="Debit" domain="[('amount','&gt;',0)]" icon="terp-folder-green" help="Debit Transactions."/>
<filter name="credit" string="Credit" domain="[('amount','&lt;',0)]" icon="terp-folder-orange" help="Credit Transactions."/>
<field name="statement_id"/>
<field name="globalisation_id" string="Glob. Id"/>
<group expand="0" string="Extended Filters...">
<field name="coda_bank_account_id"/>
<field name="account_id"/>
<field name="partner_id"/>
<field name="amount"/>
<field name="globalisation_amount" string="Glob. Amount"/>
<field name="type"/>
<field name="ref"/>
<field name="note"/>
</group>
<newline/>
<group string="Group By..." expand="0">
<filter string="Bank Account" context="{'group_by':'coda_bank_account_id'}" icon="terp-folder-green"/>
<filter string="Statement" context="{'group_by':'statement_id'}" icon="terp-folder-orange"/>
<filter string="Fin.Account" context="{'group_by':'account_id'}" icon="terp-folder-yellow"/>
</group>
</search>
</field>
</record>
<record id="action_coda_bank_statement_line" model="ir.actions.act_window">
<field name="name">CODA Statement Lines</field>
<field name="res_model">coda.bank.statement.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'block_statement_line_delete' : 1}</field>
<field name="search_view_id" ref="view_coda_bank_statement_line_filter"/>
<field name="view_id" ref="view_coda_bank_statement_line_list"/>
</record>
<menuitem action="action_coda_bank_statement_line" id="coda_bank_statement_line" parent="menu_account_coda" sequence="44"/>
<act_window name="CODA Data File"
domain="[('statement_ids', '=', active_id)]"
res_model="account.coda"
src_model="coda.bank.statement"
view_type="form"
view_mode="tree,form"
id="act_coda_bank_statement_goto_account_coda"/>
<act_window name="Bank Statement"
domain="[('coda_statement_id', '=', active_id)]"
res_model="account.bank.statement"
src_model="coda.bank.statement"
view_type="form"
view_mode="tree,form"
id="act_coda_bank_statement_goto_account_bank_statement"/>
<act_window name="CODA Bank Statement"
domain="[('statement_id', '=', active_id)]"
context="{'bank_statement': 1}"
res_model="coda.bank.statement"
src_model="account.bank.statement"
view_type="form"
view_mode="tree,form"
id="act_account_bank_statement_goto_coda_bank_statement"/>
</data>
</openerp>
<data>
<menuitem name="Import CODA File" parent="account.menu_finance_bank_and_cash" id="menu_account_coda_import" action="action_account_coda_import" sequence="40"/>
</data>
</openerp>

View File

@ -49,20 +49,6 @@
<field name="target">new</field>
<field name="view_id" ref="account_coda_import_view"/>
</record>
<act_window name="Import CODA File"
res_model="account.coda.import"
src_model="coda.bank.statement"
view_type="form" view_mode="form" target="new"
key2="client_action_multi" multi="True"
id="wizard_account_coda_import_1"/>
<act_window name="Import CODA File"
res_model="account.coda.import"
src_model="account.coda"
view_type="form" view_mode="form" target="new"
key2="client_action_multi" multi="True"
id="wizard_account_coda_import_2"/>
</data>
</openerp>

View File

@ -1,34 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2012 Noviat nv/sa (www.noviat.be). 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/>.
#
##############################################################################
from osv import fields, osv
class res_bank(osv.osv):
_inherit = 'res.bank'
_columns = {
'code': fields.char('Code', size=3,
help='Country specific Bank Code (used for bban to iban conversion).'),
}
res_bank()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_res_bank_form_add_code" model="ir.ui.view">
<field name="name">res.bank.form.add.code</field>
<field name="model">res.bank</field>
<field name="inherit_id" ref="base.view_res_bank_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="active" position="after">
<field name="code" select="1"/>
</field>
</field>
</record>
<record id="view_res_bank_tree_add_code" model="ir.ui.view">
<field name="name">res.bank.tree.add.code</field>
<field name="model">res.bank</field>
<field name="inherit_id" ref="base.view_res_bank_tree"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="country" position="after">
<field name="code"/>
</field>
</field>
</record>
</data>
</openerp>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp><data>
<record id="account_coda_comp_rule" model="ir.rule">
<field name="name">Account Coda model company rule</field>
<field model="ir.model" name="model_id" ref="model_account_coda"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
</data></openerp>

View File

@ -1,17 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_coda_manager,account.coda manager,model_account_coda,account.group_account_manager,1,1,1,1
access_account_coda_user,account.coda user,model_account_coda,account.group_account_user,1,0,0,0
access_account_coda_trans_type_manager,account.coda.trans.type manager,model_account_coda_trans_type,account.group_account_manager,1,1,1,1
access_account_coda_trans_type_user,account.coda.trans.type user,model_account_coda_trans_type,account.group_account_user,1,0,0,0
access_account_coda_trans_code_manager,account.coda.trans.code manager,model_account_coda_trans_code,account.group_account_manager,1,1,1,1
access_account_coda_trans_code_user,account.coda.trans.code user,model_account_coda_trans_code,account.group_account_user,1,0,0,0
access_account_coda_trans_category_manager,account.coda.trans.category manager,model_account_coda_trans_category,account.group_account_manager,1,1,1,1
access_account_coda_trans_category_user,account.coda.trans.category user,model_account_coda_trans_category,account.group_account_user,1,0,0,0
access_account_coda_comm_type_manager,account.coda.comm.type manager,model_account_coda_comm_type,account.group_account_manager,1,1,1,1
access_account_coda_comm_type_user,account.coda.comm.type user,model_account_coda_comm_type,account.group_account_user,1,0,0,0
access_coda_bank_account_manager,coda.bank.account manager,model_coda_bank_account,account.group_account_manager,1,1,1,1
access_coda_bank_account_user,coda.bank.account user,model_coda_bank_account,account.group_account_user,1,0,0,0
access_coda_bank_statement_manager,coda.bank.statement manager,model_coda_bank_statement,account.group_account_manager,1,1,1,1
access_coda_bank_statement_user,coda.bank.statement user,model_coda_bank_statement,account.group_account_user,1,0,0,0
access_coda_bank_statement_line_manager,coda.bank.statement.line manager,model_coda_bank_statement_line,account.group_account_manager,1,1,1,1
access_coda_bank_statement_line_user,coda.bank.statement.line user,model_coda_bank_statement_line,account.group_account_user,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_account_coda_manager account.coda manager model_account_coda account.group_account_manager 1 1 1 1
3 access_account_coda_user account.coda user model_account_coda account.group_account_user 1 0 0 0
4 access_account_coda_trans_type_manager account.coda.trans.type manager model_account_coda_trans_type account.group_account_manager 1 1 1 1
5 access_account_coda_trans_type_user account.coda.trans.type user model_account_coda_trans_type account.group_account_user 1 0 0 0
6 access_account_coda_trans_code_manager account.coda.trans.code manager model_account_coda_trans_code account.group_account_manager 1 1 1 1
7 access_account_coda_trans_code_user account.coda.trans.code user model_account_coda_trans_code account.group_account_user 1 0 0 0
8 access_account_coda_trans_category_manager account.coda.trans.category manager model_account_coda_trans_category account.group_account_manager 1 1 1 1
9 access_account_coda_trans_category_user account.coda.trans.category user model_account_coda_trans_category account.group_account_user 1 0 0 0
10 access_account_coda_comm_type_manager account.coda.comm.type manager model_account_coda_comm_type account.group_account_manager 1 1 1 1
11 access_account_coda_comm_type_user account.coda.comm.type user model_account_coda_comm_type account.group_account_user 1 0 0 0
12 access_coda_bank_account_manager coda.bank.account manager model_coda_bank_account account.group_account_manager 1 1 1 1
13 access_coda_bank_account_user coda.bank.account user model_coda_bank_account account.group_account_user 1 0 0 0
14 access_coda_bank_statement_manager coda.bank.statement manager model_coda_bank_statement account.group_account_manager 1 1 1 1
15 access_coda_bank_statement_user coda.bank.statement user model_coda_bank_statement account.group_account_user 1 0 0 0
16 access_coda_bank_statement_line_manager coda.bank.statement.line manager model_coda_bank_statement_line account.group_account_manager 1 1 1 1
17 access_coda_bank_statement_line_user coda.bank.statement.line user model_coda_bank_statement_line account.group_account_user 1 0 0 0

View File

@ -20,6 +20,6 @@
#
##############################################################################
import account_coda_import_dle
import account_coda_import
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

File diff suppressed because it is too large Load Diff

View File

@ -1,740 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2012 Noviat nv/sa (www.noviat.be). 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/>.
#
##############################################################################
import base64
from osv import fields, osv
from tools.translate import _
import time
import tools
import logging
_logger = logging.getLogger(__name__)
class account_coda_import(osv.osv_memory):
_name = 'account.coda.import'
_description = 'Import CODA File'
_columns = {
'coda_data': fields.binary('CODA File', required=True),
'coda_fname': fields.char('CODA Filename', size=128, required=True),
'note': fields.text('Log'),
}
_defaults = {
'coda_fname': lambda *a: '',
}
def coda_parsing(self, cr, uid, ids, context=None, batch=False, codafile=None, codafilename=None):
if context is None:
context = {}
if batch:
print
codafile = str(codafile)
codafilename = codafilename
else:
data = self.browse(cr, uid, ids)[0]
try:
codafile = data.coda_data
codafilename = data.coda_fname
except:
raise osv.except_osv(_('Error!'), _('Wizard in incorrect state. Please hit the Cancel button!'))
return {}
recordlist = unicode(base64.decodestring(codafile), 'windows-1252', 'strict').split('\n')
statements = []
for line in recordlist:
if not line:
pass
elif line[0] == '0':
#Begin of a new Bank statement
statement = {}
statements.append(statement)
statement['version'] = line[127]
if statement['version'] not in ['1', '2']:
raise osv.except_osv(_('Error R001!'), _('CODA V%s statements are not supported, please contact your bank!') % statement['version'])
statement['globalisation_stack'] = []
statement['lines'] = []
statement['date'] = time.strftime(tools.DEFAULT_SERVER_DATE_FORMAT, time.strptime(rmspaces(line[5:11]), '%d%m%y'))
statement['separateApplication'] = rmspaces(line[83:88])
elif line[0] == '1':
#Statement details
if statement['version'] == '1':
statement['accountNumber'] = rmspaces(line[5:17])
statement['currency'] = rmspaces(line[18:21])
elif statement['version'] == '2':
if line[1] == '0': # Belgian bank account BBAN structure
statement['accountNumber'] = rmspaces(line[5:17])
statement['currency'] = rmspaces(line[18:21])
elif line[1] == '1': # foreign bank account BBAN structure
raise osv.except_osv(_('Error R1001!'), _('Foreign bank accounts with BBAN structure are not supported !'))
elif line[1] == '2': # Belgian bank account IBAN structure
statement['accountNumber'] = rmspaces(line[5:21])
statement['currency'] = rmspaces(line[39:42])
elif line[1] == '3': # foreign bank account IBAN structure
raise osv.except_osv(_('Error R1002!'), _('Foreign bank accounts with IBAN structure are not supported !'))
else: # Something else, not supported
raise osv.except_osv(_('Error R1003!'), _('\nUnsupported bank account structure !'))
statement['description'] = rmspaces(line[90:125])
statement['balance_start'] = float(rmspaces(line[43:58])) / 1000
statement['balance_start_date'] = time.strftime(tools.DEFAULT_SERVER_DATE_FORMAT, time.strptime(rmspaces(line[58:64]), '%d%m%y'))
statement['accountHolder'] = rmspaces(line[64:90])
statement['paperSeqNumber'] = rmspaces(line[2:5])
statement['codaSeqNumber'] = rmspaces(line[125:128])
elif line[0] == '2':
if line[1] == '1':
#New statement line
statementLine = {}
statementLine['type'] = 'general'
statementLine['ref'] = rmspaces(line[2:10])
statementLine['ref_move'] = rmspaces(line[2:6])
statementLine['ref_move_detail'] = rmspaces(line[6:10])
statementLine['sequence'] = len(statement['lines']) + 1
statementLine['transactionRef'] = rmspaces(line[10:31])
statementLine['debit'] = line[31] # 0 = Credit, 1 = Debit
statementLine['amount'] = float(rmspaces(line[32:47])) / 1000
if statementLine['debit'] == '1':
statementLine['amount'] = - statementLine['amount']
statementLine['transaction_type'] = line[53]
if statementLine['transaction_type'] not in transaction_types:
raise osv.except_osv(_('Error R2001!'), _('The File contains an invalid CODA Transaction Type : %s!') % statementLine['transaction_type'])
statementLine['transactionDate'] = time.strftime(tools.DEFAULT_SERVER_DATE_FORMAT, time.strptime(rmspaces(line[47:53]), '%d%m%y'))
statementLine['transaction_family'] = rmspaces(line[54:56])
#TODO Handling severals transactions Family
statementLine['transaction_code'] = rmspaces(line[56:58])
#TODO Handling severals transactions code
statementLine['transaction_category'] = rmspaces(line[58:61])
#TODO Handling severals transactions category
statementLine['communication'] = rmspaces(line[62:115])
#TODO Handling structured communication
statementLine['entryDate'] = rmspaces(line[115:121])
statementLine['type'] = 'normal'
statementLine['globalisation'] = int(line[124])
if len(statement['globalisation_stack']) > 0:
statementLine['communication'] = "\n".join([statement['globalisation_stack'][-1]['communication'], statementLine['communication']])
if statementLine['globalisation'] > 0:
if len(statement['globalisation_stack']) > 0 and statement['globalisation_stack'][-1]['globalisation'] == statementLine['globalisation']:
# Destack
statement['globalisation_stack'].pop()
else:
#Stack
statementLine['type'] = 'globalisation'
statement['globalisation_stack'].append(statementLine)
statement['lines'].append(statementLine)
elif line[1] == '2':
if statement['lines'][-1]['ref'][0:4] != line[2:6]:
raise osv.except_osv(_('Error R2004!'), _('CODA parsing error on movement data record 2.2, seq nr %s! Please report this issue via your OpenERP support channel.') % line[2:10])
statement['lines'][-1]['communication'] += rmspaces(line[10:63])
statement['lines'][-1]['payment_reference'] = rmspaces(line[63:98])
statement['lines'][-1]['counterparty_bic'] = rmspaces(line[98:109])
elif line[1] == '3':
if statement['lines'][-1]['ref'][0:4] != line[2:6]:
raise osv.except_osv(_('Error R2005!'), _('CODA parsing error on movement data record 2.3, seq nr %s! Please report this issue via your OpenERP support channel.') % line[2:10])
if statement['version'] == '1':
statement['lines'][-1]['counterpartyNumber'] = rmspaces(line[10:22])
statement['lines'][-1]['counterpartyName'] = rmspaces(line[47:125])
statement['lines'][-1]['counterpartyCurrency'] = ''
else:
if line[22] == ' ':
statement['lines'][-1]['counterpartyNumber'] = rmspaces(line[10:22])
statement['lines'][-1]['counterpartyCurrency'] = rmspaces(line[23:26])
else:
statement['lines'][-1]['counterpartyNumber'] = rmspaces(line[10:44])
statement['lines'][-1]['counterpartyCurrency'] = rmspaces(line[44:47])
statement['lines'][-1]['counterpartyName'] = rmspaces(line[47:82])
statement['lines'][-1]['communication'] += rmspaces(line[82:125])
else:
# movement data record 2.x (x != 1,2,3)
raise osv.except_osv(_('Error R2009!'), _('\nMovement data records of type 2.%s are not supported !') % line[1])
elif line[0] == '3':
if line[1] == '1':
infoLine = {}
infoLine['entryDate'] = statement['lines'][-1]['entryDate']
infoLine['type'] = 'information'
infoLine['sequence'] = len(statement['lines']) + 1
infoLine['ref'] = rmspaces(line[2:10])
infoLine['transactionRef'] = rmspaces(line[10:31])
infoLine['transaction_type'] = line[31]
infoLine['transaction_family'] = rmspaces(line[32:34])
infoLine['transaction_code'] = rmspaces(line[34:36])
infoLine['transaction_category'] = rmspaces(line[36:39])
infoLine['communication'] = rmspaces(line[40:113])
infoLine['amount'] = 0.0
infoLine['type'] = 'information'
statement['lines'].append(infoLine)
elif line[1] == '2':
if infoLine['ref'] != rmspaces(line[2:10]):
raise osv.except_osv(_('Error R3004!'), _('CODA parsing error on information data record 3.2, seq nr %s! Please report this issue via your OpenERP support channel.') % line[2:10])
statement['lines'][-1]['communication'] += rmspaces(line[10:100])
elif line[1] == '3':
if infoLine['ref'] != rmspaces(line[2:10]):
raise osv.except_osv(_('Error R3005!'), _('CODA parsing error on information data record 3.3, seq nr %s! Please report this issue via your OpenERP support channel.') % line[2:10])
statement['lines'][-1]['communication'] += rmspaces(line[10:100])
elif line[0] == '4':
comm_line = {}
comm_line['type'] = 'communication'
comm_line['sequence'] = len(statement['lines']) + 1
comm_line['ref'] = rmspaces(line[2:10])
comm_line['communication'] = rmspaces(line[32:112])
comm_line['amount'] = 0.0
comm_line['type'] = 'communication'
statement['lines'].append(comm_line)
elif line[0] == '8':
# new balance record
statement['debit'] = line[41]
statement['paperSeqNumber'] = rmspaces(line[1:4])
statement['balance_end_real'] = float(rmspaces(line[42:57])) / 1000
statement['balance_end_realDate'] = time.strftime(tools.DEFAULT_SERVER_DATE_FORMAT, time.strptime(rmspaces(line[57:63]), '%d%m%y'))
if statement['debit'] == '1': # 1=Debit
statement['balance_end_real'] = - statement['balance_end_real']
if statement['balance_end_realDate']:
period_id = self.pool.get('account.period').search(cr, uid, [('date_start', '<=', statement['balance_end_realDate']), ('date_stop', '>=', statement['balance_end_realDate'])])
else:
period_id = self.pool.get('account.period').search(cr, uid, [('date_start', '<=', statement['date']), ('date_stop', '>=', statement['date'])])
if not period_id and len(period_id) == 0:
raise osv.except_osv(_('Error R0002!'), _("The CODA Statement New Balance date doesn't fall within a defined Accounting Period! Please create the Accounting Period for date %s.") % statement['balance_end_realDate'])
statement['period_id'] = period_id[0]
elif line[0] == '9':
statement['balanceMin'] = float(rmspaces(line[22:37])) / 1000
statement['balancePlus'] = float(rmspaces(line[37:52])) / 1000
if not statement['balance_end_real']:
statement['balance_end_real'] = statement['balance_start'] + statement['balancePlus'] - statement['balanceMin']
for i, statement in enumerate(statements):
# print '---STATEMENT #' + str(i) + '---'
print statement
data = {
'name': '[' + statement['date'] + ']' + statement['description'],
'date': statement['date'],
'journal_id': 18,
'period_id': statement['period_id'],
'balance_start': statement['balance_start'],
'balance_end_real': statement['balance_end_real'],
'account_id': 1
}
statement['id'] = self.pool.get('account.bank.statement').create(cr, uid, data, context=context)
for line in statement['lines']:
if line['type'] == 'normal':
counterparty = []
if 'counterpartyName' in line:
counterparty.append(line['counterpartyName'])
if 'counterpartyNumber' in line:
counterparty.append(line['counterpartyNumber'])
if len(counterparty) > 0:
counterparty = '[' + ' / '.join(counterparty) + ']'
else:
counterparty = '/'
if line['transaction_type'] in transaction_types:
line['transaction_type'] = transaction_types[line['transaction_type']][1]
if line['transaction_category'] in transaction_categories:
line['transaction_category'] = transaction_categories[line['transaction_category']]
if line['transaction_family'] in transaction_codes:
transaction_family = transaction_codes[line['transaction_family']]
line['transaction_family'] = transaction_family[0]
if line['transaction_code'] in transaction_family[1]:
line['transaction_code'] = transaction_family[1][line['transaction_code']]
note = []
note.append(_('Counter Party') + ': ' + counterparty)
note.append(_('Communication') + ': ' + line['communication'])
note.append(_('Transaction type') + ': ' + line['transaction_type'])
note.append(_('Transaction family') + ': ' + line['transaction_family'])
note.append(_('Transaction code') + ': ' + line['transaction_code'])
note.append(_('Transaction category') + ': ' + line['transaction_category'])
try:
if 'counterpartyNumber' in line and int(line['counterpartyNumber']) == 0:
line['counterpartyNumber'] = False
except:
pass
if 'counterpartyNumber' in line and line['counterpartyNumber']:
ids = self.pool.get('res.partner.bank').search(cr, uid, [('acc_number', '=', str(line['counterpartyNumber']))])
if ids and len(ids) > 0:
partner_id = self.pool.get('res.partner.bank').browse(cr, uid, ids[0],context=context).partner_id.id
else:
partner_id = None
data = {
'name': line['communication'],
'note': "\n".join(note),
'date': line['entryDate'],
'amount': line['amount'],
# 'type': '',
'partner_id': partner_id,
'account_id': 1,
'statement_id': statement['id'],
# 'analytic_account_id': '',
# 'move_ids': '',
'ref': line['ref'],
'sequence': line['sequence'],
}
self.pool.get('account.bank.statement.line').create(cr, uid, data, context=context)
account_coda_import()
transaction_types = {
"0": ["", _("Simple amount without detailed data; e.g. : an individual credit transfer [free of charges].")],
"1": ["", _("Amount as totalised by the customer; e.g. a file regrouping payments of wages or payments made to suppliers or a file regrouping collections for which the customer is ]debited or credited with one single amount. As a matter of principle, this type is also used when no detailed data is following [type 5].")],
"5": ["1", _("Detail of 1. Standard procedure is no detailing. However, the customer may ask for detailed data to be included into his file after the overall record [type 1].")],
"2": ["", _("Amount as totalised by the bank; e.g. : the total amount of a series of credit transfers with a structured communication As a matter of principle, this type will also be used when no detailed data [type 6 or 7] is following.")],
"6": ["2", _("Detail of 2. Simple amount without detailed data. Normally, data of this kind comes after type 2. The customer may ask for a separate file containing the detailed data. In that case, one will speak of a separate application. The records in a separate application keep type 6.")],
"7": ["2", _("Detail of 2. Simple account with detailed data The records in a separate application keep type 7.")],
"9": ["7", _("Detail of 7. The records in a separate application keep type 9.")],
"3": ["", _("Simple amount with detailed data; e.g. in case of charges for cross-border credit transfers.")],
"8": ["3", _("Detail of 3.")],
}
transaction_codes = {
"00": [_("Undefined transactions"), {
"89": _("Cancellation of a transaction"),
"87": _("Costs refunded"),
"85": _("Correction"),
"83": _("Value correction"),
"39": _("Cancellation of a transaction"),
"37": _("Costs"),
"35": _("Correction"),
"33": _("Value correction"),
"00": _("Undefined transaction")
}],
"01": [_("Domestic or local SEPA credit transfers"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of costs"),
"66": _("Financial centralization"),
"64": _("Transfer to your account"),
"62": _("Unpaid postal order"),
"60": _("Non-presented circular cheque"),
"54": _("Unexecutable transfer order"),
"52": _("Payment in your favour"),
"51": _("Transfer in your favour initiated by the bank"),
"50": _("Transfer in your favour"),
"49": _("Cancellation or correction"),
"39": _("Your issue circular cheque"),
"37": _("Costs"),
"17": _("Financial centralisation"),
"15": _("Balance due insurance premium"),
"13": _("Transfer from your account"),
"11": _("Your semi-standing order payment to employees"),
"09": _("Your semi-standing order"),
"07": _("Collective transfer"),
"05": _("Payment of wages etc."),
"03": _("Standing order"),
"02": _("Individual transfer order initiated by the bank"),
"01": _("Individual transfer order]"),
}],
"03": [_("Cheques"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of cheque-related costs"),
"68": _("Credit of a payment via electronic purse"),
"66": _("Remittance of cheque by your branch - credit under usual reserve"),
"64": _("Reversal of settlement of credit card"),
"63": _("Second credit of unpaid cheque"),
"62": _("Reversal of cheque"),
"60": _("Reversal of voucher"),
"58": _("Remittance of cheques, vouchers, etc. credit after collection"),
"56": _("Non-presented certified cheques"),
"52": _("First credit of cheques, vouchers, luncheon vouchers, postal orders, credit under usual reserve"),
"50": _("Credit of a payment via terminal"),
"49": _("Cancellation or correction"),
"39": _("Provisionally unpaid due to other reason than manual presentation"),
"38": _("Provisionally unpaid"),
"37": _("Cheque-related costs"),
"35": _("Cash advance"),
"19": _("Settlement of credit cards"),
"17": _("Your certified cheque"),
"15": _("Your purchase bank cheque"),
"13": _("Eurocheque written out abroad"),
"11": _("Department store cheque"),
"09": _("Unpaid voucher"),
"07": _("Definitely unpaid cheque"),
"05": _("Payment of voucher"),
"03": _("Your purchase by payment card"),
"01": _("Payment of your cheque"),
}],
"04": [_("Cards"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of costs"),
"68": _("Credit after Proton payments"),
"55": _("Income from payments by GSM"),
"53": _("Cash deposit at an ATM"),
"52": _("Loading GSM cards"),
"51": _("Unloading Proton"),
"50": _("Credit after a payment at a terminal"),
"49": _("Cancellation or correction"),
"37": _("Costs"),
"08": _("Payment by means of a payment card outside the Eurozone"),
"07": _("Payment by GSM"),
"06": _("Payment with tank card"),
"05": _("Loading Proton"),
"04": _("Cash withdrawal from an ATM"),
"03": _("Settlement credit cards"),
"02": _("Payment by means of a payment card within the Eurozone"),
"01": _("Loading a GSM card"),
}],
"05": [_("Direct debit"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of costs"),
"58": _("Reversal"),
"56": _("Unexecutable reimbursement"),
"54": _("Reimbursement"),
"52": _("Credit under usual reserve"),
"50": _("Credit after collection"),
"49": _("Cancellation or correction"),
"37": _("Costs"),
"05": _("Reimbursement"),
"03": _("Unpaid debt"),
"01": _("Payment"),
}],
"07": [_("Domestic commercial paper"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of costs"),
"86": _("Payment after cession"),
"64": _("Warrant"),
"58": _("Remittance of supplier's bill without guarantee"),
"56": _("Remittance of supplier's bill with guarantee"),
"54": _("Remittance of commercial paper for discount"),
"52": _("Remittance of commercial paper - credit under usual reserve"),
"50": _("Remittance of commercial paper - credit after collection"),
"49": _("Cancellation or correction"),
"39": _("Return of an irregular bill of exchange"),
"37": _("Costs related to commercial paper"),
"14": _("Warrant fallen due"),
"12": _("Safe custody"),
"10": _("Renewal of agreed maturity date"),
"09": _("Agio on supplier's bill"),
"08": _("Payment in advance"),
"07": _("Unpaid commercial paper"),
"06": _("Extension of maturity date"),
"05": _("Commercial paper claimed back"),
"03": _("Payment receipt card"),
"01": _("Payment commercial paper"),
}],
"09": [_("Counter transactions"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of costs"),
"70": _("Sale of travellers cheque"),
"68": _("Difference in payment"),
"66": _("Repurchase of petrol coupons"),
"64": _("Your winning lottery ticket"),
"62": _("Sale of gold/pieces under usual reserve"),
"60": _("Sale of foreign bank notes"),
"58": _("Payment by your branch/agents"),
"56": _("Reserve"),
"54": _("Your payment ATM"),
"52": _("Payment night safe"),
"50": _("Cash payment"),
"49": _("Cancellation or correction"),
"37": _("Costs"),
"25": _("Purchase of travellers cheque"),
"21": _("Cash withdrawal on card (PROTON)"),
"19": _("Difference in payment"),
"17": _("Purchase of fiscal stamps"),
"15": _("Your purchase of lottery tickets"),
"13": _("Cash withdrawal by your branch or agents"),
"11": _("Your purchase of luncheon vouchers"),
"09": _("Purchase of petrol coupons"),
"07": _("Purchase of gold/pieces"),
"05": _("Purchase of foreign bank notes"),
"03": _("Cash withdrawal by card (ATM)"),
"01": _("Cash withdrawal"),
}],
"11": [_("Securities"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of costs"),
"70": _("Settlement of securities"),
"68": _("Compensation for missing coupon"),
"66": _("Retrocession of issue commission"),
"64": _("Your issue"),
"62": _("Interim interest on subscription"),
"58": _("Repayable securities from a deposit or delivered at the counter - credit under usual reserve"),
"56": _("Reserve"),
"52": _("Payment of coupons from a deposit or settlement of coupons delivered over the counter - credit under usual reserve"),
"51": _("Tender"),
"50": _("Sale of securities"),
"49": _("Cancellation or correction"),
"37": _("Costs"),
"19": _("Regularisation costs"),
"17": _("Management fee"),
"15": _("Interim interest on subscription"),
"13": _("Your repurchase of issue"),
"11": _("Payable coupons/repayable securities"),
"09": _("Settlement of securities"),
"06": _("Share option plan exercising an option"),
"05": _("Partial payment subscription"),
"04": _("Issues"),
"03": _("Subscription to securities"),
"02": _("Tenders"),
"01": _("Purchase of securities"),
}],
"13": [_("Credit"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of costs"),
"70": _("Settlement of discount bank acceptance"),
"68": _("Documentary export credits"),
"62": _("Term loan"),
"60": _("Settlement of mortgage loan"),
"56": _("Subsidy"),
"55": _("Fixed advance interest only"),
"54": _("Fixed advance capital and interest"),
"50": _("Settlement of instalment credit"),
"49": _("Cancellation or correction"),
"37": _("Credit-related costs"),
"21": _("Other credit applications"),
"19": _("Documentary import credits"),
"15": _("Your repayment hire-purchase and similar claims"),
"13": _("Settlement of bank acceptances"),
"11": _("Your repayment mortgage loan"),
"07": _("Your repayment instalment credits"),
"05": _("Settlement of fixed advance"),
"02": _("Long-term loan"),
"01": _("Short-term loan"),
}],
"30": [_("Various transactions"), {
"99": _("Cancellation or correction"),
"89": _("Undefined transaction"),
"87": _("Reimbursement of costs"),
"83": _("Value (date) correction"),
"55": _("Interest term investment"),
"54": _("Capital and/or interest term investment"),
"52": _("Forward sale of foreign exchange"),
"50": _("Spot sale of foreign exchange"),
"49": _("Cancellation or correction"),
"39": _("Undefined transaction"),
"37": _("Costs"),
"33": _("Value (date) correction"),
"05": _("Capital and/or interest term investment"),
"03": _("Forward purchase of foreign exchange"),
"01": _("Spot purchase of foreign exchange"),
}],
"35": [_("Closing (periodical settlements for interest, costs,…)"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of costs"),
"50": _("Closing"),
"49": _("Cancellation or correction"),
"37": _("Costs"),
"01": _("Closing"),
}],
"41": [_("International credit transfers - non-SEPA credit transfers"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of costs"),
"66": _("Financial centralisation (credit)"),
"64": _("Transfer to your account"),
"50": _("Transfer"),
"49": _("Cancellation or correction"),
"38": _("Costs relating to incoming foreign and non-SEPA transfers"),
"37": _("Costs relating to outgoing foreign transfers and non-SEPA transfers"),
"17": _("Financial centralisation (debit)"),
"13": _("Transfer from your account"),
"07": _("Collective transfers"),
"05": _("Collective payments of wages"),
"03": _("Standing order"),
"01": _("Transfer"),
}],
"43": [_("Foreign cheques"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of costs"),
"70": _("Purchase of travellers cheque"),
"62": _("Reversal of cheques"),
"58": _("Remittance of foreign cheque credit after collection"),
"52": _("Remittance of foreign cheque credit under usual reserve"),
"49": _("Cancellation or correction"),
"37": _("Costs relating to payment of foreign cheques"),
"15": _("Purchase of an international bank cheque"),
"07": _("Unpaid foreign cheque"),
"01": _("Payment of a foreign cheque"),
}],
"47": [_("Foreign commercial paper"), {
"99": _("Cancellation or correction"),
"87": _("Reimbursement of costs"),
"64": _("Warrant"),
"62": _("Remittance of documents abroad - credit after collection"),
"60": _("Remittance of documents abroad - credit under usual reserve"),
"58": _("Idem without guarantee"),
"56": _("Remittance of guaranteed foreign supplier's bill"),
"54": _("Discount abroad"),
"52": _("Remittance of foreign bill credit under usual reserve"),
"50": _("Remittance of foreign bill credit after collection"),
"49": _("Cancellation or correction"),
"37": _("Costs relating to the payment of a foreign bill"),
"14": _("Warrant fallen due"),
"13": _("Discount foreign supplier's bills"),
"11": _("Payment documents abroad"),
"07": _("Unpaid foreign bill"),
"06": _("Extension"),
"05": _("Bill claimed back"),
"01": _("Payment of foreign bill"),
}],
"49": [_("Foreign counter transactions"), {"03": _("ATM withdrawal")}],
"80": [_("Separately charged costs and provisions"), {
"01": _("Guarantee card charges"),
"02": _("Costs relating to electronic output"),
"03": _("Payment card charges"),
"04": _("Costs for holding a documentary cash credit"),
"05": _("Card charges"),
"06": _("Damage relating to bills and cheques"),
"07": _("Insurance costs"),
"08": _("Registering compensation for savings accounts"),
"09": _("Postage"),
"10": _("Purchase of Smartcard"),
"11": _("Costs for the safe custody of correspondence"),
"12": _("Costs for opening a bank guarantee"),
"13": _("Renting of safes"),
"14": _("Handling costs instalment credit"),
"15": _("Night safe"),
"16": _("Bank confirmation to revisor or accountant"),
"17": _("Charge for safe custody"),
"18": _("Trade information"),
"19": _("Special charge for safe custody"),
"20": _("Drawing up a certificate"),
"21": _("Pay-packet charges"),
"22": _("Management/custody"),
"23": _("Research costs"),
"24": _("Participation in and management of interest refund system"),
"25": _("Renting of direct debit box"),
"26": _("Travel insurance premium"),
"27": _("Subscription fee"),
"29": _("Information charges"),
"31": _("Writ service fee"),
"33": _("Miscellaneous fees and commissions"),
"35": _("Costs"),
"37": _("Access right to database"),
"39": _("Surety fee"),
"41": _("Research costs"),
"43": _("Printing of forms"),
"45": _("Documentary credit charges"),
"47": _("Charging fees for transactions"),
"49": _("Cancellation or correction"),
"99": _("Cancellation or correction"),
}],
}
transaction_categories = {
"000": _("Net amount"),
"001": _("Interest received"),
"002": _("Interest paid"),
"003": _("Credit commission"),
"004": _("Postage"),
"005": _("Renting of letterbox"),
"006": _("Various fees/commissions"),
"007": _("Access right to database"),
"008": _("Information charges"),
"009": _("Travelling expenses"),
"010": _("Writ service fee"),
"011": _("VAT"),
"012": _("Exchange commission"),
"013": _("Payment commission"),
"014": _("Collection commission"),
"015": _("Correspondent charges"),
"016": _("BLIW/IBLC dues"),
"017": _("Research costs"),
"018": _("Tental guarantee charges"),
"019": _("Tax on physical delivery"),
"020": _("Costs of physical delivery"),
"021": _("Costs for drawing up a bank cheque"),
"022": _("Priority costs"),
"023": _("Exercising fee"),
"024": _("Growth premium"),
"025": _("Individual entry for exchange charges"),
"026": _("Handling commission"),
"027": _("Charges for unpaid bills"),
"028": _("Fidelity premium"),
"029": _("Protest charges"),
"030": _("Account insurance"),
"031": _("Charges foreign cheque"),
"032": _("Drawing up a circular cheque"),
"033": _("Charges for a foreign bill"),
"034": _("Reinvestment fee"),
"035": _("Charges foreign documentary bill"),
"036": _("Costs relating to a refused cheque"),
"037": _("Commission for handling charges"),
"039": _("Telecommunications"),
"041": _("Credit card costs"),
"042": _("Payment card costs"),
"043": _("Insurance costs"),
"045": _("Handling costs"),
"047": _("Charges extension bill"),
"049": _("Fiscal stamps/stamp duty"),
"050": _("Capital term investment"),
"051": _("Withholding tax"),
"052": _("Residence state tax"),
"053": _("Printing of forms"),
"055": _("Repayment loan or credit capital"),
"057": _("Interest subsidy"),
"058": _("Capital premium"),
"059": _("Default interest"),
"061": _("Charging fees for transactions"),
"063": _("Rounding differences"),
"065": _("Interest payment advice"),
"066": _("Fixed loan advance - reimbursement"),
"067": _("Fixed loan advance - extension"),
"068": _("Countervalue of an entry"),
"069": _("Forward arbitrage contracts : sum to be supplied by customer"),
"070": _("Forward arbitrage contracts : sum to be supplied by bank"),
"071": _("Fixed loan advance - availability"),
"072": _("Countervalue of commission to third party"),
"073": _("Costs of ATM abroad"),
"074": _("Mailing costs"),
"100": _("Gross amount"),
"200": _("Overall documentary credit charges"),
"201": _("Advice notice commission"),
"202": _("Advising commission | Additional advising commission"),
"203": _("Confirmation fee | Additional confirmation fee | Commitment fee | Flat fee | Confirmation reservation commission | Additional reservation commission"),
"204": _("Amendment fee"),
"205": _("Documentary payment commission | Document commission | Drawdown fee | Negotiation fee"),
"206": _("Surety fee/payment under reserve"),
"207": _("Non-conformity fee"),
"208": _("Commitment fee deferred payment"),
"209": _("Transfer commission"),
"210": _("Commitment fee"),
"211": _("Credit arrangement fee | Additional credit arrangement fee"),
"212": _("Warehousing fee"),
"213": _("Financing fee"),
"214": _("Issue commission (delivery order)"),
"400": _("Acceptance fee"),
"401": _("Visa charges"),
"402": _("Certification costs"),
"403": _("Minimum discount rate"),
"404": _("Discount commission"),
"405": _("Bill guarantee commission"),
"406": _("Collection charges"),
"407": _("Costs Article 45"),
"408": _("Cover commission"),
"409": _("Safe deposit charges"),
"410": _("Reclamation charges"),
"411": _("Fixed collection charge"),
"412": _("Advice of expiry charges"),
"413": _("Acceptance charges"),
"414": _("Regularisation charges"),
"415": _("Surety fee"),
"416": _("Charges for the deposit of security"),
"418": _("Endorsement commission"),
"419": _("Bank service fee"),
"420": _("Retention charges"),
"425": _("Foreign broker's commission"),
"426": _("Belgian broker's commission"),
"427": _("Belgian Stock Exchange tax"),
"428": _("Interest accrued"),
"429": _("Foreign Stock Exchange tax"),
"430": _("Recovery of foreign tax"),
"431": _("Delivery of a copy"),
}
def rmspaces(s):
return " ".join(s.split())
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: