diff --git a/account_bank_statement_tax/__init__.py b/account_bank_statement_tax/__init__.py new file mode 100644 index 000000000..16e8b082f --- /dev/null +++ b/account_bank_statement_tax/__init__.py @@ -0,0 +1 @@ +import model diff --git a/account_bank_statement_tax/__openerp__.py b/account_bank_statement_tax/__openerp__.py new file mode 100644 index 000000000..695421ed1 --- /dev/null +++ b/account_bank_statement_tax/__openerp__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2012 - 2013 Therp BV (). +# 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 . +# +############################################################################## + +{ + 'name': 'Apply a tax on bank statement lines', + 'version': '0.1', + 'license': 'AGPL-3', + 'author': 'Therp BV', + 'website': 'https://launchpad.net/banking-addons', + 'category': 'Banking addons', + 'depends': [ + 'account', + ], + 'data': [ + 'view/account_bank_statement.xml', + ], + 'description': ''' +Allow an (inclusive) tax to be set on a bank statement line. When the +statement is confirmed, the tax will be processed like a tax set on a +move line. + +This module is co-funded by BAS Solutions. + ''', + 'installable': True, +} diff --git a/account_bank_statement_tax/i18n/nl.po b/account_bank_statement_tax/i18n/nl.po new file mode 100644 index 000000000..2a3a344ae --- /dev/null +++ b/account_bank_statement_tax/i18n/nl.po @@ -0,0 +1,38 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_bank_statement_tax +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-10-04 05:03+0000\n" +"PO-Revision-Date: 2013-10-06 13:13+0100\n" +"Last-Translator: Erwin van der Ploeg | Endian Solutions " +"\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" +"X-Generator: Poedit 1.5.7\n" + +#. module: account_bank_statement_tax +#: model:ir.model,name:account_bank_statement_tax.model_account_bank_statement_line +msgid "Bank Statement Line" +msgstr "Bankafschriftregel" + +#. module: account_bank_statement_tax +#: field:account.bank.statement.line,tax_id:0 +msgid "Tax" +msgstr "Belasting" + +#. module: account_bank_statement_tax +#: help:account.bank.statement.line,tax_id:0 +msgid "Apply an (inclusive) tax from the bank statement line" +msgstr "Voeg een inclusief belasting tarief toe aan de afschriftregel." + +#. module: account_bank_statement_tax +#: model:ir.model,name:account_bank_statement_tax.model_account_bank_statement +msgid "Bank Statement" +msgstr "Bankafschrift" diff --git a/account_bank_statement_tax/model/__init__.py b/account_bank_statement_tax/model/__init__.py new file mode 100644 index 000000000..0a522c87a --- /dev/null +++ b/account_bank_statement_tax/model/__init__.py @@ -0,0 +1,2 @@ +import account_bank_statement_line +import account_bank_statement diff --git a/account_bank_statement_tax/model/account_bank_statement.py b/account_bank_statement_tax/model/account_bank_statement.py new file mode 100644 index 000000000..b6c940aed --- /dev/null +++ b/account_bank_statement_tax/model/account_bank_statement.py @@ -0,0 +1,109 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2012 - 2013 Therp BV (). +# 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 . +# +############################################################################## + +from openerp.osv import orm +from openerp.tools import ustr + + +class AccountBankStatement(orm.Model): + _inherit = 'account.bank.statement' + + def get_tax_move_lines( + self, cr, uid, st_line, defaults, + company_currency_id, context=None): + """ + Process inclusive taxes on bank statement lines. + + @param st_line: browse record of the statement line + @param defaults: dictionary of default move line values. Usually + the same as the originating move line. + + return one or more serialized tax move lines and a set of values to + update the originating move line with, containing the new amount. + """ + + if not st_line.tax_id: + return False, False + tax_obj = self.pool.get('account.tax') + move_lines = [] + update_move_line = {} + base_amount = -defaults['credit'] or defaults['debit'] + tax_obj = self.pool.get('account.tax') + + fiscal_position = ( + st_line.partner_id.property_account_position + if st_line.partner_id and + st_line.partner_id.property_account_position + else False) + tax_ids = self.pool.get('account.fiscal.position').map_tax( + cr, uid, fiscal_position, [st_line.tax_id]) + taxes = tax_obj.browse(cr, uid, tax_ids, context=context) + + computed_taxes = tax_obj.compute_all( + cr, uid, taxes, base_amount, 1.00) + + for tax in computed_taxes['taxes']: + if tax['tax_code_id']: + if not update_move_line.get('tax_code_id'): + update_move_line['tax_code_id'] = tax['base_code_id'] + update_move_line['tax_amount'] = tax['base_sign'] * ( + computed_taxes.get('total', 0.0)) + # As the tax is inclusive, we need to correct the amount on the + # original move line + amount = computed_taxes.get('total', 0.0) + update_move_line['credit'] = ((amount < 0) and -amount) or 0.0 + update_move_line['debit'] = ((amount > 0) and amount) or 0.0 + + move_lines.append({ + 'move_id': defaults['move_id'], + 'name': defaults.get('name', '') + ' ' + ustr(tax['name'] or ''), + 'date': defaults.get('date', False), + 'partner_id': defaults.get('partner_id', False), + 'ref': defaults.get('ref', False), + 'statement_id': defaults.get('statement_id'), + 'tax_code_id': tax['tax_code_id'], + 'tax_amount': tax['tax_sign'] * tax.get('amount', 0.0), + 'account_id': tax.get('account_collected_id', defaults['account_id']), + 'credit': tax['amount'] < 0 and - tax['amount'] or 0.0, + 'debit': tax['amount'] > 0 and tax['amount'] or 0.0, + 'account_id': tax.get('account_collected_id', defaults['account_id']), + }) + + return move_lines, update_move_line + + def _prepare_bank_move_line( + self, cr, uid, st_line, move_id, amount, company_currency_id, + context=None): + """ + Overload of the original method from the account module. Create + the tax move lines. + """ + res = super(AccountBankStatement, self)._prepare_bank_move_line( + cr, uid, st_line, move_id, amount, company_currency_id, + context=context) + if st_line.tax_id: + tax_move_lines, counterpart_update_vals = self.get_tax_move_lines( + cr, uid, st_line, res, company_currency_id, context=context) + res.update(counterpart_update_vals) + for tax_move_line in tax_move_lines: + self.pool.get('account.move.line').create( + cr, uid, tax_move_line, context=context) + return res diff --git a/account_bank_statement_tax/model/account_bank_statement_line.py b/account_bank_statement_tax/model/account_bank_statement_line.py new file mode 100644 index 000000000..4d965cdef --- /dev/null +++ b/account_bank_statement_tax/model/account_bank_statement_line.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2012 - 2013 Therp BV (). +# 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 . +# +############################################################################## + +from openerp.osv import orm, fields + + +class AccountBankStatementLine(orm.Model): + _inherit = 'account.bank.statement.line' + + _columns = { + 'tax_id': fields.many2one( + 'account.tax', 'Tax', + domain=[('price_include','=', True)], + help="Apply an (inclusive) tax from the bank statement line", + ), + } diff --git a/account_bank_statement_tax/view/account_bank_statement.xml b/account_bank_statement_tax/view/account_bank_statement.xml new file mode 100644 index 000000000..63d2e6e08 --- /dev/null +++ b/account_bank_statement_tax/view/account_bank_statement.xml @@ -0,0 +1,18 @@ + + + + + Add tax to the embedded bank statement line form + + account.bank.statement + + + + + + + + diff --git a/account_banking/account_banking.py b/account_banking/account_banking.py index 14d9cc807..c24a1fc85 100644 --- a/account_banking/account_banking.py +++ b/account_banking/account_banking.py @@ -63,6 +63,7 @@ Modifications are extensive: ''' from openerp.osv import orm, fields +from openerp.osv.osv import except_osv from openerp.tools.translate import _ from openerp import netsvc, SUPERUSER_ID from openerp.addons.decimal_precision import decimal_precision as dp @@ -274,17 +275,18 @@ account_banking_imported_file() class account_bank_statement(orm.Model): ''' - Extensions from account_bank_statement: - 1. Removed period_id (transformed to optional boolean) - as it is no - longer needed. - NB! because of #1. changes required to account_voucher! - 2. Extended 'button_confirm' trigger to cope with the period per - statement_line situation. - 3. Added optional relation with imported statements file - 4. Ordering is based on auto generated id. + Implement changes to this model for the following features: + + * bank statement lines have their own period_id, derived from + their effective date. The period and date are propagated to + the move lines created from each statement line + * bank statement lines have their own state. When a statement + is confirmed, all lines are confirmed too. When a statement + is reopened, lines remain confirmed until reopened individually. + * upon confirmation of a statement line, the move line is + created and reconciled according to the matched entry(/ies) ''' _inherit = 'account.bank.statement' - _order = 'id' _columns = { 'period_id': fields.many2one('account.period', 'Period', @@ -468,9 +470,27 @@ class account_bank_statement_line(orm.Model): _description = 'Bank Transaction' def _get_period(self, cr, uid, context=None): - date = context.get('date', None) - periods = self.pool.get('account.period').find(cr, uid, dt=date) - return periods and periods[0] or False + """ + Get a non-opening period for today or a date specified in + the context. + + Used in this model's _defaults, so it is always triggered + on installation or module upgrade. For that reason, we need + to be tolerant and allow for the situation in which no period + exists for the current date (i.e. when no date is specified). + """ + if context is None: + context = {} + date = context.get('date', False) + local_ctx = dict(context) + local_ctx['account_period_prefer_normal'] = True + try: + return self.pool.get('account.period').find( + cr, uid, dt=date, context=local_ctx)[0] + except except_osv: + if date: + raise + return False def _get_currency(self, cr, uid, context=None): ''' diff --git a/account_banking/banking_import_transaction.py b/account_banking/banking_import_transaction.py index 79801c84e..95886a4fa 100644 --- a/account_banking/banking_import_transaction.py +++ b/account_banking/banking_import_transaction.py @@ -72,7 +72,7 @@ class banking_import_transaction(orm.Model): invoice_ids = invoice_obj.search(cr, uid, [ '&', ('type', '=', 'in_invoice'), - ('partner_id', '=', account_info.bank_partner_id.id), + ('partner_id', 'child_of', account_info.bank_partner_id.id), ('company_id', '=', account_info.company_id.id), ('date_invoice', '=', trans.effective_date), ('reference', '=', reference), @@ -193,6 +193,10 @@ class banking_import_transaction(orm.Model): iname = invoice.name.upper() if iname in ref or iname in msg: return True + if invoice.supplier_invoice_number and len(invoice.supplier_invoice_number) > 2: + supp_ref = invoice.supplier_invoice_number.upper() + if supp_ref in ref or supp_ref in msg: + return True elif invoice.type.startswith('out_'): # External id's possible and likely inum = invoice.number.upper() @@ -1112,21 +1116,23 @@ class banking_import_transaction(orm.Model): # the internal type of these accounts to either 'payable' # or 'receivable' to enable usage like this. if transaction.statement_line_id.amount < 0: - if len(partner_banks) == 1: - account_id = ( - partner_banks[0].partner_id.property_account_payable and - partner_banks[0].partner_id.property_account_payable.id) - if len(partner_banks) != 1 or not account_id or account_id == def_pay_account_id: - account_id = (account_info.default_credit_account_id and - account_info.default_credit_account_id.id) + account_type = 'payable' else: - if len(partner_banks) == 1: - account_id = ( - partner_banks[0].partner_id.property_account_receivable and - partner_banks[0].partner_id.property_account_receivable.id) - if len(partner_banks) != 1 or not account_id or account_id == def_rec_account_id: - account_id = (account_info.default_debit_account_id and - account_info.default_debit_account_id.id) + account_type = 'receivable' + if len(partner_banks) == 1: + partner = partner_banks[0].partner_id + if partner.supplier and not partner.customer: + account_type = 'payable' + elif partner.customer and not partner.supplier: + account_type = 'receivable' + if partner['property_account_' + account_type]: + account_id = partner['property_account_' + account_type].id + if not account_id or account_id in (def_pay_account_id, def_rec_account_id): + if account_type == 'payable': + account_id = account_info.default_credit_account_id.id + else: + account_id = account_info.default_debit_account_id.id + values = {'account_id': account_id} self_values = {} if move_info: @@ -1211,8 +1217,6 @@ class banking_import_transaction(orm.Model): 'match_type', 'move_line_id', 'invoice_id', - 'manual_invoice_id', - 'manual_move_line_id', ]] + [(x, [(6, 0, [])]) for x in [ 'move_line_ids', @@ -1299,9 +1303,9 @@ class banking_import_transaction(orm.Model): 'exchange_rate': fields.float('exchange_rate'), 'transferred_amount': fields.float('transferred_amount'), 'message': fields.char('message', size=1024), - 'remote_owner': fields.char('remote_owner', size=24), - 'remote_owner_address': fields.char('remote_owner_address', size=24), - 'remote_owner_city': fields.char('remote_owner_city', size=24), + 'remote_owner': fields.char('remote_owner', size=128), + 'remote_owner_address': fields.char('remote_owner_address', size=256), + 'remote_owner_city': fields.char('remote_owner_city', size=128), 'remote_owner_postalcode': fields.char('remote_owner_postalcode', size=24), 'remote_owner_country_code': fields.char('remote_owner_country_code', size=24), 'remote_owner_custno': fields.char('remote_owner_custno', size=24), @@ -1497,7 +1501,7 @@ class account_bank_statement_line(orm.Model): if (not statement_line.import_transaction_id or not statement_line.import_transaction_id.remote_account): - raise osv.except_osv( + raise orm.except_orm( _("Error"), _("No bank account available to link partner to")) diff --git a/account_banking/data/account_banking_data.xml b/account_banking/data/account_banking_data.xml index 3d47ad718..14ae6eafe 100644 --- a/account_banking/data/account_banking_data.xml +++ b/account_banking/data/account_banking_data.xml @@ -13,12 +13,5 @@ - - - - diff --git a/account_banking/i18n/nl.po b/account_banking/i18n/nl.po index b7a7cb2a6..52574fdc9 100644 --- a/account_banking/i18n/nl.po +++ b/account_banking/i18n/nl.po @@ -1,19 +1,21 @@ # Translation of OpenERP Server. # This file contains the translation of the following modules: -# * account_banking +# * account_banking # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 6.0.3\n" -"Report-Msgid-Bugs-To: stefan@therp.nl\n" -"POT-Creation-Date: 2011-12-26 08:06+0000\n" -"PO-Revision-Date: 2011-12-26 08:06+0000\n" -"Last-Translator: \n" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-10-14 03:01+0000\n" +"PO-Revision-Date: 2013-10-17 10:33+0100\n" +"Last-Translator: Erwin van der Ploeg (BAS Solutions) \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" +"X-Generator: Poedit 1.5.7\n" #. module: account_banking #: field:account.bank.statement.line,reconcile_id:0 @@ -26,29 +28,14 @@ msgid "Remove duplicate flag" msgstr "Verwijder kenmerk 'duplicaat'" #. module: account_banking -#: field:banking.import.transaction,remote_bank_eangl:0 -msgid "remote_bank_eangln" -msgstr "remote_bank_eangln" +#: field:banking.link_partner,remote_account:0 +msgid "Account number" +msgstr "Rekening nummer" #. module: account_banking -#: field:banking.transaction.wizard,move_line_ids:0 -msgid "Entry lines" -msgstr "Boekingsregels" - -#. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:310 -#, python-format -msgid "Number of bank costs invoices created" -msgstr "Aantal bankkosten-facturen aangemaakt" - -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1017 -#: code:addons/account_banking/banking_import_transaction.py:632 -#: code:addons/account_banking/banking_import_transaction.py:644 -#: code:addons/account_banking/banking_import_transaction.py:648 -#, python-format -msgid "Cannot unreconcile" -msgstr "Kan niet afletteren" +#: view:banking.transaction.wizard:0 +msgid "Write-Off" +msgstr "Afschrijven" #. module: account_banking #: selection:banking.import.line,transaction_type:0 @@ -56,29 +43,20 @@ msgid "Unknown" msgstr "Onbekend" #. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:950 -#, python-format -msgid "Cannot check for duplicate. I can't find myself." -msgstr "Kan niet controleren op duplicaten, ik kan de eigen mutatie niet terugvinden." +#: field:banking.link_partner,zip:0 +msgid "Zip" +msgstr "Postcode" #. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:298 -#, python-format -msgid "Number of errors found" -msgstr "Aantal gevonden fouten" - -#. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:229 -#, python-format -msgid "Statement %(statement_id)s for account %(bank_account)s uses different currency than the defined bank journal." -msgstr "Afschrift %(statement_id)s voor rekening %(bank_account)s gebruikt een andere valuta dan het ingestelde bankboek." - -#. module: account_banking -#: view:account.bank.statement:0 -#: view:account.bank.statement.line:0 +#: view:account.bank.statement:0 view:account.bank.statement.line:0 msgid "Cancel transaction" msgstr "Transactie annuleren" +#. module: account_banking +#: field:banking.link_partner,partner_id:0 +msgid "or link existing partner" +msgstr "of koppel een bestaande relatie" + #. module: account_banking #: view:account.banking.bank.import:0 msgid "Select the processing details:" @@ -90,21 +68,11 @@ msgid "Group By..." msgstr "Groepeer op..." #. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:198 -#, python-format -msgid "Statements found for unknown account %(bank_account)s" -msgstr "Afschriften gevonden voor onbekende bankrekening %(bank_account)s" - -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1320 -#, python-format -msgid "Invalid format" -msgstr "Ongeldig formaat" - -#. module: account_banking -#: field:banking.import.line,banking_import_id:0 -msgid "Bank import" -msgstr "Bankimport" +#: selection:account.bank.statement.line,match_type:0 +#: selection:banking.import.transaction,match_type:0 +#: selection:banking.transaction.wizard,match_type:0 +msgid "Payment line (manual)" +msgstr "Betaalregel (handmatig)" #. module: account_banking #: field:banking.import.line,statement_id:0 @@ -113,25 +81,21 @@ msgid "Statement" msgstr "Afschrift" #. module: account_banking -#: view:account.bank.statement.line:0 -msgid "Statement lines" -msgstr "Afschriftregels" +#: selection:account.bank.statement.line,match_type:0 +#: selection:banking.import.transaction,match_type:0 +#: selection:banking.transaction.wizard,match_type:0 +msgid "Storno" +msgstr "Storno" #. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:605 -#, python-format -msgid "Reconcile payment order not implemented" -msgstr "Afletteren betaalopdracht nog niet geïmplementeerd" - -#. module: account_banking -#: selection:banking.import.line,type:0 +#: selection:banking.import.line,type:0 field:banking.link_partner,supplier:0 msgid "Supplier" msgstr "Leverancier" #. module: account_banking -#: field:payment.line,date_done:0 -msgid "Date Confirmed" -msgstr "Datum bevestigd" +#: field:banking.import.transaction,remote_bank_eangl:0 +msgid "remote_bank_eangln" +msgstr "remote_bank_eangln" #. module: account_banking #: field:banking.import.transaction,remote_bank_bic:0 @@ -139,14 +103,15 @@ msgid "remote_bank_bic" msgstr "remote_bank_bic" #. module: account_banking -#: field:banking.transaction.wizard,manual_invoice_id:0 -msgid "Match this invoice" -msgstr "Match deze factuur" +#: view:account.bank.statement:0 view:account.bank.statement.line:0 +#: view:banking.transaction.wizard:0 +msgid "Match" +msgstr "Match" #. module: account_banking -#: field:banking.import.transaction,remote_bank_ibei:0 -msgid "remote_bank_ibei" -msgstr "remote_bank_ibei" +#: view:account.banking.bank.import:0 field:account.banking.bank.import,log:0 +msgid "Log" +msgstr "Log" #. module: account_banking #: field:account.banking.account.settings,bank_partner_id:0 @@ -158,23 +123,21 @@ msgstr "Relatie bank" msgid "Default Journal for Bank Account" msgstr "Standaard dagboek voor bankrekening" +#. module: account_banking +#: field:banking.transaction.wizard,move_line_ids:0 +msgid "Entry lines" +msgstr "Boekingsregels" + +#. module: account_banking +#: field:account.bank.statement.line,parent_id:0 +msgid "Parent" +msgstr "Bovenliggende" + #. module: account_banking #: field:account.banking.bank.import,file:0 msgid "Statements File" msgstr "Bankafschriftbestand" -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:601 -#, python-format -msgid "Cannot reconcile: no direct debit order" -msgstr "Kan niet afletteren: geen incasso-opdracht" - -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1321 -#, python-format -msgid "The account number has the wrong format for %(country)s" -msgstr "Het rekeningnummer heeft het verkeerde formaat voor %(country)s" - #. module: account_banking #: field:account.banking.bank.import,import_id:0 msgid "Import File" @@ -195,8 +158,8 @@ msgstr "Bedrijf" #. module: account_banking #: selection:account.bank.statement.line,match_type:0 -#: field:banking.import.line,payment_order_id:0 #: selection:banking.import.transaction,match_type:0 +#: selection:banking.transaction.wizard,match_type:0 msgid "Payment order" msgstr "Betaalopdracht" @@ -218,15 +181,9 @@ msgid "Linked Invoice" msgstr "Gerelateerde factuur" #. module: account_banking -#: code:addons/account_banking/wizard/banktools.py:107 -#, python-format -msgid "Bank account %(account_no)s was not found in the database" -msgstr "Bankrekening %(account_no)s niet gevonden in de database" - -#. module: account_banking -#: selection:account.banking.bank.import,state:0 -msgid "init" -msgstr "init" +#: field:banking.transaction.wizard,manual_move_line_ids:0 +msgid "Or match one or more entries" +msgstr "Of match één of meerdere boekingen" #. module: account_banking #: field:banking.import.transaction,transferred_amount:0 @@ -239,12 +196,6 @@ msgstr "transferred_amount" msgid "Bank Transactions" msgstr "Bankmutaties" -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1676 -#, python-format -msgid "You cannot confirm a bank transfer marked as a duplicate (%s.%s)" -msgstr "Een bankmutatie gemarkeerd als duplicaat kan niet worden bevestigd (%s.%s)" - #. module: account_banking #: field:banking.import.line,statement_line_id:0 msgid "Resulting statement line" @@ -256,17 +207,16 @@ msgstr "Bankafschriftregel" msgid "Matching invoices" msgstr "Gematchte facturen" -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1435 -#, python-format -msgid "Free Reference" -msgstr "Vrije referentie" - #. module: account_banking #: field:banking.import.line,reconcile_id:0 msgid "Reconciliaton" msgstr "Aflettering" +#. module: account_banking +#: view:banking.link_partner:0 view:banking.transaction.wizard:0 +msgid "Transaction data" +msgstr "Transactie gegevens" + #. module: account_banking #: field:banking.import.transaction,execution_date:0 msgid "execution_date" @@ -293,27 +243,9 @@ msgid "remote_currency" msgstr "remote_currency" #. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:300 -#, python-format -msgid "Number of statements skipped due to errors" -msgstr "Aantal afschriften overgeslagen door fouten" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:949 -#, python-format -msgid "Cannot check for duplicate" -msgstr "Kan niet controleren op duplicaten" - -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1351 -#, python-format -msgid "Invalid IBAN account number!" -msgstr "Ongeldig IBAN-rekeningnummer" - -#. module: account_banking -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "U kunt geen boekingsregel creëren op een gesloten rekening" +#: field:banking.link_partner,mobile:0 +msgid "Mobile" +msgstr "Mobiel" #. module: account_banking #: field:banking.import.line,note:0 @@ -325,29 +257,17 @@ msgstr "Notities" msgid "Canceled debit order" msgstr "Geannuleerde incasso-opdracht" -#. module: account_banking -#: field:banking.import.transaction,writeoff_journal_id:0 -#: field:banking.transaction.wizard,writeoff_journal_id:0 -msgid "Write-off journal" -msgstr "Dagboek afschrijvingen" - #. module: account_banking #: view:account.banking.account.settings:0 msgid "Default Import Settings for Bank Account" msgstr "Standaardinstellingen bankrekening voor import" #. module: account_banking -#: field:banking.import.line,amount:0 +#: field:banking.import.line,amount:0 field:banking.link_partner,amount:0 #: field:banking.transaction.wizard,amount:0 msgid "Amount" msgstr "Bedrag" -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:704 -#, python-format -msgid "Line id not found" -msgstr "Regel id niet gevonden" - #. module: account_banking #: field:account.bank.statement.line,match_type:0 #: field:banking.import.transaction,match_type:0 @@ -356,48 +276,20 @@ msgid "Match type" msgstr "Matchtype" #. module: account_banking -#: help:banking.import.transaction,bank_country_code:0 -msgid "Fallback default country for new partner records, as defined by the import parser" -msgstr "Achtervang-standaardland voor nieuwe relaties, zoals ingegeven door de invoerparser" +#: selection:account.banking.bank.import,parser:0 +msgid "MT940 Structured" +msgstr "MT940 Structured" #. module: account_banking -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "Verkeerde debet of credit waarde in boekingsregel!" - -#. module: account_banking -#: field:banking.import.transaction,remote_bank_chips_uid:0 -msgid "remote_bank_chips_uid" -msgstr "remote_bank_chips_uid" - -#. module: account_banking -#: field:banking.import.transaction,writeoff_account_id:0 -#: field:banking.transaction.wizard,writeoff_account_id:0 -msgid "Write-off account" -msgstr "Grootboekrekening afschrijven" - -#. module: account_banking -#: selection:payment.line,export_state:0 -msgid "Cancelled" -msgstr "Geannuleerd" - -#. module: account_banking -#: view:account.banking.bank.import:0 -#: view:account.banking.imported.file:0 +#: view:account.banking.bank.import:0 view:account.banking.imported.file:0 #: field:account.banking.imported.file,statement_ids:0 msgid "Statements" msgstr "Afschriften" #. module: account_banking -#: field:banking.transaction.wizard,payment_line_id:0 -msgid "Matching payment or storno" -msgstr "Gevonden betaling of storno" - -#. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:128 -#, python-format -msgid "Unable to import parser %(parser)s. Parser class not found." -msgstr "Niet in staat parser %(parser)s te importeren. Parser class niet gevonden." +#: view:banking.link_partner:0 +msgid "Create partner" +msgstr "Aanmaken relatie" #. module: account_banking #: model:ir.model,name:account_banking.model_account_bank_statement_line @@ -410,16 +302,11 @@ msgid "Possible duplicate import" msgstr "Mogelijke dubbele import" #. module: account_banking -#: field:banking.import.line,ref:0 +#: field:banking.import.line,ref:0 field:banking.link_partner,ref:0 +#: field:banking.transaction.wizard,ref:0 msgid "Reference" msgstr "Referentie" -#. module: account_banking -#: code:addons/account_banking/account_banking.py:444 -#, python-format -msgid "Journal Item \"%s\" is not valid" -msgstr "Journaalpost \"%s\" is niet geldig" - #. module: account_banking #: field:account.banking.account.settings,default_debit_account_id:0 msgid "Default debit account" @@ -427,29 +314,26 @@ msgstr "Standaard debetrekening" #. module: account_banking #: selection:account.bank.statement.line,match_type:0 -#: field:account.bank.statement.line,move_id:0 #: selection:banking.import.transaction,match_type:0 +#: selection:banking.transaction.wizard,match_type:0 msgid "Move" msgstr "Boeking" #. module: account_banking -#: code:addons/account_banking/wizard/banktools.py:307 -#: code:addons/account_banking/wizard/banktools.py:397 -#, python-format -msgid "Unknown Bank" -msgstr "Onbekende bank" +#: selection:account.banking.bank.import,parser:0 +msgid "Triodos Bank" +msgstr "Triodos Bank" + +#. module: account_banking +#: constraint:account.bank.statement:0 +msgid "The journal and period chosen have to belong to the same company." +msgstr "Het gekozen dagboek en periode moeten behoren tot hetzelfde bedrijf." #. module: account_banking #: selection:banking.import.line,transaction_type:0 msgid "Invoice payment" msgstr "Factuurbetaling" -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1673 -#, python-format -msgid "Bank transfer flagged as duplicate" -msgstr "Bankmutatie is gemarkeerd als duplicaat" - #. module: account_banking #: field:banking.import.transaction,writeoff_move_line_id:0 msgid "Write off move line" @@ -467,24 +351,16 @@ msgid "Match transaction" msgstr "Match deze mutatie" #. module: account_banking -#: sql_constraint:payment.line:0 -msgid "The payment line name must be unique!" -msgstr "De betaalregelnaam moet uniek zijn!" - -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1309 -#, python-format -msgid "The account number appears to be invalid for %(country)s" -msgstr "Het bankrekeningnummer lijkt ongeldig te zijn voor %(country)s" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:633 -#, python-format -msgid "Cannot unreconcile: this operation is not yet supported for match type 'payment'" -msgstr "Kan niet afletteren: deze bewerking wordt noge niet ondersteund voor matches van het type 'betaling'" +#: field:banking.import.transaction,statement_line_id:0 +#: field:banking.link_partner,statement_line_id:0 +#: field:banking.transaction.wizard,statement_line_id:0 +msgid "Statement line" +msgstr "Bankafschriftregel" #. module: account_banking +#: field:account.banking.account.settings,partner_id:0 #: field:banking.import.line,partner_id:0 +#: field:banking.transaction.wizard,partner_id:0 msgid "Partner" msgstr "Relatie" @@ -494,9 +370,9 @@ msgid "Import Date" msgstr "Importdatum" #. module: account_banking -#: field:payment.mode.type,suitable_bank_types:0 -msgid "Suitable bank types" -msgstr "Geschikte banktypen" +#: field:banking.import.transaction,remote_bank_tax_id:0 +msgid "remote_bank_tax_id" +msgstr "remote_bank_tax_id" #. module: account_banking #: view:banking.transaction.wizard:0 @@ -504,9 +380,9 @@ msgid "Select" msgstr "Selecteer" #. module: account_banking -#: model:ir.model,name:account_banking.model_account_banking_bank_import -msgid "account.banking.bank.import" -msgstr "account.banking.bank.import" +#: selection:banking.import.line,transaction_type:0 +msgid "Payment from a payment order" +msgstr "Betaling uit een betaalopdracht" #. module: account_banking #: field:banking.import.transaction,remote_bank_bei:0 @@ -514,22 +390,20 @@ msgid "remote_bank_bei" msgstr "remote_bank_bei" #. module: account_banking +#: view:account.bank.statement.line:0 #: selection:account.bank.statement.line,state:0 -#: selection:payment.line,export_state:0 msgid "Confirmed" msgstr "Bevestigd" #. module: account_banking -#: model:ir.actions.act_window,name:account_banking.action_account_banking_res_partner_banks -#: model:ir.model,name:account_banking.model_res_partner_bank -#: model:ir.ui.menu,name:account_banking.menu_action_account_banking_bank_accounts -msgid "Bank Accounts" -msgstr "Bankrekeningen" +#: view:account.banking.imported.file:0 +msgid "Import Details" +msgstr "Importdetails" #. module: account_banking -#: help:account.bank.statement.line,move_id:0 -msgid "The accounting move associated with this line" -msgstr "Boeking nav. deze regel" +#: field:banking.import.transaction,remote_owner:0 +msgid "remote_owner" +msgstr "remote_owner" #. module: account_banking #: view:account.banking.account.settings:0 @@ -546,35 +420,32 @@ msgstr "Bevestig" msgid "Default credit account" msgstr "Standaard creditrekening" -#. module: account_banking -#: field:account.bank.statement.line,period_id:0 -#: field:banking.import.line,period_id:0 -msgid "Period" -msgstr "Periode" - #. module: account_banking #: field:banking.import.line,transaction_type:0 msgid "Transaction type" msgstr "Mutatietype" #. module: account_banking +#: view:account.bank.statement.line:0 #: field:account.bank.statement.line,state:0 #: field:account.banking.bank.import,state:0 #: field:account.banking.imported.file,state:0 -#: field:payment.line,export_state:0 +#: field:banking.link_partner,state_id:0 msgid "State" msgstr "Status" +#. module: account_banking +#: selection:account.bank.statement.line,match_type:0 +#: selection:banking.import.transaction,match_type:0 +#: selection:banking.transaction.wizard,match_type:0 +msgid "Payment order (manual)" +msgstr "Betaalopdracht (handmatig)" + #. module: account_banking #: field:account.bank.statement.line,trans:0 msgid "Bank Transaction ID" msgstr "Bankmutatie ID" -#. module: account_banking -#: model:ir.model,name:account_banking.model_payment_mode -msgid "Payment Mode" -msgstr "Betaalmodus" - #. module: account_banking #: view:banking.transaction.wizard:0 msgid "Match again" @@ -596,15 +467,14 @@ msgid "Type" msgstr "Type" #. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:251 -#, python-format -msgid "Statement %(id)s known - skipped" -msgstr "Afschrift %(id)s al bekend - overgeslagen" +#: field:banking.link_partner,email:0 +msgid "Email" +msgstr "E-mail" #. module: account_banking -#: view:banking.transaction.wizard:0 -msgid "If the amount exceeds the match, you must set a write-off account and journal for the residual of this reconciliation. If the amount is smaller than the match, this is optional. If you do not set a write-off account in this case, the result will be a partial reconciliation." -msgstr "Als het bedrag van de mutatie de gevonden match overschrijdt, moet er een grootboekrekening en een dagboek worden opgegeven om het restbedrag van de aflettering af te schrijven. Dit is optioneel als het bedrag van de mutatie kleiner is dan de gevonden match. Als u in dit geval geen afschrijving mogelijk maakt, zal het systeem een gedeeltelijke aflettering aanmaken." +#: view:banking.link_partner:0 +msgid "Link existing partner" +msgstr "Koppel bestaande relatie" #. module: account_banking #: field:banking.transaction.wizard,move_line_id:0 @@ -612,47 +482,21 @@ msgid "Entry line" msgstr "Boekingsregel" #. module: account_banking -#: selection:banking.import.line,transaction_type:0 -msgid "Payment from a payment order" -msgstr "Betaling uit een betaalopdracht" +#: field:banking.transaction.wizard,analytic_account_id:0 +msgid "Analytic Account" +msgstr "Kostenplaats" #. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1732 -#: code:addons/account_banking/banking_import_transaction.py:1741 -#, python-format -msgid "Cannot cancel bank transaction" -msgstr "Kan de bankmutatie niet annuleren" +#: view:account.bank.statement:0 view:account.bank.statement.line:0 +#: view:banking.link_partner:0 +#: model:ir.model,name:account_banking.model_banking_link_partner +msgid "Link partner" +msgstr "Koppel relatie" #. module: account_banking -#: code:addons/account_banking/account_banking.py:443 -#: code:addons/account_banking/banking_import_transaction.py:1818 -#, python-format -msgid "Error !" -msgstr "Fout !" - -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1308 -#, python-format -msgid "Invalid data" -msgstr "Ongeldige gegevens" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:684 -#: code:addons/account_banking/banking_import_transaction.py:688 -#: code:addons/account_banking/banking_import_transaction.py:703 -#, python-format -msgid "Cannot cancel link with storno" -msgstr "Kan de relatie met de storno niet annuleren" - -#. module: account_banking -#: selection:account.banking.bank.import,state:0 -msgid "review" -msgstr "review" - -#. module: account_banking -#: selection:payment.line,export_state:0 -msgid "Rejected" -msgstr "Verworpen" +#: field:banking.link_partner,is_company:0 +msgid "Is a Company" +msgstr "Is dit een bedrijf?" #. module: account_banking #: model:ir.actions.act_window,name:account_banking.action_account_banking_journals @@ -669,59 +513,33 @@ msgstr "Importeer bankafschriftbestand" #. module: account_banking #: help:account.banking.bank.import,file:0 -msgid "The Transactions File to import. Please note that while it is perfectly safe to reload the same file multiple times or to load in timeframe overlapping statements files, there are formats that may introduce different sequencing, which may create double entries.\n" +msgid "" +"The Transactions File to import. Please note that while it is perfectly safe " +"to reload the same file multiple times or to load in timeframe overlapping " +"statements files, there are formats that may introduce different sequencing, " +"which may create double entries.\n" "\n" -"To stay on the safe side, always load bank statements files using the same format." -msgstr "Het bankafschriftbestand dat geïmporteerd dient te worden. De verschillende bankformaten gaan verschillend om met de situatie waarin hetzelfde bestand meerdere keren wordt geïmporteerd.\n" +"To stay on the safe side, always load bank statements files using the same " +"format." +msgstr "" +"Het bankafschriftbestand dat geïmporteerd dient te worden. De verschillende " +"bankformaten gaan verschillend om met de situatie waarin hetzelfde bestand " +"meerdere keren wordt geïmporteerd.\n" "\n" -"Het is daarom in ieder geval aan te raden om de bankafschriften altijd in hetzelfde formaat te importeren." +"Het is daarom in ieder geval aan te raden om de bankafschriften altijd in " +"hetzelfde formaat te importeren." #. module: account_banking -#: view:account.bank.statement:0 -#: view:account.bank.statement.line:0 -#: view:banking.transaction.wizard:0 -msgid "Match" -msgstr "Match" - -#. module: account_banking -#: field:banking.import.transaction,payment_line_id:0 -msgid "Payment line" -msgstr "Betaling" - -#. module: account_banking -#: field:banking.import.transaction,payment_order_id:0 -#: field:banking.transaction.wizard,payment_order_id:0 -msgid "Payment order to reconcile" -msgstr "Betaalopdracht ter aflettering" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1742 -#, python-format -msgid "Cannot cancel this bank transaction. The information needed to undo the accounting entries has not been recorded" -msgstr "Kan de bankmutatie niet annuleren. De benodigde informatie om de boekingen teniet te doen is niet beschikbaar" - -#. module: account_banking -#: view:banking.transaction.wizard:0 -msgid "Duplicate flag" -msgstr "Duplicaatkenmerk" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:461 -#, python-format -msgid "Entry is already reconciled" -msgstr "Boeking is al afgeletterd" +#: field:banking.import.transaction,writeoff_account_id:0 +#: field:banking.transaction.wizard,writeoff_account_id:0 +msgid "Write-off account" +msgstr "Grootboekrekening afschrijven" #. module: account_banking #: view:account.banking.bank.import:0 msgid "Transaction" msgstr "Mutatie" -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1282 -#, python-format -msgid "Insufficient data to select online conversion database" -msgstr "Onvoldoende gegevens om een online conversiebestand te selecteren" - #. module: account_banking #: field:account.banking.bank.import,statement_ids:0 #: view:account.banking.imported.file:0 @@ -729,161 +547,26 @@ msgid "Imported Bank Statements" msgstr "Geïmporteerde bankafschriften" #. module: account_banking -#: selection:payment.mode.type,payment_order_type:0 -#: selection:payment.order,payment_order_type:0 -msgid "Direct debit" -msgstr "Incasso-opdracht" +#: field:banking.import.transaction,writeoff_amount:0 +msgid "Difference Amount" +msgstr "Verschil bedrag" #. module: account_banking #: model:ir.model,name:account_banking.model_banking_import_transaction msgid "Bank import transaction" msgstr "Geïmporteerde bankmutatie" -#. module: account_banking -#: model:ir.module.module,description:account_banking.module_meta_information -msgid "\n" -" Module to do banking.\n" -"\n" -" Note: This module is depending on BeautifulSoup.\n" -"\n" -" This modules tries to combine all current banking import and export\n" -" schemes. Rationale for this is that it is quite common to have foreign\n" -" bank account numbers next to national bank account numbers. The current\n" -" approach, which hides the national banking interface schemes in the\n" -" l10n_xxx modules, makes it very difficult to use these simultanious.\n" -" A more banking oriented approach seems more logical and cleaner.\n" -"\n" -" Changes to default OpenERP:\n" -"\n" -" * Puts focus on the real life messaging with banks:\n" -" + Bank statement lines upgraded to independent bank transactions.\n" -" + Banking statements have no special accountancy meaning, they're just\n" -" message envelopes for a number of bank transactions.\n" -" + Bank statements can be either encoded by hand to reflect the document\n" -" version of Bank Statements, or created as an optional side effect of\n" -" importing Bank Transactions.\n" -"\n" -" * Preparations for SEPA:\n" -" + IBAN accounts are the standard in the SEPA countries\n" -" + local accounts are derived from SEPA (excluding Turkey) but are\n" -" considered to be identical to the corresponding SEPA account.\n" -" + Banks are identified with either Country + Bank code + Branch code or BIC\n" -" + Each bank can have its own pace in introducing SEPA into their\n" -" communication with their customers.\n" -" + National online databases can be used to convert BBAN's to IBAN's.\n" -" + The SWIFT database is consulted for bank information.\n" -"\n" -" * Adds dropin extensible import facility for bank communication in:\n" -" - Drop-in input parser development.\n" -" - MultiBank (NL) format transaction files available as\n" -" account_banking_nl_multibank,\n" -"\n" -" * Extends payments for digital banking:\n" -" + Adapted workflow in payments to reflect banking operations\n" -" + Relies on account_payment mechanics to extend with export generators.\n" -" - ClieOp3 (NL) payment and direct debit orders files available as\n" -" account_banking_nl_clieop\n" -"\n" -" * Additional features for the import/export mechanism:\n" -" + Automatic matching and creation of bank accounts, banks and partners,\n" -" during import of statements.\n" -" + Automatic matching with invoices and payments.\n" -" + Sound import mechanism, allowing multiple imports of the same\n" -" transactions repeated over multiple files.\n" -" + Journal configuration per bank account.\n" -" + Business logic and format parsing strictly separated to ease the\n" -" development of new parsers.\n" -" + No special configuration needed for the parsers, new parsers are\n" -" recognized and made available at server (re)start.\n" -" " -msgstr "\n" -" Module to do banking.\n" -"\n" -" Note: This module is depending on BeautifulSoup.\n" -"\n" -" This modules tries to combine all current banking import and export\n" -" schemes. Rationale for this is that it is quite common to have foreign\n" -" bank account numbers next to national bank account numbers. The current\n" -" approach, which hides the national banking interface schemes in the\n" -" l10n_xxx modules, makes it very difficult to use these simultanious.\n" -" A more banking oriented approach seems more logical and cleaner.\n" -"\n" -" Changes to default OpenERP:\n" -"\n" -" * Puts focus on the real life messaging with banks:\n" -" + Bank statement lines upgraded to independent bank transactions.\n" -" + Banking statements have no special accountancy meaning, they're just\n" -" message envelopes for a number of bank transactions.\n" -" + Bank statements can be either encoded by hand to reflect the document\n" -" version of Bank Statements, or created as an optional side effect of\n" -" importing Bank Transactions.\n" -"\n" -" * Preparations for SEPA:\n" -" + IBAN accounts are the standard in the SEPA countries\n" -" + local accounts are derived from SEPA (excluding Turkey) but are\n" -" considered to be identical to the corresponding SEPA account.\n" -" + Banks are identified with either Country + Bank code + Branch code or BIC\n" -" + Each bank can have its own pace in introducing SEPA into their\n" -" communication with their customers.\n" -" + National online databases can be used to convert BBAN's to IBAN's.\n" -" + The SWIFT database is consulted for bank information.\n" -"\n" -" * Adds dropin extensible import facility for bank communication in:\n" -" - Drop-in input parser development.\n" -" - MultiBank (NL) format transaction files available as\n" -" account_banking_nl_multibank,\n" -"\n" -" * Extends payments for digital banking:\n" -" + Adapted workflow in payments to reflect banking operations\n" -" + Relies on account_payment mechanics to extend with export generators.\n" -" - ClieOp3 (NL) payment and direct debit orders files available as\n" -" account_banking_nl_clieop\n" -"\n" -" * Additional features for the import/export mechanism:\n" -" + Automatic matching and creation of bank accounts, banks and partners,\n" -" during import of statements.\n" -" + Automatic matching with invoices and payments.\n" -" + Sound import mechanism, allowing multiple imports of the same\n" -" transactions repeated over multiple files.\n" -" + Journal configuration per bank account.\n" -" + Business logic and format parsing strictly separated to ease the\n" -" development of new parsers.\n" -" + No special configuration needed for the parsers, new parsers are\n" -" recognized and made available at server (re)start.\n" -" " - -#. module: account_banking -#: selection:account.banking.bank.import,state:0 -msgid "error" -msgstr "error" - #. module: account_banking #: selection:account.bank.statement.line,match_type:0 #: selection:banking.import.transaction,match_type:0 +#: selection:banking.transaction.wizard,match_type:0 msgid "Manual" msgstr "Handmatig" #. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1733 -#, python-format -msgid "The bank statement that this transaction belongs to has already been confirmed" -msgstr "Het bankafschrift waar deze mutatie toe behoort is al bevestigd" - -#. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:127 -#: code:addons/account_banking/wizard/bank_import.py:141 -#, python-format -msgid "ERROR!" -msgstr "FOUT!" - -#. module: account_banking -#: view:account.bank.statement.line:0 -#: field:account.bank.statement.line,state:0 -#: field:account.banking.bank.import,state:0 -#: field:account.banking.imported.file,state:0 -#: field:payment.line,export_state:0 -msgid "State" -msgstr "Staat" +#: field:banking.link_partner,fax:0 +msgid "Fax" +msgstr "Fax" #. module: account_banking #: view:account.banking.bank.import:0 @@ -891,27 +574,10 @@ msgid "Import Bank Transactions File" msgstr "Bankmutatiebestand import" #. module: account_banking -#: view:payment.order:0 -msgid "Make Payments" -msgstr "Maak betalingen" - -#. module: account_banking -#: code:addons/account_banking/wizard/banktools.py:206 -#, python-format -msgid "Account %(account_no)s is not owned by %(partner)s" -msgstr "Rekening %(account_no)s is geen eigendom van %(partner)s" - -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1414 -#, python-format -msgid "My reference" -msgstr "Mijn referentie" - -#. module: account_banking -#: field:banking.import.transaction,statement_line_id:0 -#: field:banking.transaction.wizard,statement_line_id:0 -msgid "Statement line" -msgstr "Bankafschriftregel" +#: selection:banking.import.transaction,payment_option:0 +#: selection:banking.transaction.wizard,payment_option:0 +msgid "Reconcile Payment Balance" +msgstr "Afletteren betaal saldo" #. module: account_banking #: field:banking.import.transaction,storno_retry:0 @@ -919,9 +585,10 @@ msgid "storno_retry" msgstr "storno_retry" #. module: account_banking -#: view:banking.transaction.wizard:0 -msgid "Residual write-off" -msgstr "Afschrijven restbedrag" +#: field:banking.import.transaction,payment_option:0 +#: field:banking.transaction.wizard,payment_option:0 +msgid "Payment Difference" +msgstr "Betaalverschil" #. module: account_banking #: field:banking.import.transaction,effective_date:0 @@ -934,31 +601,37 @@ msgid "Search Bank Transactions " msgstr "Zoek bankmutaties" #. module: account_banking -#: code:addons/account_banking/wizard/banktools.py:179 -#, python-format -msgid "More then one possible match found for partner with name %(name)s" -msgstr "Meer dan één mogelijke match gevonden voor partner met naam %(name)s" +#: view:banking.transaction.wizard:0 +msgid "" +"You can let the system try to match this bank statement line again after you " +"have made any changes in the database (for instance, add an invoice or a " +"bank account)." +msgstr "" +"Laat de mutatie opnieuw matchen met de boekingen in het systeem nadat u de " +"nodige wijzigingen in het systeem hebt aangebracht (bijvoorbeeld na het " +"aanmaken van een factuur of het koppelen van een relatie aan een bepaalde " +"bankrekening." #. module: account_banking -#: field:payment.order,date_sent:0 -msgid "Send date" -msgstr "Datum verstuurd" +#: view:res.partner.bank:0 +msgid "onchange_domestic(acc_number_domestic, partner_id, country_id)" +msgstr "onchange_domestic(acc_number_domestic, partner_id, country_id)" #. module: account_banking -#: model:ir.model,name:account_banking.model_payment_mode_type -msgid "Payment Mode Type" -msgstr "Type betaalmodus" +#: field:banking.transaction.wizard,manual_invoice_ids:0 +msgid "Match one or more invoices" +msgstr "Match één of meerdere facturen" #. module: account_banking -#: field:banking.import.transaction,remote_bank_tax_id:0 -msgid "remote_bank_tax_id" -msgstr "remote_bank_tax_id" - -#. module: account_banking -#: view:account.banking.bank.import:0 +#: view:account.bank.statement:0 view:account.banking.bank.import:0 #: field:account.banking.bank.import,line_ids:0 msgid "Transactions" -msgstr "Mutaties" +msgstr "Transacties" + +#. module: account_banking +#: view:account.bank.statement:0 +msgid "Journal Entries" +msgstr "Boekingen" #. module: account_banking #: field:account.bank.statement.line,currency:0 @@ -966,110 +639,73 @@ msgstr "Mutaties" msgid "Currency" msgstr "Valuta" +#. module: account_banking +#: field:banking.import.transaction,statement:0 +msgid "statement" +msgstr "afschrift" + #. module: account_banking #: field:banking.import.transaction,bank_country_code:0 msgid "Bank country code" -msgstr "Bank country code" +msgstr "Bank landcode" #. module: account_banking -#: help:payment.mode.type,ir_model_id:0 -msgid "Select the Payment Wizard for payments of this type. Leave empty for manual processing" -msgstr "Selecteer de wizard voor het verwerken van betalingen van dit type. Laat leeg voor handmatige verwerking." - -#. module: account_banking -#: field:payment.line,msg:0 +#: field:banking.link_partner,message:0 +#: field:banking.transaction.wizard,message:0 msgid "Message" -msgstr "Boodschap" +msgstr "Bericht" #. module: account_banking +#: model:ir.model,name:account_banking.model_account_banking_bank_import +msgid "account.banking.bank.import" +msgstr "account.banking.bank.import" + +#. module: account_banking +#: field:banking.import.transaction,remote_bank_duns:0 +msgid "remote_bank_duns" +msgstr "remote_bank_duns" + +#. module: account_banking +#: view:banking.transaction.wizard:0 #: field:banking.transaction.wizard,match_multi:0 msgid "Multiple matches" msgstr "Meerdere matches" #. module: account_banking -#: view:account.banking.bank.import:0 -#: field:account.banking.bank.import,log:0 -msgid "Log" -msgstr "Log" +#: selection:account.bank.statement.line,match_type:0 +#: selection:banking.import.transaction,match_type:0 +#: selection:banking.transaction.wizard,match_type:0 +#: model:ir.model,name:account_banking.model_account_invoice +msgid "Invoice" +msgstr "Factuur" #. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:553 -#, python-format -msgid "Cannot link transaction %s with accounting entry" -msgstr "Kan mutatie %s niet koppelen aan een journaalboeking" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1177 -#, python-format -msgid "transaction %(statement_id)s.%(transaction_id)s for account %(bank_account)s uses different currency than the defined bank journal." -msgstr "Mutatie %(statement_id)s.%(transaction_id)s van bankrekening %(bank_account)s gebruikt een andere valuta dan het ingestelde bankboek." - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:580 -#, python-format -msgid "Cannot link with storno" -msgstr "Kan niet koppelen met een storno" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:543 -#, python-format -msgid "Cannot link transaction %s with invoice" -msgstr "Kan mutatie %s niet koppelen aan een factuur" +#: field:account.banking.imported.file,user_id:0 +msgid "Responsible User" +msgstr "Verantwoordelijk gebruiker" #. module: account_banking #: selection:account.banking.imported.file,state:0 msgid "Review" msgstr "Herzien" -#. module: account_banking -#: field:banking.transaction.wizard,manual_move_line_id:0 -msgid "Or match this entry" -msgstr "Of koppel deze boekingsregel" - -#. module: account_banking -#: help:payment.mode.type,name:0 -msgid "Payment Type" -msgstr "Betaaltype" - -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1281 -#, python-format -msgid "Insufficient data" -msgstr "Onvoldoende gegevens" - #. module: account_banking #: field:account.banking.imported.file,file:0 msgid "Raw Data" msgstr "Ruwe data" -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1813 -#, python-format -msgid "Please verify that an account is defined in the journal." -msgstr "Er is een standaardrekening niet ingesteld op het dagboek." - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:649 -#, python-format -msgid "Unreconcile payment order not implemented" -msgstr "Unreconcile payment order not implemented" - #. module: account_banking #: help:account.banking.account.settings,default_debit_account_id:0 -msgid "The account to use when an unexpected payment is received. This can be needed when a customer pays in advance or when no matching invoice can be found. Mind that you can correct movements before confirming them." -msgstr "De grootboekrekening waarop een onverwachte betaling kan worden geboekt, bijvoorbeeld in het geval van een klant die vooruitbetaalt of als er geen overeenkomende factuur kan worden gevonden in het systeem. Merk op dat er voor het bevestigen van de boekingen nog wijzigingen kunnen worden aangebracht." - -#. module: account_banking -#: field:payment.mode.type,payment_order_type:0 -#: field:payment.order,payment_order_type:0 -msgid "Payment order type" -msgstr "Type betaalopdracht" - -#. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:296 -#, python-format -msgid "Total number of transactions" -msgstr "Totaal aantal transacties" +msgid "" +"The account to use when an unexpected payment is received. This can be " +"needed when a customer pays in advance or when no matching invoice can be " +"found. Mind that you can correct movements before confirming them." +msgstr "" +"De grootboekrekening waarop een onverwachte betaling kan worden geboekt, " +"bijvoorbeeld in het geval van een klant die vooruitbetaalt of als er geen " +"overeenkomende factuur kan worden gevonden in het systeem. Merk op dat er " +"voor het bevestigen van de boekingen nog wijzigingen kunnen worden " +"aangebracht." #. module: account_banking #: field:banking.import.transaction,exchange_rate:0 @@ -1077,27 +713,15 @@ msgid "exchange_rate" msgstr "exchange_rate" #. module: account_banking -#: field:banking.import.line,duplicate:0 +#: field:banking.import.line,duplicate:0 view:banking.transaction.wizard:0 msgid "Duplicate" msgstr "Duplicaat" #. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1683 -#, python-format -msgid "You have to define an analytic journal on the '%s' journal!" -msgstr "Er moet een analytisch journaal worden ingesteld op het '%s' journaal!" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1812 -#, python-format -msgid "Configuration Error !" -msgstr "Configuratiefout !" - -#. module: account_banking +#: view:account.bank.statement.line:0 #: selection:account.bank.statement.line,state:0 -#: selection:payment.line,export_state:0 msgid "Draft" -msgstr "Draft" +msgstr "Concept" #. module: account_banking #: view:banking.transaction.wizard:0 @@ -1109,17 +733,6 @@ msgstr "Afletteren ongedaan maken" msgid "Bank Statements File" msgstr "Bankafschriftbestand" -#. module: account_banking -#: code:addons/account_banking/parsers/models.py:368 -#, python-format -msgid "This is a stub. Please implement your own." -msgstr "Dit is een stub. Maak alstublieft uw eigen versie." - -#. module: account_banking -#: field:banking.import.transaction,type:0 -msgid "type" -msgstr "type" - #. module: account_banking #: view:account.banking.bank.import:0 msgid "Import" @@ -1128,11 +741,10 @@ msgstr "Import" #. module: account_banking #: field:banking.import.transaction,message:0 msgid "message" -msgstr "message" +msgstr "bericht" #. module: account_banking -#: view:account.bank.statement:0 -#: view:account.bank.statement.line:0 +#: view:account.bank.statement:0 view:account.bank.statement.line:0 msgid "Confirm transaction" msgstr "Bevestig mutatie" @@ -1142,14 +754,25 @@ msgid "provision_costs_currency" msgstr "provision_costs_currency" #. module: account_banking -#: constraint:account.bank.statement.line:0 -msgid "The amount of the voucher must be the same amount as the one on the statement line" -msgstr "Het bedrag van de bon moet hetzelfde zijn als die op de bankafschriftregel" +#: view:banking.transaction.wizard:0 +msgid "" +"Choose what you want to do with the eventual difference between the paid " +"amount and the sum of allocated amounts. You can either choose to keep open " +"this difference on the partner's account, or reconcile it with the payment." +msgstr "" +"Bepaal wat u wilt doen met het eventuele verschil tussen het betaalde bedrag " +"en de som van alle geselecteerde bedragen. U kunt kiezen om het verschil " +"open te laten of deze af te letteren met een betaling." #. module: account_banking #: view:banking.transaction.wizard:0 -msgid "This bank transfer was marked as a duplicate. You can either confirm that this is not the case, or remove the bank transfer from the system." -msgstr "Deze bankatransactie is gemarkeerd als een duplicaat. U kunt de bankafschriftregel verwijderen uit het systeem als dit het geval is, anders kunt u het kenmerk 'duplicaat' hier verwijderen." +msgid "" +"This bank transfer was marked as a duplicate. You can either confirm that " +"this is not the case, or remove the bank transfer from the system." +msgstr "" +"Deze bankatransactie is gemarkeerd als een duplicaat. U kunt de " +"bankafschriftregel verwijderen uit het systeem als dit het geval is, anders " +"kunt u het kenmerk 'duplicaat' hier verwijderen." #. module: account_banking #: view:account.banking.imported.file:0 @@ -1158,15 +781,39 @@ msgstr "Deze bankatransactie is gemarkeerd als een duplicaat. U kunt de bankafsc msgid "Imported Bank Statements Files" msgstr "Geïmporteerde bankafschriftbestanden" +#. module: account_banking +#: help:banking.import.transaction,payment_option:0 +msgid "" +"This field helps you to choose what you want to do with the eventual " +"difference between the paid amount and the sum of allocated amounts. You can " +"either choose to keep open this difference on the partner's account, or " +"reconcile it with the payment(s)" +msgstr "" +"This field helps you to choose what you want to do with the eventual " +"difference between the paid amount and the sum of allocated amounts. You can " +"either choose to keep open this difference on the partner's account, or " +"reconcile it with the payment(s)" + #. module: account_banking #: field:banking.import.line,invoice_ids:0 +#: field:banking.transaction.wizard,statement_line_parent_id:0 msgid "unknown" msgstr "onbekend" #. module: account_banking -#: field:banking.import.transaction,remote_bank_duns:0 -msgid "remote_bank_duns" -msgstr "remote_bank_duns" +#: field:banking.link_partner,street2:0 +msgid "Street2" +msgstr "Straat2" + +#. module: account_banking +#: selection:account.banking.bank.import,state:0 +msgid "init" +msgstr "init" + +#. module: account_banking +#: field:banking.link_partner,phone:0 +msgid "Phone" +msgstr "Telefoon" #. module: account_banking #: field:banking.import.transaction,duplicate:0 @@ -1174,9 +821,9 @@ msgid "duplicate" msgstr "duplicaat" #. module: account_banking -#: field:account.bank.statement,banking_id:0 -msgid "Imported File" -msgstr "Geïmpoteerd bestand" +#: field:banking.link_partner,name:0 +msgid "Create partner with name" +msgstr "Create partner with name" #. module: account_banking #: selection:banking.import.line,transaction_type:0 @@ -1195,7 +842,7 @@ msgid "Import Log" msgstr "Importlog" #. module: account_banking -#: field:banking.import.line,date:0 +#: field:banking.import.line,date:0 field:banking.transaction.wizard,date:0 msgid "Date" msgstr "Datum" @@ -1205,9 +852,14 @@ msgid "Generation of Bank Costs Invoices" msgstr "Gegenereerde bankkostenfacturen" #. module: account_banking -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." -msgstr "Bedrijf moet hetzelfde zijn voor de betreffende rekening en periode." +#: model:ir.model,name:account_banking.model_account_voucher +msgid "Accounting Voucher" +msgstr "Boekhouding betaalbewijzen" + +#. module: account_banking +#: field:account.bank.statement.line,link_partner_ok:0 +msgid "Can link partner" +msgstr "Mag relatie koppelen" #. module: account_banking #: field:banking.import.transaction,provision_costs:0 @@ -1220,24 +872,9 @@ msgid "You can disable the reconciliation of this bank transfer" msgstr "U kunt het afletteren van de mutatie ongedaan maken" #. module: account_banking -#: field:account.bank.statement.line,import_transaction_id:0 -#: field:banking.transaction.wizard,import_transaction_id:0 -msgid "Import transaction" -msgstr "Geïmporteerde mutatie" - -#. module: account_banking -#: code:addons/account_banking/wizard/banktools.py:60 -#, python-format -msgid "No suitable fiscal year found for date %(date)s and company %(company_name)s" -msgstr "Geen geschikt boekjaar gevonden voor datum %(date)s en bedrijf %(company_name)s" - -#. module: account_banking -#: code:addons/account_banking/wizard/banking_transaction_wizard.py:153 -#, python-format -msgid "No entry found for the selected invoice. \" +\n" -" \"Try manual reconciliation." -msgstr "Geen boeking gevonden voor de geselecteerde factuur. \" +\n" -" \"Probeer handmatig af te letteren." +#: selection:account.banking.bank.import,parser:0 +msgid "Abnamro (NL)" +msgstr "Abnamro (NL)" #. module: account_banking #: field:banking.import.transaction,error_message:0 @@ -1245,39 +882,14 @@ msgid "error_message" msgstr "error_message" #. module: account_banking -#: code:addons/account_banking/wizard/banktools.py:82 -#, python-format -msgid "Multiple overlapping periods for date %(date)s and company %(company_name)s" -msgstr "Meerdere overlappende periodes gevonden voor datum %(date)s en bedrijf %(company_name)s" +#: field:banking.import.transaction,remote_owner_city:0 +msgid "remote_owner_city" +msgstr "remote_owner_city" #. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:142 -#, python-format -msgid "The imported statements appear to be invalid! Check your file." -msgstr "De geïmporteerde afschriften lijken onjuist! Controleer uw bestand." - -#. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:304 -#, python-format -msgid "Number of statements loaded" -msgstr "Aantal geladen afschriften" - -#. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:302 -#, python-format -msgid "Number of transactions skipped due to errors" -msgstr "Aantal overgeslagen transacties als gevolg van fouten" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1822 -#, python-format -msgid "Statement %s is confirmed, journal items are created." -msgstr "Afschrift %s is bevestigd, journaalposten worden aangemaakt." - -#. module: account_banking -#: field:banking.import.transaction,statement:0 -msgid "statement" -msgstr "statement" +#: field:banking.import.transaction,writeoff_analytic_id:0 +msgid "Write off analytic account" +msgstr "Kostenplaats afschrijvingen" #. module: account_banking #: model:ir.ui.menu,name:account_banking.menu_finance_banking_actions @@ -1285,103 +897,63 @@ msgstr "statement" msgid "Banking" msgstr "Bankieren" -#. module: account_banking -#: help:payment.mode,type:0 -msgid "Select the Payment Type for the Payment Mode." -msgstr "Selecteer het type van de betaalmodus." - -#. module: account_banking -#: view:banking.transaction.wizard:0 -msgid "You can let the system try to match this bank statement line again after you have made any changes in the database (for instance, add an invoice or a bank account)." -msgstr "Laat de mutatie opnieuw matchen met de boekingen in het systeem nadat u de nodige wijzigingen in het systeem hebt aangebracht (bijvoorbeeld na het aanmaken van een factuur of het koppelen van een relatie aan een bepaalde bankrekening." - -#. module: account_banking -#: help:payment.mode.type,code:0 -msgid "Specify the Code for Payment Type" -msgstr "Geef de code op voor het betaaltype" - #. module: account_banking #: selection:account.banking.imported.file,state:0 msgid "Error" msgstr "Fout" #. module: account_banking -#: field:payment.mode.type,ir_model_id:0 -msgid "Payment wizard" -msgstr "Betaalwizard" +#: view:account.bank.statement.line:0 +msgid "Statement lines" +msgstr "Afschriftregels" #. module: account_banking #: view:banking.transaction.wizard:0 msgid "Set write-off account" msgstr "Stel de grootboekrekening in ter afschrijving" -#. module: account_banking -#: code:addons/account_banking/wizard/banking_transaction_wizard.py:152 -#, python-format -msgid "No entry found for the selected invoice" -msgstr "Geen boeking gevonden voor de geselecteerde factuur" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:358 -#, python-format -msgid "Unable to link transaction id %(trans)s (ref: %(ref)s) to invoice: invoice %(invoice)s was already paid" -msgstr "Kan de mutatie met id %(trans)s (referentie: %(ref)s) niet aan factuur %(invoice)s koppelen, deze is al betaald" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1090 -#, python-format -msgid "Cannot perform match on a confirmed transction" -msgstr "Kan geen match uitvoeren op een bevestigde mutatie" - #. module: account_banking #: field:banking.import.transaction,invoice_id:0 #: field:banking.transaction.wizard,invoice_id:0 msgid "Invoice to reconcile" msgstr "Factuur ter aflettering" -#. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:294 -#, python-format -msgid "Total number of statements" -msgstr "Totaal aantal afschriften" - #. module: account_banking #: field:banking.import.transaction,provision_costs_description:0 msgid "provision_costs_description" msgstr "provision_costs_description" -#. module: account_banking -#: field:payment.mode.type,code:0 -msgid "Code" -msgstr "Code" - #. module: account_banking #: view:banking.transaction.wizard:0 msgid "Manual match" msgstr "Handmatige match" -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1018 -#, python-format -msgid "Cannot unreconcile debit order: \"+\n" -" \"Not implemented." -msgstr "Kan aflettering van een incasso-opdracht niet ongedaa maken: \"+\n" -" \"Niet geïmplementeerd." - #. module: account_banking #: view:banking.transaction.wizard:0 -msgid "Multiple matches were found for this bank transfer. You must pick one of the matches or select a match manually below." -msgstr "Meerdere overeenkomende boekingen zijn gevonden voor deze mutatie. U moet één van deze boekingen uitkiezen, of de mutatie handmatig matchen verderop in dit formulier." +msgid "" +"Multiple matches were found for this bank transfer. You must pick one of the " +"matches or select a match manually below." +msgstr "" +"Meerdere overeenkomende boekingen zijn gevonden voor deze mutatie. U moet " +"één van deze boekingen uitkiezen, of de mutatie handmatig matchen verderop " +"in dit formulier." #. module: account_banking -#: field:banking.transaction.wizard,payment_order_ids:0 -msgid "Matching payment orders" -msgstr "Gekoppelde betaalopdrachten" +#: field:banking.transaction.wizard,writeoff_analytic_id:0 +msgid "Write-off analytic account" +msgstr "Kostenplaats afschrijvingen" #. module: account_banking -#: view:account.banking.imported.file:0 -msgid "Import Details" -msgstr "Importdetails" +#: field:banking.import.transaction,type:0 +msgid "type" +msgstr "type" + +#. module: account_banking +#: model:ir.actions.act_window,name:account_banking.action_account_banking_res_partner_banks +#: model:ir.model,name:account_banking.model_res_partner_bank +#: model:ir.ui.menu,name:account_banking.menu_action_account_banking_bank_accounts +msgid "Bank Accounts" +msgstr "Bankrekeningen" #. module: account_banking #: field:banking.import.transaction,local_account:0 @@ -1389,9 +961,10 @@ msgid "local_account" msgstr "local_account" #. module: account_banking -#: field:account.bank.statement.line,international:0 -msgid "International Transaction" -msgstr "Internationale mutatie" +#: field:account.bank.statement.line,period_id:0 +#: field:banking.import.line,period_id:0 +msgid "Period" +msgstr "Periode" #. module: account_banking #: model:ir.model,name:account_banking.model_account_bank_statement @@ -1403,37 +976,30 @@ msgstr "Bankafschrift" msgid "remote_owner_postalcode" msgstr "remote_owner_postalcode" -#. module: account_banking -#: view:banking.transaction.wizard:0 -#: selection:payment.line,export_state:0 -msgid "Done" -msgstr "Gereed" - #. module: account_banking #: selection:account.bank.statement.line,match_type:0 #: selection:banking.import.transaction,match_type:0 -#: model:ir.model,name:account_banking.model_account_invoice -msgid "Invoice" -msgstr "Factuur" +#: selection:banking.transaction.wizard,match_type:0 +msgid "Payment line" +msgstr "Betaalregel" #. module: account_banking -#: code:addons/account_banking/parsers/models.py:272 -#, python-format -msgid "Invalid value for transfer_type" -msgstr "Ongeldige waarde voor transfer_type" +#: field:banking.import.line,banking_import_id:0 +msgid "Bank import" +msgstr "Bankimport" #. module: account_banking -#: view:payment.order:0 -msgid "Select Invoices to Pay" -msgstr "Kies te betalen facturen" +#: selection:account.banking.bank.import,state:0 +msgid "error" +msgstr "fout" #. module: account_banking -#: view:account.banking.bank.import:0 +#: view:account.banking.bank.import:0 view:banking.link_partner:0 msgid "Cancel" msgstr "Annuleer" #. module: account_banking -#: view:account.banking.bank.import:0 +#: view:account.banking.bank.import:0 view:banking.transaction.wizard:0 msgid "Close" msgstr "Sluiten" @@ -1448,15 +1014,9 @@ msgid "Journal Items" msgstr "Boekingen" #. module: account_banking -#: field:account.banking.imported.file,user_id:0 -msgid "Responsible User" -msgstr "Verantwoordelijk gebruiker" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1680 -#, python-format -msgid "No Analytic Journal !" -msgstr "Geen analytisch dagboek !" +#: field:banking.link_partner,city:0 +msgid "City" +msgstr "Plaats" #. module: account_banking #: selection:account.banking.imported.file,state:0 @@ -1464,48 +1024,19 @@ msgid "Unfinished" msgstr "Niet gereed" #. module: account_banking -#: code:addons/account_banking/wizard/banking_transaction_wizard.py:176 -#, python-format -msgid "Cannot select for reconcilion" -msgstr "Kan niet selecteren voor afletteren" +#: field:account.bank.statement.line,import_transaction_id:0 +#: field:banking.transaction.wizard,import_transaction_id:0 +msgid "Import transaction" +msgstr "Geïmporteerde mutatie" #. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1089 -#, python-format -msgid "Cannot perform match" -msgstr "Kan de match niet uitvoeren" - -#. module: account_banking -#: model:ir.model,name:account_banking.model_payment_order -msgid "Payment Order" -msgstr "Betalingsopdracht" - -#. module: account_banking -#: model:ir.module.module,shortdesc:account_banking.module_meta_information -msgid "Account Banking" -msgstr "Account Banking" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:781 -#, python-format -msgid "Bank transaction %s: write off not implemented for \" +\n" -" \"this match type." -msgstr "Bankmutatie %s: afschrijven niet geïmplementeerd voor \" +\n" -" \"dit matchtype." - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:645 -#, python-format -msgid "Cannot unreconcile: no direct debit order" -msgstr "Kan niet afletteren: geen incasso-opdracht" - -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1352 -#: code:addons/account_banking/account_banking.py:1356 -#: constraint:res.partner.bank:0 -#, python-format -msgid "The IBAN number doesn't seem to be correct" -msgstr "Het IBAN-nummer lijkt niet correct te zijn" +#: view:res.partner.bank:0 +msgid "" +"onchange_acc_number(acc_number, acc_number_domestic, state, partner_id, " +"country_id)" +msgstr "" +"onchange_acc_number(acc_number, acc_number_domestic, state, partner_id, " +"country_id)" #. module: account_banking #: selection:banking.import.line,transaction_type:0 @@ -1519,20 +1050,23 @@ msgid "Multi match" msgstr "Multimatch" #. module: account_banking -#: field:banking.import.transaction,remote_owner_city:0 -msgid "remote_owner_city" -msgstr "remote_owner_city" +#: view:banking.link_partner:0 +msgid "Create or link partner" +msgstr "Relatie koppelen of aanmaken" #. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:1142 -#, python-format -msgid "Transaction found for unknown account %(bank_account)s" -msgstr "Mutatie gevonden voor onbekende bankrekening %(bank_account)s" +#: help:banking.import.transaction,bank_country_code:0 +msgid "" +"Fallback default country for new partner records, as defined by the import " +"parser" +msgstr "" +"Achtervang-standaardland voor nieuwe relaties, zoals ingegeven door de " +"invoerparser" #. module: account_banking #: selection:account.banking.bank.import,state:0 msgid "ready" -msgstr "ready" +msgstr "gereed" #. module: account_banking #: field:banking.import.transaction,move_line_ids:0 @@ -1546,22 +1080,24 @@ msgid "File Format" msgstr "Bestandsformaat" #. module: account_banking -#: code:addons/account_banking/account_banking.py:922 -#, python-format -msgid "You can only combine payment orders of the same type" -msgstr "Alleen betaalopdrachten van hetzelfde type kunnen worden gecombineerd" - -#. module: account_banking -#: code:addons/account_banking/wizard/banktools.py:66 -#, python-format -msgid "Multiple overlapping fiscal years found for date %(date)s and company %(company_name)s" -msgstr "Meerdere overlappende boekjaren gevonden voor datum %(date)s en bedrijf %(company_name)s" +#: field:banking.import.transaction,move_currency_amount:0 +msgid "Match Amount" +msgstr "Match bedrag" #. module: account_banking #: field:account.banking.account.settings,journal_id:0 msgid "Journal" msgstr "Dagboek" +#. module: account_banking +#: view:account.bank.statement:0 +msgid "" +"black:state == 'confirmed';darkmagenta:match_multi == True;crimson:duplicate " +"== True;grey:state == 'draft';" +msgstr "" +"black:state == 'confirmed';darkmagenta:match_multi == True;crimson:duplicate " +"== True;grey:state == 'draft';" + #. module: account_banking #: field:account.banking.account.settings,costs_account_id:0 msgid "Bank Costs Account" @@ -1573,14 +1109,19 @@ msgid "Finished" msgstr "Gereed" #. module: account_banking -#: selection:payment.line,export_state:0 -msgid "Sent" -msgstr "Verstuurd" +#: field:banking.link_partner,street:0 +msgid "Street" +msgstr "Straat" #. module: account_banking -#: model:ir.model,name:account_banking.model_payment_line -msgid "Payment Line" -msgstr "Betaalregel" +#: field:banking.import.transaction,remote_bank_ibei:0 +msgid "remote_bank_ibei" +msgstr "remote_bank_ibei" + +#. module: account_banking +#: view:banking.link_partner:0 +msgid "Address" +msgstr "Address" #. module: account_banking #: view:account.banking.account.settings:0 @@ -1592,58 +1133,35 @@ msgstr "Details bankrekening" msgid "remote_owner_country_code" msgstr "remote_owner_country_code" -#. module: account_banking -#: selection:account.bank.statement.line,match_type:0 -#: selection:banking.import.transaction,match_type:0 -#: selection:payment.mode.type,payment_order_type:0 -#: selection:payment.order,payment_order_type:0 -msgid "Payment" -msgstr "Betaling" - #. module: account_banking #: model:ir.model,name:account_banking.model_res_bank msgid "Bank" msgstr "Bank" #. module: account_banking -#: selection:banking.import.line,type:0 +#: selection:banking.import.line,type:0 field:banking.link_partner,customer:0 msgid "Customer" msgstr "Klant" #. module: account_banking -#: code:addons/account_banking/account_banking.py:1008 -#: code:addons/account_banking/banking_import_transaction.py:468 -#: code:addons/account_banking/banking_import_transaction.py:600 -#: code:addons/account_banking/banking_import_transaction.py:604 -#: code:addons/account_banking/banking_import_transaction.py:772 -#: code:addons/account_banking/banking_import_transaction.py:780 -#, python-format -msgid "Cannot reconcile" -msgstr "Kan niet afletteren" - -#. module: account_banking -#: field:banking.import.line,name:0 -#: field:banking.transaction.wizard,name:0 -#: field:payment.mode.type,name:0 +#: field:banking.import.line,name:0 field:banking.transaction.wizard,name:0 msgid "Name" msgstr "Naam" #. module: account_banking -#: help:account.banking.account.settings,costs_account_id:0 -msgid "The account to use when the bank invoices its own costs. Leave it blank to disable automatic invoice generation on bank costs." -msgstr "De grootboekrekening waarop facturen met bankkosten kunnen worden geboekt. Laat leeg om het genereren van dergelijke facturen uit te schakelen." +#: field:banking.transaction.wizard,move_currency_amount:0 +msgid "Match Currency Amount" +msgstr "Match bedrag in valuta" #. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:206 -#, python-format -msgid "Statements found for account %(bank_account)s, but no default journal was defined." -msgstr "Bankafschriften gevonden voor bankrekening %(bank_account)s, maar er is geen standaard dagboek ingesteld." +#: field:banking.link_partner,country_id:0 +msgid "Country" +msgstr "Land" #. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:329 -#, python-format -msgid "Review Bank Statements" -msgstr "Inzage bankafschriften" +#: selection:account.banking.bank.import,parser:0 +msgid "ING Bank" +msgstr "ING Bank" #. module: account_banking #: field:account.bank.statement.line,partner_bank_id:0 @@ -1653,46 +1171,18 @@ msgid "Bank Account" msgstr "Bankrekening" #. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:306 -#, python-format -msgid "Number of transactions loaded" -msgstr "Aantal geladen transacties" +#: help:account.banking.account.settings,costs_account_id:0 +msgid "" +"The account to use when the bank invoices its own costs. Leave it blank to " +"disable automatic invoice generation on bank costs." +msgstr "" +"De grootboekrekening waarop facturen met bankkosten kunnen worden geboekt. " +"Laat leeg om het genereren van dergelijke facturen uit te schakelen." #. module: account_banking -#: field:banking.import.transaction,payment_order_ids:0 -msgid "Payment orders" -msgstr "Betaalopdrachten" - -#. module: account_banking -#: view:banking.transaction.wizard:0 -msgid "System match" -msgstr "Automatische match" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:581 -#: code:addons/account_banking/banking_import_transaction.py:685 -#, python-format -msgid "No direct debit order item" -msgstr "Geen onderdeel van een incasso-opdracht" - -#. module: account_banking -#: code:addons/account_banking/banking_import_transaction.py:689 -#, python-format -msgid "The direct debit order item is not marked for storno" -msgstr "Dit item uit de incasso-opdracht is niet gemarkeerd als storno" - -#. module: account_banking -#: model:ir.model,name:account_banking.model_payment_order_create -msgid "payment.order.create" -msgstr "payment.order.create" - -#. module: account_banking -#: code:addons/account_banking/account_banking.py:1009 -#, python-format -msgid "Cannot reconcile debit order: \"+\n" -" \"Not implemented." -msgstr "Kan een incasso-opdracht niet afletteren: \"+\n" -" \"Niet geïmplementeerd." +#: field:account.bank.statement,banking_id:0 +msgid "Imported File" +msgstr "Geïmpoteerd bestand" #. module: account_banking #: field:banking.import.transaction,local_currency:0 @@ -1702,35 +1192,13 @@ msgstr "local_currency" #. module: account_banking #: field:banking.import.transaction,reference:0 msgid "reference" -msgstr "reference" - -#. module: account_banking -#: model:res.partner.bank.type.field,name:account_banking.bank_acc_number_field -msgid "acc_number" -msgstr "rekeningnummer" - -#. module: account_banking -#: field:payment.mode,type:0 -msgid "Payment type" -msgstr "Betaaltype" - -#. module: account_banking -#: code:addons/account_banking/wizard/bank_import.py:308 -#, python-format -msgid "Number of transactions matched" -msgstr "Aantal transacties herkend" +msgstr "referentie" #. module: account_banking #: field:banking.import.transaction,transaction:0 msgid "transaction" msgstr "mutatie" -#. module: account_banking -#: code:addons/account_banking/wizard/banktools.py:200 -#, python-format -msgid "More than one bank account was found with the same number %(account_no)s" -msgstr "Meer dan één bankrekening gevonden met hetzelfde rekeningnummer %(account_no)s" - #. module: account_banking #: field:banking.import.transaction,remote_account:0 msgid "remote_account" @@ -1743,13 +1211,31 @@ msgstr "Bankimportregels" #. module: account_banking #: help:account.banking.account.settings,bank_partner_id:0 -msgid "The partner to use for bank costs. Banks are not partners by default. You will most likely have to create one." -msgstr "De relatie te gebruiken op facturen voor bankkosten. Waarschijnlijk moet u een nieuwe relatie aanmaken." +msgid "" +"The partner to use for bank costs. Banks are not partners by default. You " +"will most likely have to create one." +msgstr "" +"De relatie te gebruiken op facturen voor bankkosten. Waarschijnlijk moet u " +"een nieuwe relatie aanmaken." + +#. module: account_banking +#: selection:banking.import.transaction,payment_option:0 +#: selection:banking.transaction.wizard,payment_option:0 +msgid "Keep Open" +msgstr "Open houden" #. module: account_banking #: help:account.banking.account.settings,default_credit_account_id:0 -msgid "The account to use when an unexpected payment was signaled. This can happen when a direct debit payment is cancelled by a customer, or when no matching payment can be found. Mind that you can correct movements before confirming them." -msgstr "De grootboekrekening voor het boeken van een overwachte betaling. De rekening wordt gebruikt wanneer er geen bijbehorende boeking kan worden gevonden in het systeem. Merk op dat de boekingen nog kunnen worden aangepast vóór het bevestigen ervan." +msgid "" +"The account to use when an unexpected payment was signaled. This can happen " +"when a direct debit payment is cancelled by a customer, or when no matching " +"payment can be found. Mind that you can correct movements before confirming " +"them." +msgstr "" +"De grootboekrekening voor het boeken van een overwachte betaling. De " +"rekening wordt gebruikt wanneer er geen bijbehorende boeking kan worden " +"gevonden in het systeem. Merk op dat de boekingen nog kunnen worden " +"aangepast vóór het bevestigen ervan." #. module: account_banking #: model:ir.model,name:account_banking.model_account_banking_imported_file @@ -1757,17 +1243,6 @@ msgid "Imported Bank Statements File" msgstr "Geïmporteerd bankafschriftbestand" #. module: account_banking -#: field:banking.import.transaction,remote_owner:0 -msgid "remote_owner" -msgstr "remote_owner" - -#. module: account_banking -#: selection:account.bank.statement.line,match_type:0 -#: selection:banking.import.transaction,match_type:0 -msgid "Storno" -msgstr "Storno" - -#. module: account_banking -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." -msgstr "U kunt geen boekingsregel creëren op een zichtrekening" +#: field:banking.import.transaction,remote_bank_chips_uid:0 +msgid "remote_bank_chips_uid" +msgstr "remote_bank_chips_uid" diff --git a/account_banking/migrations/0.1.81/post-set-statement-line-state.py b/account_banking/migrations/6.1.0.1.81/post-set-statement-line-state.py similarity index 100% rename from account_banking/migrations/0.1.81/post-set-statement-line-state.py rename to account_banking/migrations/6.1.0.1.81/post-set-statement-line-state.py diff --git a/account_banking/migrations/7.0.0.1/pre-migration.py b/account_banking/migrations/7.0.0.1/pre-migration.py new file mode 100644 index 000000000..e12284d0e --- /dev/null +++ b/account_banking/migrations/7.0.0.1/pre-migration.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2013 Therp BV (). +# 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 . +# +############################################################################## + +def migrate(cr, version): + if not version: + return + + # workflow state moved to another, new module + cr.execute( + """ + UPDATE ir_model_data + SET module = 'account_banking_payment' + WHERE name = 'trans_done_sent' + AND module = 'account_direct_debit' + """) diff --git a/account_banking/parsers/models.py b/account_banking/parsers/models.py index a8a0c3014..477b4536a 100644 --- a/account_banking/parsers/models.py +++ b/account_banking/parsers/models.py @@ -19,6 +19,7 @@ # ############################################################################## +import re from tools.translate import _ class mem_bank_statement(object): @@ -34,7 +35,7 @@ class mem_bank_statement(object): # Lock attributes to enable parsers to trigger non-conformity faults __slots__ = [ 'start_balance','end_balance', 'date', 'local_account', - 'local_currency', 'id', 'statements' + 'local_currency', 'id', 'transactions' ] def __init__(self, *args, **kwargs): super(mem_bank_statement, self).__init__(*args, **kwargs) @@ -353,6 +354,33 @@ class parser(object): name = "%s-%d" % (base, suffix) return name + def get_unique_account_identifier(self, cr, account): + """ + Get an identifier for a local bank account, based on the last + characters of the account number with minimum length 3. + The identifier should be unique amongst the company accounts + + Presumably, the bank account is one of the company accounts + itself but importing bank statements for non-company accounts + is not prevented anywhere else in the system so the 'account' + param being a company account is not enforced here either. + """ + def normalize(account_no): + return re.sub('\s', '', account_no) + + account = normalize(account) + cr.execute( + """SELECT acc_number FROM res_partner_bank + WHERE company_id IS NOT NULL""") + accounts = [normalize(row[0]) for row in cr.fetchall()] + tail_length = 3 + while tail_length <= len(account): + tail = account[-tail_length:] + if len([acc for acc in accounts if acc.endswith(tail)]) < 2: + return tail + tail_length += 1 + return account + def parse(self, cr, data): ''' Parse data. diff --git a/account_banking/sepa/iban.py b/account_banking/sepa/iban.py index 7d16840d9..25993dd70 100644 --- a/account_banking/sepa/iban.py +++ b/account_banking/sepa/iban.py @@ -190,7 +190,7 @@ class IBAN(str): BBAN_formats = { 'AL': BBANFormat('CCBBBBVAAAAAAAAAAAAAAAAAA', '%B%A'), 'AD': BBANFormat('CCCCBBBBAAAAAAAAAAAA', '%A'), - 'AT': BBANFormat('BBBBBAAAAAAAAAAA', '%A BLZ %C'), + 'AT': BBANFormat('BBBBBAAAAAAAAAAA', '%A BLZ %B'), 'BE': BBANFormat('CCCAAAAAAAVV', '%C-%A-%V'), 'BA': BBANFormat('BBBCCCAAAAAAAA', '%I'), 'BG': BBANFormat('BBBBCCCCAAAAAAAAAA', '%I'), @@ -214,7 +214,7 @@ class IBAN(str): 'GR': BBANFormat('BBBCCCCAAAAAAAAAAAAAAAA', '%B-%C-%A', nolz=True), 'HR': BBANFormat('BBBBBBBAAAAAAAAAA', '%B-%A'), 'HU': BBANFormat('BBBCCCCXAAAAAAAAAAAAAAAV', '%B%C%X %A%V'), - 'IE': BBANFormat('BBBBCCCCCCAAAAAAAAV', '%C %A%V'), + 'IE': BBANFormat('BBBBCCCCCCAAAAAAAA', '%C %A'), 'IL': BBANFormat('BBBCCCAAAAAAAAAAAAA', '%C%A'), # Iceland uses an extra identification number, split in two on # display. Coded here as %P%V. diff --git a/account_banking/wizard/banking_transaction_wizard.py b/account_banking/wizard/banking_transaction_wizard.py index 0fc71677c..28c433956 100644 --- a/account_banking/wizard/banking_transaction_wizard.py +++ b/account_banking/wizard/banking_transaction_wizard.py @@ -131,7 +131,7 @@ class banking_transaction_wizard(orm.TransientModel): { 'move_line_id': move_line.id, }, context=context) statement_line_obj.write( cr, uid, wiz.import_transaction_id.statement_line_id.id, - { 'partner_id': move_line.invoice.partner_id.id, + { 'partner_id': move_line.partner_id.id or False, 'account_id': move_line.account_id.id, }, context=context) found = True @@ -226,9 +226,9 @@ class banking_transaction_wizard(orm.TransientModel): } if todo_entry[0]: - st_line_vals['partner_id'] = invoice_obj.read( - cr, uid, todo_entry[0], - ['partner_id'], context=context)['partner_id'][0] + st_line_vals['partner_id'] = invoice_obj.browse( + cr, uid, todo_entry[0], context=context + ).partner_id.commercial_partner_id.id statement_line_obj.write( cr, uid, statement_line_id, @@ -256,14 +256,7 @@ class banking_transaction_wizard(orm.TransientModel): account_id = False journal_id = wiz.statement_line_id.statement_id.journal_id.id setting_ids = settings_pool.find(cr, uid, journal_id, context=context) - if len(setting_ids)>0: - setting = settings_pool.browse(cr, uid, setting_ids[0], context=context) - if wiz.amount < 0: - account_id = setting.default_credit_account_id and setting.default_credit_account_id.id - else: - account_id = setting.default_debit_account_id and setting.default_debit_account_id.id - statement_pool.write(cr, uid, wiz.statement_line_id.id, {'account_id':account_id}) - + # Restore partner id from the bank account or else reset partner_id = False if (wiz.statement_line_id.partner_bank_id and @@ -271,6 +264,38 @@ class banking_transaction_wizard(orm.TransientModel): partner_id = wiz.statement_line_id.partner_bank_id.partner_id.id wiz.write({'partner_id': partner_id}) + # Select account type by parter customer or supplier, + # or default based on amount sign + if wiz.amount < 0: + account_type = 'payable' + else: + account_type = 'receivable' + + if partner_id: + partner = wiz.statement_line_id.partner_bank_id.partner_id + if partner.supplier and not partner.customer: + account_type = 'payable' + elif partner.customer and not partner.supplier: + account_type = 'receivable' + if partner['property_account_' + account_type]: + account_id = partner['property_account_' + account_type].id + + company_partner = wiz.statement_line_id.statement_id.company_id.partner_id + if len(setting_ids) and ( + not account_id + or account_id in ( + company_partner.property_account_payable.id, + company_partner.property_account_receivable.id) + ): + setting = settings_pool.browse(cr, uid, setting_ids[0], context=context) + if account_type == 'payable': + account_id = setting.default_credit_account_id.id + else: + account_id = setting.default_debit_account_id.id + + if account_id: + wiz.statement_line_id.write({'account_id': account_id}) + if wiz.statement_line_id: #delete splits causing an unsplit if this is a split #transaction @@ -314,6 +339,10 @@ class banking_transaction_wizard(orm.TransientModel): 'ref': fields.related( 'statement_line_id', 'ref', type='char', size=32, string="Reference", readonly=True), + 'message': fields.related( + 'statement_line_id', 'import_transaction_id', 'message', + type='char', size=1024, + string="Message", readonly=True), 'partner_id': fields.related( 'statement_line_id', 'partner_id', type='many2one', relation='res.partner', @@ -363,13 +392,6 @@ class banking_transaction_wizard(orm.TransientModel): ('payment_order_manual', 'Payment order (manual)'), ], string='Match type', readonly=True), - 'manual_invoice_id': fields.many2one( - 'account.invoice', 'Match this invoice', - domain=[('reconciled', '=', False)]), - 'manual_move_line_id': fields.many2one( - 'account.move.line', 'Or match this entry', - domain=[('account_id.reconcile', '=', True), - ('reconcile_id', '=', False)]), 'manual_invoice_ids': fields.many2many( 'account.invoice', 'banking_transaction_wizard_account_invoice_rel', diff --git a/account_banking/wizard/banking_transaction_wizard.xml b/account_banking/wizard/banking_transaction_wizard.xml index 1e970eb7e..018b87210 100644 --- a/account_banking/wizard/banking_transaction_wizard.xml +++ b/account_banking/wizard/banking_transaction_wizard.xml @@ -17,8 +17,9 @@ - + + diff --git a/account_banking/wizard/banktools.py b/account_banking/wizard/banktools.py index 94f0cd70c..0afdfcadf 100644 --- a/account_banking/wizard/banktools.py +++ b/account_banking/wizard/banktools.py @@ -97,8 +97,11 @@ def get_partner(pool, cr, uid, name, address, postal_code, city, TODO: revive the search by lines from the address argument ''' partner_obj = pool.get('res.partner') - partner_ids = partner_obj.search(cr, uid, [('name', 'ilike', name)], - context=context) + partner_ids = partner_obj.search( + cr, uid, [ + '|', ('is_company', '=', True), ('parent_id', '=', False), + ('name', 'ilike', name), + ], context=context) if not partner_ids: # Try brute search on address and then match reverse criteria = [] @@ -118,11 +121,11 @@ def get_partner(pool, cr, uid, name, address, postal_code, city, key = name.lower() partners = [] for partner in partner_obj.read( - cr, uid, partner_search_ids, ['name'], context=context): + cr, uid, partner_search_ids, ['name', 'commercial_partner_id'], context=context): if (len(partner['name']) > 3 and partner['name'].lower() in key): partners.append(partner) partners.sort(key=lambda x: len(x['name']), reverse=True) - partner_ids = [x['id'] for x in partners] + partner_ids = [x['commercial_partner_id'][0] for x in partners] if len(partner_ids) > 1: log.append( _('More than one possible match found for partner with ' diff --git a/account_banking/wizard/link_partner.py b/account_banking/wizard/link_partner.py index c4d9108f6..719843a77 100644 --- a/account_banking/wizard/link_partner.py +++ b/account_banking/wizard/link_partner.py @@ -22,6 +22,7 @@ from openerp.osv import orm, fields from openerp.tools.translate import _ from openerp.addons.account_banking.wizard import banktools +import ast class link_partner(orm.TransientModel): _name = 'banking.link_partner' @@ -33,10 +34,23 @@ class link_partner(orm.TransientModel): 'supplier': fields.boolean('Supplier'), 'customer': fields.boolean('Customer'), 'partner_id': fields.many2one( - 'res.partner', 'or link existing partner'), + 'res.partner', 'or link existing partner', + domain=['|', ('is_company', '=', True), + ('parent_id', '=', False)], + ), 'statement_line_id': fields.many2one( 'account.bank.statement.line', 'Statement line', required=True), + 'amount': fields.related( + 'statement_line_id', 'amount', type='float', + string="Amount", readonly=True), + 'ref': fields.related( + 'statement_line_id', 'ref', type='char', size=32, + string="Reference", readonly=True), + 'message': fields.related( + 'statement_line_id', 'import_transaction_id', 'message', + type='char', size=1024, + string="Message", readonly=True), 'remote_account': fields.char( 'Account number', size=24, readonly=True), # Partner values @@ -50,6 +64,11 @@ class link_partner(orm.TransientModel): 'phone': fields.char('Phone', size=64), 'fax': fields.char('Fax', size=64), 'mobile': fields.char('Mobile', size=64), + 'is_company': fields.boolean('Is a Company'), + } + + _defaults = { + 'is_company': True, } def create(self, cr, uid, vals, context=None): @@ -79,9 +98,19 @@ class link_partner(orm.TransientModel): if 'customer' not in vals and statement_line.amount > 0: vals['customer'] = True - if not vals.get('street'): - vals['street'] = transaction.remote_owner_address - if not vals.get('street'): + address_list = [] + try: + address_list = ast.literal_eval( + transaction.remote_owner_address or []) + except ValueError: + pass + if address_list and not vals.get('street'): + vals['street'] = address_list.pop(0) + if address_list and not vals.get('street2'): + vals['street2'] = address_list.pop(0) + if transaction.remote_owner_postalcode and not vals.get('zip'): + vals['zip'] = transaction.remote_owner_postalcode + if transaction.remote_owner_city and not vals.get('city'): vals['city'] = transaction.remote_owner_city if not vals.get('country_id'): vals['country_id'] = banktools.get_country_id( @@ -101,10 +130,12 @@ class link_partner(orm.TransientModel): :param wizard: read record of wizard (with load='_classic_write') :param values: the dictionary of partner values that will be updated """ - for field in ['name', + for field in ['is_company', + 'name', 'street', 'street2', 'zip', + 'city', 'country_id', 'state_id', 'phone', @@ -126,10 +157,7 @@ class link_partner(orm.TransientModel): else: wiz_read = self.read( cr, uid, ids[0], context=context, load='_classic_write') - partner_fields = self.pool.get( - 'res.partner')._columns.keys() partner_vals = { - 'is_company': True, 'type': 'default', } self.update_partner_values( diff --git a/account_banking/wizard/link_partner.xml b/account_banking/wizard/link_partner.xml index c9c2d21c9..bf0c46a67 100644 --- a/account_banking/wizard/link_partner.xml +++ b/account_banking/wizard/link_partner.xml @@ -7,15 +7,24 @@ banking.link_partner
- + + + + + + + - + + + + attrs="{'invisible': [('partner_id', '!=', False)]}" + col="4"> diff --git a/account_banking_camt/__init__.py b/account_banking_camt/__init__.py new file mode 100644 index 000000000..f8b1d5b3a --- /dev/null +++ b/account_banking_camt/__init__.py @@ -0,0 +1 @@ +import camt diff --git a/account_banking_camt/__openerp__.py b/account_banking_camt/__openerp__.py new file mode 100644 index 000000000..e7950c991 --- /dev/null +++ b/account_banking_camt/__openerp__.py @@ -0,0 +1,33 @@ +############################################################################## +# +# Copyright (C) 2013 Therp BV () +# 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 . +# +############################################################################## +{ + 'name': 'CAMT Format Bank Statements Import', + 'version': '0.1', + 'license': 'AGPL-3', + 'author': 'Therp BV', + 'website': 'https://launchpad.net/banking-addons', + 'category': 'Banking addons', + 'depends': ['account_banking'], + 'description': ''' +Module to import SEPA CAMT.053 Format bank statement files. Based +on the Banking addons framework. + ''', + 'installable': True, +} diff --git a/account_banking_camt/camt.py b/account_banking_camt/camt.py new file mode 100644 index 000000000..2ec31439f --- /dev/null +++ b/account_banking_camt/camt.py @@ -0,0 +1,278 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2013 Therp BV () +# 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 . +# +############################################################################## + +from lxml import etree +from openerp.osv.orm import except_orm +from account_banking.parsers import models +from account_banking.parsers.convert import str2date + +bt = models.mem_bank_transaction + +class transaction(models.mem_bank_transaction): + + def __init__(self, values, *args, **kwargs): + super(transaction, self).__init__(*args, **kwargs) + for attr in values: + setattr(self, attr, values[attr]) + + def is_valid(self): + return not self.error_message + +class parser(models.parser): + code = 'CAMT' + country_code = 'NL' + name = 'Generic CAMT Format' + doc = '''\ +CAMT Format parser +''' + + def tag(self, node): + """ + Return the tag of a node, stripped from its namespace + """ + return node.tag[len(self.ns):] + + def assert_tag(self, node, expected): + """ + Get node's stripped tag and compare with expected + """ + assert self.tag(node) == expected, ( + "Expected tag '%s', got '%s' instead" % + (self.tag(node), expected)) + + def xpath(self, node, expr): + """ + Wrap namespaces argument into call to Element.xpath(): + + self.xpath(node, './ns:Acct/ns:Id') + """ + return node.xpath(expr, namespaces={'ns': self.ns[1:-1]}) + + def find(self, node, expr): + """ + Like xpath(), but return first result if any or else False + + Return None to test nodes for being truesy + """ + result = node.xpath(expr, namespaces={'ns': self.ns[1:-1]}) + if result: + return result[0] + return None + + def get_balance_type_node(self, node, balance_type): + """ + :param node: BkToCstmrStmt/Stmt/Bal node + :param balance type: one of 'OPBD', 'PRCD', 'ITBD', 'CLBD' + """ + code_expr = './ns:Bal/ns:Tp/ns:CdOrPrtry/ns:Cd[text()="%s"]/../../..' % balance_type + return self.xpath(node, code_expr) + + def parse_amount(self, node): + """ + Parse an element that contains both Amount and CreditDebitIndicator + + :return: signed amount + :returntype: float + """ + sign = -1 if node.find(self.ns + 'CdtDbtInd').text == 'DBIT' else 1 + return sign * float(node.find(self.ns + 'Amt').text) + + def get_start_balance(self, node): + """ + Find the (only) balance node with code OpeningBalance, or + the only one with code 'PreviousClosingBalance' + or the first balance node with code InterimBalance in + the case of preceeding pagination. + + :param node: BkToCstmrStmt/Stmt/Bal node + """ + nodes = ( + self.get_balance_type_node(node, 'OPBD') or + self.get_balance_type_node(node, 'PRCD') or + self.get_balance_type_node(node, 'ITBD')) + return self.parse_amount(nodes[0]) + + def get_end_balance(self, node): + """ + Find the (only) balance node with code ClosingBalance, or + the second (and last) balance node with code InterimBalance in + the case of continued pagination. + + :param node: BkToCstmrStmt/Stmt/Bal node + """ + nodes = ( + self.get_balance_type_node(node, 'CLBD') or + self.get_balance_type_node(node, 'ITBD')) + return self.parse_amount(nodes[-1]) + + def parse_Stmt(self, cr, node): + """ + Parse a single Stmt node. + + Be sure to craft a unique, but short enough statement identifier, + as it is used as the basis of the generated move lines' names + which overflow when using the full IBAN and CAMT statement id. + """ + statement = models.mem_bank_statement() + statement.local_account = ( + self.xpath(node, './ns:Acct/ns:Id/ns:IBAN')[0].text + if self.xpath(node, './ns:Acct/ns:Id/ns:IBAN') + else self.xpath(node, './ns:Acct/ns:Id/ns:Othr/ns:Id')[0].text) + + identifier = node.find(self.ns + 'Id').text + if identifier.upper().startswith('CAMT053'): + identifier = identifier[7:] + statement.id = self.get_unique_statement_id( + cr, "%s-%s" % ( + self.get_unique_account_identifier( + cr, statement.local_account), + identifier) + ) + + statement.local_currency = self.xpath(node, './ns:Acct/ns:Ccy')[0].text + statement.start_balance = self.get_start_balance(node) + statement.end_balance = self.get_end_balance(node) + number = 0 + for Ntry in self.xpath(node, './ns:Ntry'): + transaction_detail = self.parse_Ntry(Ntry) + if number == 0: + # Take the statement date from the first transaction + statement.date = str2date( + transaction_detail['execution_date'], "%Y-%m-%d") + number += 1 + transaction_detail['id'] = str(number).zfill(4) + statement.transactions.append( + transaction(transaction_detail)) + return statement + + def get_transfer_type(self, node): + """ + Map entry descriptions to transfer types. To extend with + proper mapping from BkTxCd/Domn/Cd/Fmly/Cd to transfer types + if we can get our hands on real life samples. + + For now, leave as a hook for bank specific overrides to map + properietary codes from BkTxCd/Prtry/Cd. + + :param node: Ntry node + """ + return bt.ORDER + + def parse_Ntry(self, node): + """ + :param node: Ntry node + """ + entry_details = { + 'execution_date': self.xpath(node, './ns:BookgDt/ns:Dt')[0].text, + 'effective_date': self.xpath(node, './ns:ValDt/ns:Dt')[0].text, + 'transfer_type': self.get_transfer_type(node), + 'transferred_amount': self.parse_amount(node) + } + TxDtls = self.xpath(node, './ns:NtryDtls/ns:TxDtls') + if len(TxDtls) == 1: + vals = self.parse_TxDtls(TxDtls[0], entry_details) + else: + vals = entry_details + return vals + + def get_party_values(self, TxDtls): + """ + Determine to get either the debtor or creditor party node + and extract the available data from it + """ + vals = {} + party_type = self.find( + TxDtls, '../../ns:CdtDbtInd').text == 'CRDT' and 'Dbtr' or 'Cdtr' + party_node = self.find(TxDtls, './ns:RltdPties/ns:%s' % party_type) + account_node = self.find( + TxDtls, './ns:RltdPties/ns:%sAcct/ns:Id' % party_type) + bic_node = self.find( + TxDtls, + './ns:RltdAgts/ns:%sAgt/ns:FinInstnId/ns:BIC' % party_type) + if party_node is not None: + name_node = self.find(party_node, './ns:Nm') + vals['remote_owner'] = ( + name_node.text if name_node is not None else False) + country_node = self.find(party_node, './ns:PstlAdr/ns:Ctry') + vals['remote_owner_country'] = ( + country_node.text if country_node is not None else False) + address_node = self.find(party_node, './ns:PstlAdr/ns:AdrLine') + if address_node is not None: + vals['remote_owner_address'] = [address_node.text] + if account_node is not None: + iban_node = self.find(account_node, './ns:IBAN') + if iban_node is not None: + vals['remote_account'] = iban_node.text + if bic_node is not None: + vals['remote_bank_bic'] = bic_node.text + else: + domestic_node = self.find(account_node, './ns:Othr/ns:Id') + vals['remote_account'] = ( + domestic_node.text if domestic_node is not None else False) + return vals + + def parse_TxDtls(self, TxDtls, entry_values): + """ + Parse a single TxDtls node + """ + vals = dict(entry_values) + unstructured = self.xpath(TxDtls, './ns:RmtInf/ns:Ustrd') + if unstructured: + vals['message'] = ' '.join([x.text for x in unstructured]) + structured = self.find( + TxDtls, './ns:RmtInf/ns:Strd/ns:CdtrRefInf/ns:Ref') + if structured is None or not structured.text: + structured = self.find(TxDtls, './ns:Refs/ns:EndToEndId') + if structured is not None: + vals['reference'] = structured.text + else: + if vals.get('message'): + vals['reference'] = vals['message'] + vals.update(self.get_party_values(TxDtls)) + return vals + + def check_version(self): + """ + Sanity check the document's namespace + """ + if not self.ns.startswith('{urn:iso:std:iso:20022:tech:xsd:camt.'): + raise except_orm( + "Error", + "This does not seem to be a CAMT format bank statement.") + + if not self.ns.startswith('{urn:iso:std:iso:20022:tech:xsd:camt.053.'): + raise except_orm( + "Error", + "Only CAMT.053 is supported at the moment.") + return True + + def parse(self, cr, data): + """ + Parse a CAMT053 XML file + """ + root = etree.fromstring(data) + self.ns = root.tag[:root.tag.index("}") + 1] + self.check_version() + self.assert_tag(root[0][0], 'GrpHdr') + statements = [] + for node in root[0][1:]: + statements.append(self.parse_Stmt(cr, node)) + return statements diff --git a/account_banking_nl_abnamro/abnamro.py b/account_banking_nl_abnamro/abnamro.py index 4e759c6d9..977383e00 100644 --- a/account_banking_nl_abnamro/abnamro.py +++ b/account_banking_nl_abnamro/abnamro.py @@ -2,7 +2,7 @@ ############################################################################## # # Copyright (C) 2009 EduSense BV () -# 2011 Therp BV () +# 2011 - 2013 Therp BV () # # All Rights Reserved # @@ -256,9 +256,9 @@ class transaction(models.mem_bank_transaction): if self.transfer_type == 'SEPA': sepa_dict = get_sepa_dict(''.join(fields)) - sepa_type = sepa_dict.get('TRTP') - if sepa_type != 'SEPA OVERBOEKING': - raise ValueError,_('Sepa transaction type %s not handled yet') + sepa_type = sepa_dict.get('TRTP') or '' + if sepa_type.upper() != 'SEPA OVERBOEKING': + raise ValueError, _('Sepa transaction type %s not handled yet') % sepa_type self.remote_account = sepa_dict.get('IBAN',False) self.remote_bank_bic = sepa_dict.get('BIC', False) self.remote_owner = sepa_dict.get('NAME', False) diff --git a/account_banking_nl_clieop/migrations/0.63/post-fill-ir_model_id.py b/account_banking_nl_clieop/migrations/6.1.0.63/post-fill-ir_model_id.py similarity index 100% rename from account_banking_nl_clieop/migrations/0.63/post-fill-ir_model_id.py rename to account_banking_nl_clieop/migrations/6.1.0.63/post-fill-ir_model_id.py diff --git a/account_banking_nl_clieop/migrations/0.64/post-set-payment-order-type.py b/account_banking_nl_clieop/migrations/6.1.0.64/post-set-payment-order-type.py similarity index 100% rename from account_banking_nl_clieop/migrations/0.64/post-set-payment-order-type.py rename to account_banking_nl_clieop/migrations/6.1.0.64/post-set-payment-order-type.py diff --git a/account_banking_nl_girotel/i18n/nl_NL.po b/account_banking_nl_girotel/i18n/nl.po similarity index 100% rename from account_banking_nl_girotel/i18n/nl_NL.po rename to account_banking_nl_girotel/i18n/nl.po diff --git a/account_banking_nl_multibank/i18n/nl_NL.po b/account_banking_nl_multibank/i18n/nl.po similarity index 100% rename from account_banking_nl_multibank/i18n/nl_NL.po rename to account_banking_nl_multibank/i18n/nl.po diff --git a/account_banking_payment/__openerp__.py b/account_banking_payment/__openerp__.py index af1ecab2e..a0984398f 100644 --- a/account_banking_payment/__openerp__.py +++ b/account_banking_payment/__openerp__.py @@ -32,17 +32,14 @@ 'category': 'Banking addons', 'depends': [ 'account_banking', - 'account_payment', + 'account_banking_payment_export', ], 'data': [ 'view/account_payment.xml', 'view/banking_transaction_wizard.xml', 'view/payment_mode.xml', 'view/payment_mode_type.xml', - 'view/bank_payment_manual.xml', - 'data/payment_mode_type.xml', 'workflow/account_payment.xml', - 'security/ir.model.access.csv', ], 'description': ''' This addon adds payment infrastructure to the Banking Addons. diff --git a/account_banking_payment/i18n/nl.po b/account_banking_payment/i18n/nl.po new file mode 100644 index 000000000..8bc66d15a --- /dev/null +++ b/account_banking_payment/i18n/nl.po @@ -0,0 +1,213 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_banking_payment +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-10-15 12:29+0000\n" +"PO-Revision-Date: 2013-10-17 10:46+0100\n" +"Last-Translator: Erwin van der Ploeg (BAS Solutions) \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" +"X-Generator: Poedit 1.5.7\n" + +#. module: account_banking_payment +#: view:payment.order:0 +msgid "" +"{\n" +" 'readonly': [('state', '=', 'normal')]\n" +" }" +msgstr "" +"{\n" +" 'readonly': [('state', '=', 'normal')]\n" +" }" + +#. module: account_banking_payment +#: model:ir.model,name:account_banking_payment.model_payment_order +msgid "Payment Order" +msgstr "Betalingsopdracht" + +#. module: account_banking_payment +#: field:payment.mode.type,payment_order_type:0 +#: field:payment.order,payment_order_type:0 +msgid "Payment order type" +msgstr "Type betaalopdracht" + +#. module: account_banking_payment +#: help:payment.mode,payment_term_ids:0 +msgid "Limit selected invoices to invoices with these payment terms" +msgstr "Beperk de geselecteerde facturen tot facturen met deze betaalconditie" + +#. module: account_banking_payment +#: model:ir.model,name:account_banking_payment.model_payment_line +msgid "Payment Line" +msgstr "Betaalregel" + +#. module: account_banking_payment +#: model:ir.model,name:account_banking_payment.model_payment_mode +msgid "Payment Mode" +msgstr "Betaalwijze" + +#. module: account_banking_payment +#: field:payment.line,date_done:0 +msgid "Date Confirmed" +msgstr "Datum bevestigd" + +#. module: account_banking_payment +#: field:banking.transaction.wizard,manual_payment_order_id:0 +msgid "Match this payment order" +msgstr "Match deze betaalopdracht" + +#. module: account_banking_payment +#: model:ir.model,name:account_banking_payment.model_payment_mode_type +msgid "Payment Mode Type" +msgstr "Betaalmode soort" + +#. module: account_banking_payment +#: view:payment.order:0 +msgid "" +"{\n" +" 'invisible':[('state','!=','draft')]\n" +" }" +msgstr "" +"{\n" +" 'invisible':[('state','!=','draft')]\n" +" }" + +#. module: account_banking_payment +#: field:banking.import.transaction,payment_order_id:0 +#: field:banking.transaction.wizard,payment_order_id:0 +msgid "Payment order to reconcile" +msgstr "Betaalopdracht ter aflettering" + +#. module: account_banking_payment +#: selection:payment.mode.type,payment_order_type:0 +#: selection:payment.order,payment_order_type:0 +msgid "Payment" +msgstr "Betaling" + +#. module: account_banking_payment +#: field:payment.mode,payment_term_ids:0 +msgid "Payment terms" +msgstr "Betaalconditie" + +#. module: account_banking_payment +#: view:payment.mode:0 +msgid "Transfer move settings" +msgstr "Overschrijving instellingen" + +#. module: account_banking_payment +#: selection:payment.mode.type,payment_order_type:0 +#: selection:payment.order,payment_order_type:0 +msgid "Direct debit" +msgstr "Incasso-opdracht" + +#. module: account_banking_payment +#: model:ir.model,name:account_banking_payment.model_banking_import_transaction +msgid "Bank import transaction" +msgstr "Geïmporteerde bankmutatie" + +#. module: account_banking_payment +#: view:payment.mode:0 +msgid "Optional filter by payment term" +msgstr "Optioneel filter op betaalconditie" + +#. module: account_banking_payment +#: field:banking.import.transaction,payment_order_ids:0 +msgid "Payment orders" +msgstr "Betaalopdrachten" + +#. module: account_banking_payment +#: model:ir.model,name:account_banking_payment.model_payment_order_create +msgid "payment.order.create" +msgstr "payment.order.create" + +#. module: account_banking_payment +#: field:payment.mode,transfer_account_id:0 +msgid "Transfer account" +msgstr "Overschrijf bedrag" + +#. module: account_banking_payment +#: field:banking.transaction.wizard,payment_line_id:0 +msgid "Matching payment or storno" +msgstr "Gevonden betaling of storno" + +#. module: account_banking_payment +#: field:payment.order,date_sent:0 +msgid "Send date" +msgstr "Datum verstuurd" + +#. module: account_banking_payment +#: model:ir.model,name:account_banking_payment.model_banking_import_line +msgid "Bank import lines" +msgstr "Bankimportregels" + +#. module: account_banking_payment +#: field:banking.transaction.wizard,manual_payment_line_id:0 +msgid "Match this payment line" +msgstr "Match deze betaalregel" + +#. module: account_banking_payment +#: field:banking.transaction.wizard,payment_order_ids:0 +msgid "Matching payment orders" +msgstr "Gekoppelde betaalopdrachten" + +#. module: account_banking_payment +#: field:payment.line,transit_move_line_id:0 +msgid "Debit move line" +msgstr "Debit regel" + +#. module: account_banking_payment +#: field:banking.import.line,payment_order_id:0 +msgid "Payment order" +msgstr "Betaalopdracht" + +#. module: account_banking_payment +#: field:payment.mode,transfer_journal_id:0 +msgid "Transfer journal" +msgstr "Overschrijf dagboek" + +#. module: account_banking_payment +#: help:payment.mode,transfer_journal_id:0 +msgid "" +"Journal to write payment entries when confirming a debit order of this mode" +msgstr "" +"Dagboek voor het boeken van betalingen bij het bevestigen van een incasso in " +"deze mode" + +#. module: account_banking_payment +#: help:payment.mode,transfer_account_id:0 +msgid "" +"Pay off lines in sent orders with a move on this account. For debit type " +"modes only. You can only select accounts of type regular that are marked for " +"reconciliation" +msgstr "" +"Betaalregels in verzonden opdrachten met een mutatie op deze rekening. " +"Alleen voor incasso's. U kunt alleen een rekening selecteren van het " +"standaard soort, welke zijn gemarkeerd voor afletteren." + +#. module: account_banking_payment +#: field:banking.import.transaction,payment_line_id:0 +msgid "Payment line" +msgstr "Betaling" + +#. module: account_banking_payment +#: model:ir.model,name:account_banking_payment.model_banking_transaction_wizard +msgid "Match transaction" +msgstr "Match deze mutatie" + +#. module: account_banking_payment +#: help:payment.line,transit_move_line_id:0 +msgid "Move line through which the debit order pays the invoice" +msgstr "Mutatie waardoor de incasso opdracht de factuur betaald." + +#. module: account_banking_payment +#: field:payment.line,msg:0 +msgid "Message" +msgstr "Bericht" diff --git a/account_banking_payment/model/__init__.py b/account_banking_payment/model/__init__.py index 9908c8e01..e7ae81724 100644 --- a/account_banking_payment/model/__init__.py +++ b/account_banking_payment/model/__init__.py @@ -5,5 +5,4 @@ import payment_mode_type import payment_order_create import banking_import_transaction import banking_transaction_wizard -import bank_payment_manual import banking_import_line diff --git a/account_banking_payment/model/account_payment.py b/account_banking_payment/model/account_payment.py index b238cbeef..608c49dd9 100644 --- a/account_banking_payment/model/account_payment.py +++ b/account_banking_payment/model/account_payment.py @@ -115,49 +115,6 @@ class payment_order(orm.Model): 'payment_order_type': 'payment', } - def launch_wizard(self, cr, uid, ids, context=None): - """ - Search for a wizard to launch according to the type. - If type is manual. just confirm the order. - Previously (pre-v6) in account_payment/wizard/wizard_pay.py - """ - if context == None: - context = {} - result = {} - orders = self.browse(cr, uid, ids, context) - order = orders[0] - # check if a wizard is defined for the first order - if order.mode.type and order.mode.type.ir_model_id: - context['active_ids'] = ids - wizard_model = order.mode.type.ir_model_id.model - wizard_obj = self.pool.get(wizard_model) - wizard_id = wizard_obj.create(cr, uid, {}, context) - result = { - 'name': wizard_obj._description or _('Payment Order Export'), - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': wizard_model, - 'domain': [], - 'context': context, - 'type': 'ir.actions.act_window', - 'target': 'new', - 'res_id': wizard_id, - 'nodestroy': True, - } - else: - # should all be manual orders without type or wizard model - for order in orders[1:]: - if order.mode.type and order.mode.type.ir_model_id: - raise orm.except_orm( - _('Error'), - _('You can only combine payment orders of the same type') - ) - # process manual payments - wf_service = netsvc.LocalService('workflow') - for order_id in ids: - wf_service.trg_validate(uid, 'payment.order', order_id, 'sent', cr) - return result - def _write_payment_lines(self, cr, uid, ids, **kwargs): ''' ORM method for setting attributes of corresponding payment.line objects. @@ -284,6 +241,8 @@ class payment_order(orm.Model): 'debit': _('Direct debit order'), } for order in self.browse(cr, uid, ids, context=context): + if not order.mode.transfer_journal_id or not order.mode.transfer_account_id: + continue for line in order.line_ids: # basic checks if not line.move_line_id: @@ -301,7 +260,7 @@ class payment_order(orm.Model): 'journal_id': order.mode.transfer_journal_id.id, 'name': '%s %s' % (labels[order.payment_order_type], line.move_line_id.move_id.name), - 'reference': '%s%s' % (order.payment_order_type[:3].upper(), + 'ref': '%s%s' % (order.payment_order_type[:3].upper(), line.move_line_id.move_id.name), }, context=context) diff --git a/account_banking_payment/model/payment_line.py b/account_banking_payment/model/payment_line.py index 3abae5ff0..7b5345ecf 100644 --- a/account_banking_payment/model/payment_line.py +++ b/account_banking_payment/model/payment_line.py @@ -151,8 +151,8 @@ class payment_line(orm.Model): if torec_move_line.reconcile_partial_id: line_ids = [ x.id for x in - transit_move_line.reconcile_partial_id.line_partial_ids - ] + [torec_move_line.id] + torec_move_line.reconcile_partial_id.line_partial_ids + ] + [transit_move_line.id] total = move_line_obj.get_balance(cr, uid, line_ids) vals = { diff --git a/account_banking_payment/model/payment_mode.py b/account_banking_payment/model/payment_mode.py index f93acec8e..6237593b6 100644 --- a/account_banking_payment/model/payment_mode.py +++ b/account_banking_payment/model/payment_mode.py @@ -27,28 +27,9 @@ from openerp.osv import orm, fields class payment_mode(orm.Model): - ''' Restoring the payment type from version 5, - used to select the export wizard (if any) ''' _inherit = "payment.mode" - def suitable_bank_types(self, cr, uid, payment_mode_id=None, context=None): - """ Reinstates functional code for suitable bank type filtering. - Current code in account_payment is disfunctional. - """ - res = [] - payment_mode = self.browse( - cr, uid, payment_mode_id, context) - if (payment_mode and payment_mode.type and - payment_mode.type.suitable_bank_types): - res = [type.code for type in payment_mode.type.suitable_bank_types] - return res - _columns = { - 'type': fields.many2one( - 'payment.mode.type', 'Payment type', - required=True, - help='Select the Payment Type for the Payment Mode.' - ), 'transfer_account_id': fields.many2one( 'account.account', 'Transfer account', domain=[('type', '=', 'other'), diff --git a/account_banking_payment/model/payment_mode_type.py b/account_banking_payment/model/payment_mode_type.py index 51de7ca66..572cce869 100644 --- a/account_banking_payment/model/payment_mode_type.py +++ b/account_banking_payment/model/payment_mode_type.py @@ -27,30 +27,9 @@ from openerp.osv import orm, fields class payment_mode_type(orm.Model): - _name = 'payment.mode.type' - _description = 'Payment Mode Type' + _inherit = 'payment.mode.type' + _columns = { - 'name': fields.char( - 'Name', size=64, required=True, - help='Payment Type' - ), - 'code': fields.char( - 'Code', size=64, required=True, - help='Specify the Code for Payment Type' - ), - # Setting suitable_bank_types to required pending - # https://bugs.launchpad.net/openobject-addons/+bug/786845 - 'suitable_bank_types': fields.many2many( - 'res.partner.bank.type', - 'bank_type_payment_type_rel', - 'pay_type_id','bank_type_id', - 'Suitable bank types', required=True), - 'ir_model_id': fields.many2one( - 'ir.model', 'Payment wizard', - help=('Select the Payment Wizard for payments of this type. ' - 'Leave empty for manual processing'), - domain=[('osv_memory', '=', True)], - ), 'payment_order_type': fields.selection( [('payment', 'Payment'),('debit', 'Direct debit')], 'Payment order type', required=True, diff --git a/account_banking_payment/model/payment_order_create.py b/account_banking_payment/model/payment_order_create.py index 68a0d22f4..c7ac88790 100644 --- a/account_banking_payment/model/payment_order_create.py +++ b/account_banking_payment/model/payment_order_create.py @@ -23,9 +23,7 @@ # ############################################################################## -from datetime import datetime from openerp.osv import orm, fields -from openerp.tools import DEFAULT_SERVER_DATE_FORMAT from openerp.tools.translate import _ diff --git a/account_banking_payment/view/account_payment.xml b/account_banking_payment/view/account_payment.xml index 4f7601332..c26847abf 100644 --- a/account_banking_payment/view/account_payment.xml +++ b/account_banking_payment/view/account_payment.xml @@ -17,10 +17,6 @@ 'invisible':[('state','!=','draft')] } - - launch_wizard - diff --git a/account_banking_payment/view/bank_payment_manual.xml b/account_banking_payment/view/bank_payment_manual.xml deleted file mode 100644 index 538862ca3..000000000 --- a/account_banking_payment/view/bank_payment_manual.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - Form for manual payment wizard - payment.manual - - -