Finalise merge of account_banking_payment_transfer into account_payment_order

Add support for transfer moves
Display transfer moves in a dedicated tab in payment order view
Code cleanup
This commit is contained in:
Alexis de Lattre
2016-05-06 22:14:56 +02:00
parent eb7003f6c3
commit 51301645fa
35 changed files with 156 additions and 2178 deletions

View File

@@ -17,6 +17,6 @@ class AccountMoveLine(models.Model):
vals = super(AccountMoveLine, self)._prepare_payment_line_vals(
payment_order)
if payment_order.payment_type == 'inbound' and self.mandate_id:
vals['mandate_id'] = self.mandate_id.id or False
vals['partner_bank_id'] = self.mandate_id.partner_bank_id.id or False
vals['mandate_id'] = self.mandate_id.id
vals['partner_bank_id'] = self.mandate_id.partner_bank_id.id
return vals

View File

@@ -15,49 +15,23 @@ class AccountPaymentLine(models.Model):
comodel_name='account.banking.mandate', string='Direct Debit Mandate',
domain=[('state', '=', 'valid')])
# TODO : remove this
@api.model
def create(self, vals=None):
"""If the customer invoice has a mandate, take it
otherwise, take the first valid mandate of the bank account
"""
if vals is None:
vals = {}
partner_bank_id = vals.get('partner_bank_id')
move_line_id = vals.get('move_line_id')
if (self.env.context.get('search_payment_order_type') == 'debit' and
'mandate_id' not in vals):
if move_line_id:
line = self.env['account.move.line'].browse(move_line_id)
if (line.invoice and line.invoice.type == 'out_invoice' and
line.invoice.mandate_id):
vals.update({
'mandate_id': line.invoice.mandate_id.id,
'partner_bank_id': line.invoice.mandate_id.partner_bank_id.id,
})
if partner_bank_id and 'mandate_id' not in vals:
mandates = self.env['account.banking.mandate'].search(
[('partner_bank_id', '=', partner_bank_id),
('state', '=', 'valid')])
if mandates:
vals['mandate_id'] = mandates[0].id
return super(AccountPaymentLine, self).create(vals)
@api.one
@api.multi
@api.constrains('mandate_id', 'partner_bank_id')
def _check_mandate_bank_link(self):
if (self.mandate_id and self.partner_bank_id and
self.mandate_id.partner_bank_id.id !=
self.partner_bank_id.id):
raise ValidationError(
_("The payment line with reference '%s' has the bank account "
"'%s' which is not attached to the mandate '%s' (this "
"mandate is attached to the bank account '%s').") %
(self.name,
self.partner_bank_id.name_get()[0][1],
self.mandate_id.unique_mandate_reference,
self.mandate_id.partner_bank_id.name_get()[0][1]))
for pline in self:
if (pline.mandate_id and pline.partner_bank_id and
pline.mandate_id.partner_bank_id !=
pline.partner_bank_id):
raise ValidationError(_(
"The payment line number %s has the bank account "
"'%s' which is not attached to the mandate '%s' (this "
"mandate is attached to the bank account '%s').") %
(pline.name,
pline.partner_bank_id.acc_number,
pline.mandate_id.unique_mandate_reference,
pline.mandate_id.partner_bank_id.acc_number))
# @api.multi
# def check_payment_line(self):
# TODO : i would like to block here is mandate is missing... but how do you know it's required ? => create option on payment order ?
# TODO : i would like to block here is mandate is missing...
# but how do you know it's required ? => create option on payment order ?

View File

@@ -4,7 +4,7 @@
# © 2016 Antiun Ingenieria S.L. - Antonio Espinosa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
from openerp import models, fields
class AccountPaymentMode(models.Model):
@@ -33,18 +33,3 @@ class AccountPaymentMode(models.Model):
"- Country code (2, optional)\n"
"- Company idenfier (N, VAT)\n"
"- Service suffix (N, issued by bank)")
# I plan to change this -- Alexis
#sepa_type = fields.Char(compute="_compute_sepa_type")
#def _sepa_type_get(self):
# """Defined to be inherited by child addons, for instance:
# - account_banking_sepa_credit_transfer
# - account_banking_sepa_direct_debit
# """
# return False
#@api.multi
#@api.depends('type')
#def _compute_sepa_type(self):
# for mode in self:
# mode.sepa_type = mode._sepa_type_get()

View File

@@ -283,7 +283,7 @@ class AccountPaymentOrder(models.Model):
viban = self._prepare_field(
'%s IBAN' % party_type_label, iban, eval_ctx, gen_args=gen_args)
# TODO : add support for bank accounts other than IBAN
#viban = self._validate_iban(piban)
# viban = self._validate_iban(piban)
# At C level, the order is : BIC, Name, IBAN
# At B level, the order is : Name, IBAN, BIC
if order == 'B':

View File

@@ -1,78 +0,0 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3
Account Banking - Payments Transfer Account
===========================================
Payment order reconciliation infrastructure
This module reconciles invoices as soon as the payment order
is sent, by creating a move to a transfer account (aka suspense account).
When the moves on the suspense account are reconciled (typically through
the bank statement reconciliation, the payment order moves to the done
status).
Installation
============
This module depends on :
* account_banking_payment_export
This module is part of the OCA/bank-payment suite.
Configuration
=============
To configure this module, you need to:
* create a transfer account who allow reconciliation : option "Allow Reconciliation" activated.
* configure transfer account on payment mode. Go to the menu Accounting > Configuration > Miscellaneous > Payment Mode and complete the section "Transfer move settings".
Usage
=====
This module allows to reconcile transfer account and invoice by selecting on a payment order a payment mode with the option "transfer account" activated.
For further information, please visit:
* https://www.odoo.com/forum/help-1
Known issues / Roadmap
======================
* No known issues
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-payment/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/bank-payment/issues/new?body=module:%20account_banking_payment_transfer%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Contributors
------------
* Stéphane Bidoul <stephane.bidoul@acsone.eu>
* Adrien Peiffer <adrien.peiffer@acsone.eu>
* Alexis de Lattre
* Matt Choplin
* Alexandre Fayolle
* Danimar Ribeiro
Maintainer
----------
.. image:: http://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: http://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
To contribute to this module, please visit http://odoo-community.org.

View File

@@ -1,2 +0,0 @@
from . import model
from .post_install import set_date_sent

View File

@@ -1,33 +0,0 @@
# -*- coding: utf-8 -*-
# © 2009 EduSense BV (<http://www.edusense.nl>)
# © 2011-2013 Therp BV (<http://therp.nl>)
# © 2013-2014 ACSONE SA (<http://acsone.eu>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Account Banking - Payments Transfer Account',
'version': '8.0.0.3.0',
'license': 'AGPL-3',
'author': "Banking addons community,Odoo Community Association (OCA)",
'website': 'https://github.com/OCA/banking',
'category': 'Banking addons',
'post_init_hook': 'set_date_sent',
'depends': [
'account_banking_payment_export',
],
'data': [
'view/payment_mode.xml',
'workflow/account_payment.xml',
'view/account_payment.xml',
],
'test': [
'test/data.yml',
'test/test_payment_method.yml',
'test/test_partial_payment_refunded.yml',
'test/test_partial_payment_transfer.yml',
],
'auto_install': False,
'installable': False,
}

View File

@@ -1,340 +0,0 @@
# 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-25 15:58+0000\n"
"PO-Revision-Date: 2013-10-25 15:58+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_banking_payment
#: model:ir.model,name:account_banking_payment.model_payment_order_create
msgid "payment.order.create"
msgstr ""
#. module: account_banking_payment
#: view:payment.order:0
msgid "{\n"
" 'readonly': [('state', '=', 'normal')]\n"
" }"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/account_payment.py:204
#: code:addons/account_banking_payment/model/banking_import_transaction.py:224
#: code:addons/account_banking_payment/model/banking_import_transaction.py:236
#: code:addons/account_banking_payment/model/banking_import_transaction.py:240
#, python-format
msgid "Cannot unreconcile"
msgstr ""
#. module: account_banking_payment
#: field:payment.mode,transfer_journal_id:0
msgid "Transfer journal"
msgstr ""
#. module: account_banking_payment
#: model:ir.model,name:account_banking_payment.model_payment_order
msgid "Payment Order"
msgstr ""
#. module: account_banking_payment
#: field:payment.mode.type,payment_order_type:0
#: field:payment.order,payment_order_type:0
msgid "Payment order type"
msgstr ""
#. module: account_banking_payment
#: help:payment.mode,payment_term_ids:0
msgid "Limit selected invoices to invoices with these payment terms"
msgstr ""
#. module: account_banking_payment
#: model:ir.model,name:account_banking_payment.model_payment_line
msgid "Payment Line"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/account_payment.py:251
#, python-format
msgid "No move line provided for line %s"
msgstr ""
#. module: account_banking_payment
#: model:ir.model,name:account_banking_payment.model_payment_mode
msgid "Payment Mode"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/payment_line.py:131
#, python-format
msgid "Can not reconcile"
msgstr ""
#. module: account_banking_payment
#: field:payment.line,date_done:0
msgid "Date Confirmed"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/banking_import_transaction.py:179
#, python-format
msgid "Cannot reconcile"
msgstr ""
#. module: account_banking_payment
#: field:banking.transaction.wizard,manual_payment_order_id:0
msgid "Match this payment order"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/account_payment.py:255
#, python-format
msgid "Move line %s has already been paid/reconciled"
msgstr ""
#. 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 ""
#. module: account_banking_payment
#: view:payment.order:0
msgid "{\n"
" 'invisible':[('state','!=','draft')]\n"
" }"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/banking_import_transaction.py:261
#: code:addons/account_banking_payment/model/banking_import_transaction.py:265
#: code:addons/account_banking_payment/model/banking_import_transaction.py:284
#, python-format
msgid "Cannot cancel link with storno"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/banking_import_transaction.py:237
#, python-format
msgid "Cannot unreconcile: no payment or direct debit order"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/account_payment.py:205
#, python-format
msgid "Cannot unreconcile payment order: Workflow will not allow it."
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/account_payment.py:241
#, python-format
msgid "Direct debit order"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/banking_import_transaction.py:154
#, python-format
msgid "Cannot link with storno"
msgstr ""
#. 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 ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/banking_import_transaction.py:241
#, python-format
msgid "Payment orders without transfer move lines cannot be unreconciled this way"
msgstr ""
#. module: account_banking_payment
#: selection:payment.mode.type,payment_order_type:0
#: selection:payment.order,payment_order_type:0
msgid "Payment"
msgstr ""
#. module: account_banking_payment
#: field:payment.mode,payment_term_ids:0
msgid "Payment terms"
msgstr ""
#. module: account_banking_payment
#: view:payment.mode:0
msgid "Transfer move settings"
msgstr ""
#. module: account_banking_payment
#: selection:payment.mode.type,payment_order_type:0
#: selection:payment.order,payment_order_type:0
msgid "Direct debit"
msgstr ""
#. module: account_banking_payment
#: model:ir.model,name:account_banking_payment.model_banking_import_transaction
msgid "Bank import transaction"
msgstr ""
#. module: account_banking_payment
#: view:payment.mode:0
msgid "Optional filter by payment term"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/payment_line.py:136
#: code:addons/account_banking_payment/model/payment_line.py:142
#, python-format
msgid "Move line %s has already been reconciled"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/account_payment.py:271
#, python-format
msgid "%s for %s"
msgstr ""
#. module: account_banking_payment
#: field:banking.import.transaction,payment_order_ids:0
msgid "Payment orders"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/banking_import_transaction.py:155
#: code:addons/account_banking_payment/model/banking_import_transaction.py:262
#, python-format
msgid "No direct debit order item"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/banking_import_transaction.py:266
#, python-format
msgid "The direct debit order item is not marked for storno"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/banking_import_transaction.py:285
#, python-format
msgid "Line id not found"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/banking_transaction_wizard.py:62
#, python-format
msgid "When matching a payment order, the amounts have to match exactly"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/account_payment.py:250
#: code:addons/account_banking_payment/model/account_payment.py:254
#: code:addons/account_banking_payment/model/banking_transaction_wizard.py:61
#: code:addons/account_banking_payment/model/payment_line.py:135
#: code:addons/account_banking_payment/model/payment_line.py:141
#, python-format
msgid "Error"
msgstr ""
#. module: account_banking_payment
#: field:payment.mode,transfer_account_id:0
msgid "Transfer account"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/banking_import_transaction.py:225
#, python-format
msgid "Cannot unreconcile: this operation is not yet supported for match type 'payment'"
msgstr ""
#. module: account_banking_payment
#: field:banking.transaction.wizard,payment_line_id:0
msgid "Matching payment or storno"
msgstr ""
#. module: account_banking_payment
#: field:payment.order,date_sent:0
msgid "Send date"
msgstr ""
#. module: account_banking_payment
#: model:ir.model,name:account_banking_payment.model_banking_import_line
msgid "Bank import lines"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/payment_order_create.py:88
#, python-format
msgid "Entry Lines"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/payment_line.py:132
#, python-format
msgid "No move line for line %s"
msgstr ""
#. module: account_banking_payment
#: field:banking.transaction.wizard,manual_payment_line_id:0
msgid "Match this payment line"
msgstr ""
#. module: account_banking_payment
#: field:banking.transaction.wizard,payment_order_ids:0
msgid "Matching payment orders"
msgstr ""
#. module: account_banking_payment
#: field:payment.line,transit_move_line_id:0
msgid "Debit move line"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/account_payment.py:240
#: field:banking.import.line,payment_order_id:0
#, python-format
msgid "Payment order"
msgstr ""
#. module: account_banking_payment
#: code:addons/account_banking_payment/model/banking_import_transaction.py:180
#, python-format
msgid "Cannot reconcile: no direct debit order"
msgstr ""
#. 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 ""
#. module: account_banking_payment
#: model:ir.model,name:account_banking_payment.model_payment_mode_type
msgid "Payment Mode Type"
msgstr ""
#. module: account_banking_payment
#: field:banking.import.transaction,payment_line_id:0
msgid "Payment line"
msgstr ""
#. module: account_banking_payment
#: model:ir.model,name:account_banking_payment.model_banking_transaction_wizard
msgid "Match transaction"
msgstr ""
#. module: account_banking_payment
#: help:payment.line,transit_move_line_id:0
msgid "Move line through which the debit order pays the invoice"
msgstr ""
#. module: account_banking_payment
#: field:payment.line,msg:0
msgid "Message"
msgstr ""

View File

@@ -1,170 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_banking_payment_transfer
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-18 10:57+0000\n"
"PO-Revision-Date: 2016-04-18 10:57+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
"Language-Team: English (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/en/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:128
#, python-format
msgid "%s bank line %s"
msgstr "%s bank line %s"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:162
#, python-format
msgid "%s line %s"
msgstr "%s line %s"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_account_move_reconcile
msgid "Account Reconciliation"
msgstr "Account Reconciliation"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_bank_payment_line
msgid "Bank Payment Lines"
msgstr "Bank Payment Lines"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:70
#, python-format
msgid "Can not reconcile: no move line for payment line %s of partner '%s'."
msgstr "Can not reconcile: no move line for payment line %s of partner '%s'."
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:185
#, python-format
msgid ""
"Cannot generate the transfer move when the currency of the payment (%s) is "
"not the same as the currency of the company (%s). This is not supported for "
"the moment."
msgstr "Cannot generate the transfer move when the currency of the payment (%s) is not the same as the currency of the company (%s). This is not supported for the moment."
#. module: account_banking_payment_transfer
#: field:payment.line,date_done:0
msgid "Date Confirmed"
msgstr "Date Confirmed"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:221
#, python-format
msgid "Direct debit"
msgstr "Direct debit"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:84
#, python-format
msgid ""
"For partner '%s', the account of the account move line to pay (%s) is "
"different from the account of of the transit move line (%s)."
msgstr "For partner '%s', the account of the account move line to pay (%s) is different from the account of of the transit move line (%s)."
#. module: account_banking_payment_transfer
#: help:payment.mode,transfer_journal_id:0
msgid ""
"Journal to write payment entries when confirming a debit order of this mode"
msgstr "Journal to write payment entries when confirming a debit order of this mode"
#. module: account_banking_payment_transfer
#: field:payment.line,msg:0
msgid "Message"
msgstr "Message"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:76
#, python-format
msgid "Move line '%s' of partner '%s' has already been reconciled"
msgstr "Move line '%s' of partner '%s' has already been reconciled"
#. module: account_banking_payment_transfer
#: help:bank.payment.line,transit_move_line_id:0
msgid "Move line through which the payment/debit order pays the invoice"
msgstr "Move line through which the payment/debit order pays the invoice"
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment date"
msgstr "One move per payment date"
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment line"
msgstr "One move per payment line"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:264
#, python-format
msgid "Partial Reconcile Moves Line"
msgstr "Partial Reconcile Moves Line"
#. module: account_banking_payment_transfer
#: help:payment.mode,transfer_account_id:0
msgid ""
"Pay off lines in sent orders with a move on this account. You can only "
"select accounts of type regular that are marked for reconciliation"
msgstr "Pay off lines in sent orders with a move on this account. You can only select accounts of type regular that are marked for reconciliation"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:220
#, python-format
msgid "Payment"
msgstr "Payment"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_line
msgid "Payment Line"
msgstr "Payment Line"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_mode
msgid "Payment Mode"
msgstr "Payment Mode"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_order
msgid "Payment Order"
msgstr "Payment Order"
#. module: account_banking_payment_transfer
#: field:payment.order,date_sent:0
msgid "Send date"
msgstr "Send date"
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_account_id:0
msgid "Transfer account"
msgstr "Transfer account"
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_journal_id:0
msgid "Transfer journal"
msgstr "Transfer journal"
#. module: account_banking_payment_transfer
#: field:bank.payment.line,transit_move_line_id:0
msgid "Transfer move line"
msgstr "Transfer move line"
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_move_option:0
msgid "Transfer move option"
msgstr "Transfer move option"
#. module: account_banking_payment_transfer
#: view:payment.mode:account_banking_payment_transfer.view_payment_mode_form_inherit
msgid "Transfer move settings"
msgstr "Transfer move settings"

View File

@@ -1,170 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_banking_payment_transfer
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-08 00:46+0000\n"
"PO-Revision-Date: 2016-04-06 00:14+0000\n"
"Last-Translator: <>\n"
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:128
#, python-format
msgid "%s bank line %s"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:162
#, python-format
msgid "%s line %s"
msgstr ""
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_account_move_reconcile
msgid "Account Reconciliation"
msgstr ""
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_bank_payment_line
msgid "Bank Payment Lines"
msgstr "Líneas de pago bancario"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:70
#, python-format
msgid "Can not reconcile: no move line for payment line %s of partner '%s'."
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:185
#, python-format
msgid ""
"Cannot generate the transfer move when the currency of the payment (%s) is "
"not the same as the currency of the company. This is not supported for the "
"moment."
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.line,date_done:0
msgid "Date Confirmed"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:221
#, python-format
msgid "Direct debit"
msgstr "Adeudo directo (cobro)"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:84
#, python-format
msgid ""
"For partner '%s', the account of the account move line to pay (%s) is "
"different from the account of of the transit move line (%s)."
msgstr ""
#. module: account_banking_payment_transfer
#: help:payment.mode,transfer_journal_id:0
msgid ""
"Journal to write payment entries when confirming a debit order of this mode"
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.line,msg:0
msgid "Message"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:76
#, python-format
msgid "Move line '%s' of partner '%s' has already been reconciled"
msgstr ""
#. module: account_banking_payment_transfer
#: help:bank.payment.line,transit_move_line_id:0
msgid "Move line through which the payment/debit order pays the invoice"
msgstr ""
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment date"
msgstr ""
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment line"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:264
#, python-format
msgid "Partial Reconcile Moves Line"
msgstr ""
#. module: account_banking_payment_transfer
#: help:payment.mode,transfer_account_id:0
msgid ""
"Pay off lines in sent orders with a move on this account. You can only "
"select accounts of type regular that are marked for reconciliation"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:220
#, python-format
msgid "Payment"
msgstr "Pago"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_line
msgid "Payment Line"
msgstr "Línea de pago"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_mode
msgid "Payment Mode"
msgstr "Modo de pago"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_order
msgid "Payment Order"
msgstr "Orden de pago"
#. module: account_banking_payment_transfer
#: field:payment.order,date_sent:0
msgid "Send date"
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_account_id:0
msgid "Transfer account"
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_journal_id:0
msgid "Transfer journal"
msgstr ""
#. module: account_banking_payment_transfer
#: field:bank.payment.line,transit_move_line_id:0
msgid "Transfer move line"
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_move_option:0
msgid "Transfer move option"
msgstr ""
#. module: account_banking_payment_transfer
#: view:payment.mode:account_banking_payment_transfer.view_payment_mode_form_inherit
msgid "Transfer move settings"
msgstr ""

View File

@@ -1,170 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_banking_payment_transfer
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-08 00:46+0000\n"
"PO-Revision-Date: 2016-04-06 00:14+0000\n"
"Last-Translator: <>\n"
"Language-Team: French (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:128
#, python-format
msgid "%s bank line %s"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:162
#, python-format
msgid "%s line %s"
msgstr ""
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_account_move_reconcile
msgid "Account Reconciliation"
msgstr ""
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_bank_payment_line
msgid "Bank Payment Lines"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:70
#, python-format
msgid "Can not reconcile: no move line for payment line %s of partner '%s'."
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:185
#, python-format
msgid ""
"Cannot generate the transfer move when the currency of the payment (%s) is "
"not the same as the currency of the company. This is not supported for the "
"moment."
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.line,date_done:0
msgid "Date Confirmed"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:221
#, python-format
msgid "Direct debit"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:84
#, python-format
msgid ""
"For partner '%s', the account of the account move line to pay (%s) is "
"different from the account of of the transit move line (%s)."
msgstr ""
#. module: account_banking_payment_transfer
#: help:payment.mode,transfer_journal_id:0
msgid ""
"Journal to write payment entries when confirming a debit order of this mode"
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.line,msg:0
msgid "Message"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:76
#, python-format
msgid "Move line '%s' of partner '%s' has already been reconciled"
msgstr ""
#. module: account_banking_payment_transfer
#: help:bank.payment.line,transit_move_line_id:0
msgid "Move line through which the payment/debit order pays the invoice"
msgstr ""
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment date"
msgstr ""
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment line"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:264
#, python-format
msgid "Partial Reconcile Moves Line"
msgstr ""
#. module: account_banking_payment_transfer
#: help:payment.mode,transfer_account_id:0
msgid ""
"Pay off lines in sent orders with a move on this account. You can only "
"select accounts of type regular that are marked for reconciliation"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:220
#, python-format
msgid "Payment"
msgstr ""
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_line
msgid "Payment Line"
msgstr "Ligne de paiement"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_mode
msgid "Payment Mode"
msgstr "Mode de paiement"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_order
msgid "Payment Order"
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.order,date_sent:0
msgid "Send date"
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_account_id:0
msgid "Transfer account"
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_journal_id:0
msgid "Transfer journal"
msgstr ""
#. module: account_banking_payment_transfer
#: field:bank.payment.line,transit_move_line_id:0
msgid "Transfer move line"
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_move_option:0
msgid "Transfer move option"
msgstr ""
#. module: account_banking_payment_transfer
#: view:payment.mode:account_banking_payment_transfer.view_payment_mode_form_inherit
msgid "Transfer move settings"
msgstr ""

View File

@@ -1,170 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_banking_payment_transfer
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-08 00:46+0000\n"
"PO-Revision-Date: 2016-04-06 00:14+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
"Language-Team: Dutch (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:128
#, python-format
msgid "%s bank line %s"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:162
#, python-format
msgid "%s line %s"
msgstr ""
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_account_move_reconcile
msgid "Account Reconciliation"
msgstr ""
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_bank_payment_line
msgid "Bank Payment Lines"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:70
#, python-format
msgid "Can not reconcile: no move line for payment line %s of partner '%s'."
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:185
#, python-format
msgid ""
"Cannot generate the transfer move when the currency of the payment (%s) is "
"not the same as the currency of the company. This is not supported for the "
"moment."
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.line,date_done:0
msgid "Date Confirmed"
msgstr "Datum bevestigd"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:221
#, python-format
msgid "Direct debit"
msgstr "Incasso-opdracht"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:84
#, python-format
msgid ""
"For partner '%s', the account of the account move line to pay (%s) is "
"different from the account of of the transit move line (%s)."
msgstr ""
#. module: account_banking_payment_transfer
#: 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_transfer
#: field:payment.line,msg:0
msgid "Message"
msgstr "Bericht"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:76
#, python-format
msgid "Move line '%s' of partner '%s' has already been reconciled"
msgstr ""
#. module: account_banking_payment_transfer
#: help:bank.payment.line,transit_move_line_id:0
msgid "Move line through which the payment/debit order pays the invoice"
msgstr ""
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment date"
msgstr ""
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment line"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:264
#, python-format
msgid "Partial Reconcile Moves Line"
msgstr ""
#. module: account_banking_payment_transfer
#: help:payment.mode,transfer_account_id:0
msgid ""
"Pay off lines in sent orders with a move on this account. You can only "
"select accounts of type regular that are marked for reconciliation"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:220
#, python-format
msgid "Payment"
msgstr "Betaling"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_line
msgid "Payment Line"
msgstr "Betaalregel"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_mode
msgid "Payment Mode"
msgstr "Betaalwijze"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_order
msgid "Payment Order"
msgstr "Betalingsopdracht"
#. module: account_banking_payment_transfer
#: field:payment.order,date_sent:0
msgid "Send date"
msgstr "Datum verstuurd"
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_account_id:0
msgid "Transfer account"
msgstr "Overschrijf rekening"
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_journal_id:0
msgid "Transfer journal"
msgstr "Overschrijf dagboek"
#. module: account_banking_payment_transfer
#: field:bank.payment.line,transit_move_line_id:0
msgid "Transfer move line"
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_move_option:0
msgid "Transfer move option"
msgstr ""
#. module: account_banking_payment_transfer
#: view:payment.mode:account_banking_payment_transfer.view_payment_mode_form_inherit
msgid "Transfer move settings"
msgstr "Overschrijving instellingen"

View File

@@ -1,172 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_banking_payment_transfer
#
# Translators:
# danimaribeiro <danimaribeiro@gmail.com>, 2016
# danimaribeiro <danimaribeiro@gmail.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-18 10:57+0000\n"
"PO-Revision-Date: 2016-04-18 10:57+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:128
#, python-format
msgid "%s bank line %s"
msgstr "%s linha bancária %s"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:162
#, python-format
msgid "%s line %s"
msgstr "%s linha %s"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_account_move_reconcile
msgid "Account Reconciliation"
msgstr "Conta de reconciliação"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_bank_payment_line
msgid "Bank Payment Lines"
msgstr "Linhas de pagamento bancária"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:70
#, python-format
msgid "Can not reconcile: no move line for payment line %s of partner '%s'."
msgstr "Não pode reconciliar: nenhum movimentação para a linha de pagamento %s do parceiro '%s'."
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:185
#, python-format
msgid ""
"Cannot generate the transfer move when the currency of the payment (%s) is "
"not the same as the currency of the company (%s). This is not supported for "
"the moment."
msgstr ""
#. module: account_banking_payment_transfer
#: field:payment.line,date_done:0
msgid "Date Confirmed"
msgstr "Data Confirmada"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:221
#, python-format
msgid "Direct debit"
msgstr "Débito Direto"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:84
#, python-format
msgid ""
"For partner '%s', the account of the account move line to pay (%s) is "
"different from the account of of the transit move line (%s)."
msgstr "Para o parceiro '%s', a conta da movimentação para pagar (%s) é diferente da conta da movimentação de trânsito (%s)."
#. module: account_banking_payment_transfer
#: help:payment.mode,transfer_journal_id:0
msgid ""
"Journal to write payment entries when confirming a debit order of this mode"
msgstr "Entrada de diário para salvar os pagamentos quando confirmar a ordem de pagamento deste mododeze mode"
#. module: account_banking_payment_transfer
#: field:payment.line,msg:0
msgid "Message"
msgstr "Mensagem"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:76
#, python-format
msgid "Move line '%s' of partner '%s' has already been reconciled"
msgstr "Linha de movimentação '%s' do parceiro '%s' já foi reconciliada"
#. module: account_banking_payment_transfer
#: help:bank.payment.line,transit_move_line_id:0
msgid "Move line through which the payment/debit order pays the invoice"
msgstr "Linha de movimentação na qual o pagamento/débito paga a fatura"
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment date"
msgstr "Uma movimentação por data de pagamento"
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment line"
msgstr "Uma movimentação por linha de pagamento"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:264
#, python-format
msgid "Partial Reconcile Moves Line"
msgstr "Reconciliação parcial das linhas do movimento"
#. module: account_banking_payment_transfer
#: help:payment.mode,transfer_account_id:0
msgid ""
"Pay off lines in sent orders with a move on this account. You can only "
"select accounts of type regular that are marked for reconciliation"
msgstr ""
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:220
#, python-format
msgid "Payment"
msgstr "Pagamento"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_line
msgid "Payment Line"
msgstr "Linha de Pagamento"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_mode
msgid "Payment Mode"
msgstr "Modo de Pagamento"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_order
msgid "Payment Order"
msgstr "Ordem de Pagamento"
#. module: account_banking_payment_transfer
#: field:payment.order,date_sent:0
msgid "Send date"
msgstr "Data de envio"
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_account_id:0
msgid "Transfer account"
msgstr "Conta de Transferência"
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_journal_id:0
msgid "Transfer journal"
msgstr "Transferir Diário"
#. module: account_banking_payment_transfer
#: field:bank.payment.line,transit_move_line_id:0
msgid "Transfer move line"
msgstr "Linha de transferência da movimentação"
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_move_option:0
msgid "Transfer move option"
msgstr "Opção de transferência"
#. module: account_banking_payment_transfer
#: view:payment.mode:account_banking_payment_transfer.view_payment_mode_form_inherit
msgid "Transfer move settings"
msgstr "Definições de transferência e movimentações"

View File

@@ -1,171 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_banking_payment_transfer
#
# Translators:
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2016
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-18 10:57+0000\n"
"PO-Revision-Date: 2016-04-19 08:58+0000\n"
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: sl\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:128
#, python-format
msgid "%s bank line %s"
msgstr "%s bančna postavka %s"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:162
#, python-format
msgid "%s line %s"
msgstr "%s postavka %s"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_account_move_reconcile
msgid "Account Reconciliation"
msgstr "Uskladitev konta"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_bank_payment_line
msgid "Bank Payment Lines"
msgstr "Postavke bančnih plačil"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:70
#, python-format
msgid "Can not reconcile: no move line for payment line %s of partner '%s'."
msgstr "Ni mogoče uskladiti: ni postavke premika za plačilno postavko %s partnerja '%s'."
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:185
#, python-format
msgid ""
"Cannot generate the transfer move when the currency of the payment (%s) is "
"not the same as the currency of the company (%s). This is not supported for "
"the moment."
msgstr "Ni mogoče ustvariti premika transferja, kadar je valuta plačila (%s) drugačna od valute družbe (%s). Ta opcija trenutno ni podprta."
#. module: account_banking_payment_transfer
#: field:payment.line,date_done:0
msgid "Date Confirmed"
msgstr "Datum potrditve"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:221
#, python-format
msgid "Direct debit"
msgstr "Direktna obremenitev"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:84
#, python-format
msgid ""
"For partner '%s', the account of the account move line to pay (%s) is "
"different from the account of of the transit move line (%s)."
msgstr "Pri partnerju '%s', je konto postavke premika za plačilo (%s) drugačen od konta postavke tranzitnega premika (%s)."
#. module: account_banking_payment_transfer
#: help:payment.mode,transfer_journal_id:0
msgid ""
"Journal to write payment entries when confirming a debit order of this mode"
msgstr "Dnevnik za zapis plačilnih vnosov pri potrjevanju obremenitvenega naloga v tem načinu"
#. module: account_banking_payment_transfer
#: field:payment.line,msg:0
msgid "Message"
msgstr "Sporočilo"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/bank_payment_line.py:76
#, python-format
msgid "Move line '%s' of partner '%s' has already been reconciled"
msgstr "Postavka premika '%s' partnerja '%s' je že bila usklajena"
#. module: account_banking_payment_transfer
#: help:bank.payment.line,transit_move_line_id:0
msgid "Move line through which the payment/debit order pays the invoice"
msgstr "Posavka premika, preko katere plačilni/obremenitveni nalog plača račun"
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment date"
msgstr "En premik za vsak datum plačila"
#. module: account_banking_payment_transfer
#: selection:payment.mode,transfer_move_option:0
msgid "One move per payment line"
msgstr "En premik za vsako plačilno postavko"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:264
#, python-format
msgid "Partial Reconcile Moves Line"
msgstr "Delno usklajevanje postavk premikov"
#. module: account_banking_payment_transfer
#: help:payment.mode,transfer_account_id:0
msgid ""
"Pay off lines in sent orders with a move on this account. You can only "
"select accounts of type regular that are marked for reconciliation"
msgstr "Postavke izplačil v poslanih nalogih s premikom na ta konto. Izberete lahko le konte običajnega tipa, ki so označeni za uskladitev"
#. module: account_banking_payment_transfer
#: code:addons/account_banking_payment_transfer/model/account_payment.py:220
#, python-format
msgid "Payment"
msgstr "Plačilo"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_line
msgid "Payment Line"
msgstr "Plačilna postavka"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_mode
msgid "Payment Mode"
msgstr "Metoda plačila"
#. module: account_banking_payment_transfer
#: model:ir.model,name:account_banking_payment_transfer.model_payment_order
msgid "Payment Order"
msgstr "Plačilni nalog"
#. module: account_banking_payment_transfer
#: field:payment.order,date_sent:0
msgid "Send date"
msgstr "Datum odpošiljanja"
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_account_id:0
msgid "Transfer account"
msgstr "Konto transferja"
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_journal_id:0
msgid "Transfer journal"
msgstr "Dnevnik transferja"
#. module: account_banking_payment_transfer
#: field:bank.payment.line,transit_move_line_id:0
msgid "Transfer move line"
msgstr "Postavka premika transferja"
#. module: account_banking_payment_transfer
#: field:payment.mode,transfer_move_option:0
msgid "Transfer move option"
msgstr "Opcija premika transferja"
#. module: account_banking_payment_transfer
#: view:payment.mode:account_banking_payment_transfer.view_payment_mode_form_inherit
msgid "Transfer move settings"
msgstr "Nastavitve premikov transferja"

View File

@@ -1,7 +0,0 @@
# -*- coding: utf-8 -*-
from . import account_payment
from . import payment_line
from . import bank_payment_line
from . import payment_mode
from . import account_move_reconcile

View File

@@ -1,273 +0,0 @@
# -*- coding: utf-8 -*-
# © 2009 EduSense BV (<http://www.edusense.nl>)
# © 2011-2013 Therp BV (<http://therp.nl>)
# © 2013-2014 ACSONE SA (<http://acsone.eu>).
# © 2014-2015 Akretion (www.akretion.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api, _
from openerp.exceptions import Warning as UserError
class PaymentOrder(models.Model):
'''
Enable extra states for payment exports
'''
_inherit = 'payment.order'
@api.multi
def get_partial_reconcile_ids(self):
self.ensure_one()
reconcile_partial_ids = [line.move_line_id.reconcile_partial_id.id
for line in self.line_ids if
line.move_line_id.reconcile_partial_id.id]
return reconcile_partial_ids
@api.one
def get_partial_reconcile_count(self):
self.partial_reconcile_count = len(self.get_partial_reconcile_ids())
date_scheduled = fields.Date(states={
'sent': [('readonly', True)],
'rejected': [('readonly', True)],
'done': [('readonly', True)],
})
reference = fields.Char(states={
'sent': [('readonly', True)],
'rejected': [('readonly', True)],
'done': [('readonly', True)],
})
mode = fields.Many2one(states={
'sent': [('readonly', True)],
'rejected': [('readonly', True)],
'done': [('readonly', True)],
})
state = fields.Selection(selection_add=[
('sent', 'Sent'),
('rejected', 'Rejected'),
], string='State')
line_ids = fields.One2many(states={
'open': [('readonly', True)],
'cancel': [('readonly', True)],
'sent': [('readonly', True)],
'rejected': [('readonly', True)],
'done': [('readonly', True)]
})
user_id = fields.Many2one(states={
'sent': [('readonly', True)],
'rejected': [('readonly', True)],
'done': [('readonly', True)]
})
date_prefered = fields.Selection(states={
'sent': [('readonly', True)],
'rejected': [('readonly', True)],
'done': [('readonly', True)]
})
date_sent = fields.Date(string='Send date', readonly=True)
partial_reconcile_count = fields\
.Integer(string='Partial Reconciles Counter',
compute='get_partial_reconcile_count')
@api.multi
def action_rejected(self):
return True
@api.multi
def action_done(self):
for line in self.line_ids:
line.date_done = fields.Date.context_today(self)
return super(PaymentOrder, self).action_done()
@api.multi
def _get_transfer_move_lines(self):
"""
Get the transfer move lines (on the transfer account).
"""
res = []
for order in self:
for bank_line in order.bank_line_ids:
move_line = bank_line.transfer_move_line_id
if move_line:
res.append(move_line)
return res
@api.multi
def get_transfer_move_line_ids(self, *args):
'''Used in the workflow for trigger_expr_id'''
return [move_line.id for move_line in self._get_transfer_move_lines()]
@api.multi
def test_done(self):
"""
Test if all moves on the transfer account are reconciled.
Called from the workflow to move to the done state when
all transfer move have been reconciled through bank statements.
"""
return all([move_line.reconcile_id for move_line in
self._get_transfer_move_lines()])
@api.multi
def test_undo_done(self):
return not self.test_done()
@api.multi
def _prepare_transfer_move(self):
vals = {
'journal_id': self.mode.transfer_journal_id.id,
'ref': '%s %s' % (
self.payment_order_type[:3].upper(), self.reference)
}
return vals
@api.multi
def _prepare_move_line_transfer_account(
self, amount, move, bank_payment_lines, labels):
if len(bank_payment_lines) == 1:
partner_id = bank_payment_lines[0].partner_id.id
name = _('%s bank line %s') % (labels[self.payment_order_type],
bank_payment_lines[0].name)
else:
partner_id = False
name = '%s %s' % (
labels[self.payment_order_type], self.reference)
date_maturity = bank_payment_lines[0].date
vals = {
'name': name,
'move_id': move.id,
'partner_id': partner_id,
'account_id': self.mode.transfer_account_id.id,
'credit': (self.payment_order_type == 'payment' and
amount or 0.0),
'debit': (self.payment_order_type == 'debit' and
amount or 0.0),
'date_maturity': date_maturity,
}
return vals
@api.multi
def _prepare_move_line_partner_account(self, bank_line, move, labels):
# TODO : ALEXIS check don't group if move_line_id.account_id
# is not the same
if bank_line.payment_line_ids[0].move_line_id:
account_id =\
bank_line.payment_line_ids[0].move_line_id.account_id.id
else:
if self.payment_order_type == 'debit':
account_id =\
bank_line.partner_id.property_account_receivable.id
else:
account_id = bank_line.partner_id.property_account_payable.id
vals = {
'name': _('%s line %s') % (
labels[self.payment_order_type], bank_line.name),
'move_id': move.id,
'partner_id': bank_line.partner_id.id,
'account_id': account_id,
'credit': (self.payment_order_type == 'debit' and
bank_line.amount_currency or 0.0),
'debit': (self.payment_order_type == 'payment' and
bank_line.amount_currency or 0.0),
}
return vals
@api.multi
def action_sent_no_move_line_hook(self, pay_line):
"""This function is designed to be inherited"""
return
@api.multi
def _create_move_line_partner_account(self, bank_line, move, labels):
"""This method is designed to be inherited in a custom module"""
# TODO: take multicurrency into account
company_currency = self.env.user.company_id.currency_id
if bank_line.currency != company_currency:
raise UserError(_(
"Cannot generate the transfer move when "
"the currency of the payment (%s) is not the "
"same as the currency of the company (%s). This "
"is not supported for the moment.")
% (bank_line.currency.name, company_currency.name))
aml_obj = self.env['account.move.line']
# create the payment/debit counterpart move line
# on the partner account
partner_ml_vals = self._prepare_move_line_partner_account(
bank_line, move, labels)
partner_move_line = aml_obj.create(partner_ml_vals)
# register the payment/debit move line
# on the payment line and call reconciliation on it
bank_line.write({'transit_move_line_id': partner_move_line.id})
@api.multi
def _reconcile_payment_lines(self, bank_payment_lines):
for bline in bank_payment_lines:
if all([pline.move_line_id for pline in bline.payment_line_ids]):
bline.debit_reconcile()
else:
self.action_sent_no_move_line_hook(bline)
@api.one
def action_sent(self):
"""
Create the moves that pay off the move lines from
the debit order. This happens when the debit order file is
generated.
"""
am_obj = self.env['account.move']
aml_obj = self.env['account.move.line']
labels = {
'payment': _('Payment'),
'debit': _('Direct debit'),
}
if self.mode.transfer_journal_id and self.mode.transfer_account_id:
# prepare a dict "trfmoves" that can be used when
# self.mode.transfer_move_option = date or line
# key = unique identifier (date or True or line.id)
# value = [pay_line1, pay_line2, ...]
trfmoves = {}
for bline in self.bank_line_ids:
hashcode = bline.move_line_transfer_account_hashcode()
if hashcode in trfmoves:
trfmoves[hashcode].append(bline)
else:
trfmoves[hashcode] = [bline]
for hashcode, blines in trfmoves.iteritems():
mvals = self._prepare_transfer_move()
move = am_obj.create(mvals)
total_amount = 0
for bline in blines:
total_amount += bline.amount_currency
self._create_move_line_partner_account(bline, move, labels)
# create the payment/debit move line on the transfer account
trf_ml_vals = self._prepare_move_line_transfer_account(
total_amount, move, blines, labels)
aml_obj.create(trf_ml_vals)
self._reconcile_payment_lines(blines)
# consider entry_posted on account_journal
if move.journal_id.entry_posted:
move.post()
# State field is written by act_sent_wait
self.write({'date_sent': fields.Date.context_today(self)})
return True
@api.multi
def partial(self):
self.ensure_one()
view_id = self.env.ref('account.view_move_line_tree').id
reconcile_partial_ids = self.get_partial_reconcile_ids()
reconcile_partial_domain = [('reconcile_partial_id', 'in',
reconcile_partial_ids)]
return {
'name': _('Partial Reconcile Moves Line'),
'context': self.env.context,
'domain': reconcile_partial_domain,
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.move.line',
'views': [(view_id, 'tree')],
'type': 'ir.actions.act_window',
'target': 'current',
}

View File

@@ -1,94 +0,0 @@
# -*- coding: utf-8 -*-
# © 2009 EduSense BV (<http://www.edusense.nl>)
# © 2011-2013 Therp BV (<http://therp.nl>)
# © 2015 Akretion (www.akretion.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api, _
from openerp.exceptions import Warning as UserError
class BankPaymentLine(models.Model):
_inherit = 'bank.payment.line'
transit_move_line_id = fields.Many2one(
'account.move.line', string='Transfer move line', readonly=True,
help="Move line through which the payment/debit order "
"pays the invoice")
transfer_move_line_id = fields.Many2one(
'account.move.line', compute='_get_transfer_move_line',
string='Transfer move line counterpart',
help="Counterpart move line on the transfer account")
@api.multi
def move_line_transfer_account_hashcode(self):
"""
This method is inherited in the module
account_banking_sepa_direct_debit
"""
self.ensure_one()
if self.order_id.mode.transfer_move_option == 'date':
hashcode = self.date
else:
hashcode = unicode(self.id)
return hashcode
@api.multi
def _get_transfer_move_line(self):
for bank_line in self:
if bank_line.transit_move_line_id:
order_type = bank_line.order_id.payment_order_type
trf_lines = bank_line.transit_move_line_id.move_id.line_id
for move_line in trf_lines:
if order_type == 'debit' and move_line.debit > 0:
bank_line.transfer_move_line_id = move_line
elif order_type == 'payment' and move_line.credit > 0:
bank_line.transfer_move_line_id = move_line
@api.one
def debit_reconcile(self):
"""
Reconcile a debit order's payment line with the the move line
that it is based on. Called from payment_order.action_sent().
As the amount is derived directly from the counterpart move line,
we do not expect a write off. Take partial reconciliations into
account though.
:param payment_line_id: the single id of the canceled payment line
"""
transit_move_line = self.transit_move_line_id
assert not transit_move_line.reconcile_id,\
'Transit move should not be reconciled'
assert not transit_move_line.reconcile_partial_id,\
'Transit move should not be partially reconciled'
lines_to_rec = transit_move_line
for payment_line in self.payment_line_ids:
if not payment_line.move_line_id:
raise UserError(_(
"Can not reconcile: no move line for "
"payment line %s of partner '%s'.") % (
payment_line.name,
payment_line.partner_id.name))
if payment_line.move_line_id.reconcile_id:
raise UserError(_(
"Move line '%s' of partner '%s' has already "
"been reconciled") % (
payment_line.move_line_id.name,
payment_line.partner_id.name))
if (
payment_line.move_line_id.account_id !=
transit_move_line.account_id):
raise UserError(_(
"For partner '%s', the account of the account "
"move line to pay (%s) is different from the "
"account of of the transit move line (%s).") % (
payment_line.move_line_id.partner_id.name,
payment_line.move_line_id.account_id.code,
transit_move_line.account_id.code))
lines_to_rec += payment_line.move_line_id
lines_to_rec.reconcile_partial(type='auto')

View File

@@ -1,7 +0,0 @@
# -*- coding: utf-8 -*-
# © 2015 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
def set_date_sent(cr, pool):
cr.execute('UPDATE payment_order set date_sent=date_done')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_payment_order_form_inherit" model="ir.ui.view">
<field name="name">account.payment.order.form (account_banking_payment_transfer)</field>
<field name="model">payment.order</field>
<field name="inherit_id" ref="account_banking_payment_export.view_payment_order_form" />
<field name="arch" type="xml">
<xpath expr="//button[@name='%(account_payment.action_create_payment_order)d']" position="after">
<button class="oe_inline oe_stat_button"
name="partial" type="object"
attrs="{'invisible':[('partial_reconcile_count','=',0)]}"
icon="fa-check-square-o">
<field name="partial_reconcile_count" widget="statinfo"/>
</button>
</xpath>
<field name="mode" position="after">
<field name="date_sent"/>
</field>
</field>
</record>
<record id="view_payment_order_tree" model="ir.ui.view">
<field name="name">account_banking_payment_transfer.payment.order.tree</field>
<field name="model">payment.order</field>
<field name="inherit_id" ref="account_banking_payment_export.view_payment_order_tree" />
<field name="arch" type="xml">
<field name="date_done" position="before">
<field name="date_sent"/>
</field>
</field>
</record>
</data>
</openerp>

View File

@@ -1,90 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- New activity for workflow payment order: sent -->
<record id="act_sent" model="workflow.activity">
<field name="name">sent</field>
<field name="wkf_id" ref="account_payment.wkf_payment_order"/>
<field name="action">action_sent()</field>
<field name="kind">function</field>
</record>
<!-- New activity for workflow payment order: sent -->
<record id="act_sent_wait" model="workflow.activity">
<field name="name">sent_wait</field>
<field name="wkf_id" ref="account_payment.wkf_payment_order"/>
<field name="action">write({'state': 'sent'})</field>
<field name="kind">function</field>
</record>
<!-- New activity for workflow payment order: rejected -->
<record id="act_rejected" model="workflow.activity">
<field name="name">rejected</field>
<field name="wkf_id" ref="account_payment.wkf_payment_order"/>
<field name="action">action_rejected()
write({'state':'rejected'})</field>
<field name="kind">function</field>
</record>
<!-- Rewrite existing open -> done transition to include 'sent' stage -->
<record id="account_payment.trans_open_done" model="workflow.transition">
<field name="act_from" ref="account_payment.act_open"/>
<field name="act_to" ref="act_sent"/>
<field name="signal">sent</field>
</record>
<!-- the done signal continues to work but goes to sent -->
<record id="trans_open_done" model="workflow.transition">
<field name="act_from" ref="account_payment.act_open"/>
<field name="act_to" ref="act_sent"/>
<field name="signal">done</field>
</record>
<!-- From sent straight to sent_wait -->
<record id="trans_sent_sent_wait" model="workflow.transition">
<field name="act_from" ref="act_sent"/>
<field name="act_to" ref="act_sent_wait"/>
</record>
<!-- Reconciliation from the banking statement leads to done state -->
<record id="trans_sent_done" model="workflow.transition">
<field name="act_from" ref="act_sent_wait"/>
<field name="act_to" ref="account_payment.act_done"/>
<field name="condition">test_done()</field>
<field name="signal">done</field>
</record>
<record id="trans_sent_done_auto" model="workflow.transition">
<field name="act_from" ref="act_sent_wait"/>
<field name="act_to" ref="account_payment.act_done"/>
<field name="condition">test_done()</field>
<field name="trigger_model">account.move.line</field>
<field name="trigger_expr_id">get_transfer_move_line_ids()</field>
</record>
<!-- Rejected by the bank -->
<record id="trans_sent_rejected" model="workflow.transition">
<field name="act_from" ref="act_sent"/>
<field name="act_to" ref="act_rejected"/>
<field name="signal">rejected</field>
</record>
<!--
Transition to undo the payment order and reset to
sent, triggered by cancelling a bank transaction
with which the order was reconciled.
For this, we need to cancel the flow stop on the done state,
unfortunately.
-->
<record id="account_payment.act_done" model="workflow.activity">
<field name="flow_stop" eval="False"/>
</record>
<!-- Cancel the reconciled payment order -->
<record id="trans_done_sent" model="workflow.transition">
<field name="act_from" ref="account_payment.act_done"/>
<field name="act_to" ref="act_sent_wait"/>
<field name="condition">test_undo_done()</field>
<field name="signal">undo_done</field>
</record>
<record id="trans_done_sent_auto" model="workflow.transition">
<field name="act_from" ref="account_payment.act_done"/>
<field name="act_to" ref="act_sent_wait"/>
<field name="condition">test_undo_done()</field>
<field name="trigger_model">account.move.line</field>
<field name="trigger_expr_id">get_transfer_move_line_ids()</field>
</record>
</data>
</openerp>

View File

@@ -4,6 +4,7 @@ from . import account_payment_mode
from . import account_payment_order
from . import account_payment_line
from . import bank_payment_line
from . import account_move
from . import account_move_line
from . import account_invoice
from . import res_bank

View File

@@ -38,7 +38,8 @@ class AccountInvoice(models.Model):
}
if self.payment_mode_id.bank_account_link == 'fixed':
vals['journal_id'] = self.payment_mode_id.fixed_journal_id.id
# TODO : else: no filter on allowed bank accounts, because onchange not played ??
# TODO : else: no filter on allowed bank accounts,
# because onchange not played ??
return vals
@api.multi

View File

@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields
class AccountMove(models.Model):
_inherit = 'account.move'
payment_order_id = fields.Many2one(
'account.payment.order', string='Payment Order', copy=False,
readonly=True)

View File

@@ -4,41 +4,17 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
from openerp.tools import float_is_zero
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
# TODO Should we keep this field ?
# journal_entry_ref = fields.Char(compute='_get_journal_entry_ref',
# string='Journal Entry Ref')
partner_bank_id = fields.Many2one(
'res.partner.bank', string='Partner Bank Account',
help='Bank account on which we should pay the supplier')
# @api.one
# def _get_journal_entry_ref(self):
# if self.move_id.state == 'draft':
# if self.invoice.id:
# self.journal_entry_ref = self.invoice.number
# else:
# self.journal_entry_ref = '*' + str(self.move_id.id)
# else:
# self.journal_entry_ref = self.move_id.name
@api.multi
def get_balance(self):
"""
Return the balance of any set of move lines.
Not to be confused with the 'balance' field on this model, which
returns the account balance that the move line applies to.
"""
total = 0.0
for line in self:
total += (line.debit or 0.0) - (line.credit or 0.0)
return total
bank_payment_line_id = fields.Many2one(
'bank.payment.line', string='Bank Payment Line',
readonly=True)
@api.multi
def _prepare_payment_line_vals(self, payment_order):
@@ -67,8 +43,8 @@ class AccountMoveLine(models.Model):
else:
currency_id = self.company_id.currency_id.id
amount_currency = self.amount_residual
# TODO : check that self.amount_residual_currency is 0 in this case
precision = self.env['decimal.precision'].precision_get('Account')
# TODO : check that self.amount_residual_currency is 0
# in this case
if payment_order.payment_type == 'outbound':
amount_currency *= -1
vals = {

View File

@@ -80,6 +80,9 @@ class AccountPaymentOrder(models.Model):
bank_line_count = fields.Integer(
compute='_bank_line_count', string='Number of Bank Lines',
readonly=True)
move_ids = fields.One2many(
'account.move', 'payment_order_id', string='Transfer Journal Entries',
readonly=True)
@api.multi
@api.constrains('payment_type', 'payment_mode_id')
@@ -271,135 +274,108 @@ class AccountPaymentOrder(models.Model):
# Generation of transfer move
@api.multi
def _prepare_transfer_move(self):
if self.payment_type == 'outbound':
ref = _('Payment order %s') % self.name
else:
ref = _('Debit order %s') % self.name
vals = {
'journal_id': self.mode.transfer_journal_id.id,
'ref': '%s %s' % (
self.payment_order_type[:3].upper(), self.reference)
'journal_id': self.payment_mode_id.transfer_journal_id.id,
'ref': ref,
'payment_order_id': self.id,
'line_ids': [],
}
return vals
@api.multi
def _prepare_move_line_transfer_account(
self, amount, move, bank_payment_lines, labels):
if len(bank_payment_lines) == 1:
partner_id = bank_payment_lines[0].partner_id.id
name = _('%s bank line %s') % (labels[self.payment_order_type],
bank_payment_lines[0].name)
self, amount, bank_payment_lines):
if self.payment_type == 'outbound':
name = _('Payment order %s') % self.name
else:
partner_id = False
name = '%s %s' % (
labels[self.payment_order_type], self.reference)
name = _('Debit order %s') % self.name
date_maturity = bank_payment_lines[0].date
vals = {
'name': name,
'move_id': move.id,
'partner_id': partner_id,
'account_id': self.mode.transfer_account_id.id,
'credit': (self.payment_order_type == 'payment' and
'partner_id': False,
'account_id': self.payment_mode_id.transfer_account_id.id,
'credit': (self.payment_type == 'outbound' and
amount or 0.0),
'debit': (self.payment_order_type == 'debit' and
'debit': (self.payment_type == 'inbound' and
amount or 0.0),
'date_maturity': date_maturity,
}
return vals
@api.multi
def _prepare_move_line_partner_account(self, bank_line, move, labels):
def _prepare_move_line_partner_account(self, bank_line):
# TODO : ALEXIS check don't group if move_line_id.account_id
# is not the same
if bank_line.payment_line_ids[0].move_line_id:
account_id =\
bank_line.payment_line_ids[0].move_line_id.account_id.id
else:
if self.payment_order_type == 'debit':
if self.payment_type == 'inbound':
account_id =\
bank_line.partner_id.property_account_receivable.id
bank_line.partner_id.property_account_receivable_id.id
else:
account_id = bank_line.partner_id.property_account_payable.id
account_id =\
bank_line.partner_id.property_account_payable_id.id
if self.payment_type == 'outbound':
name = _('Payment bank line %s') % bank_line.name
else:
name = _('Debit bank line %s') % bank_line.name
vals = {
'name': _('%s line %s') % (
labels[self.payment_order_type], bank_line.name),
'move_id': move.id,
'name': name,
'bank_payment_line_id': bank_line.id,
'partner_id': bank_line.partner_id.id,
'account_id': account_id,
'credit': (self.payment_order_type == 'debit' and
'credit': (self.payment_type == 'inbound' and
bank_line.amount_currency or 0.0),
'debit': (self.payment_order_type == 'payment' and
'debit': (self.payment_type == 'outbound' and
bank_line.amount_currency or 0.0),
}
return vals
@api.multi
def action_sent_no_move_line_hook(self, pay_line):
"""This function is designed to be inherited"""
return
@api.multi
def _create_move_line_partner_account(self, bank_line, move, labels):
"""This method is designed to be inherited in a custom module"""
# TODO: take multicurrency into account
company_currency = self.env.user.company_id.currency_id
if bank_line.currency != company_currency:
raise UserError(_(
"Cannot generate the transfer move when "
"the currency of the payment (%s) is not the "
"same as the currency of the company (%s). This "
"is not supported for the moment.")
% (bank_line.currency.name, company_currency.name))
aml_obj = self.env['account.move.line']
# create the payment/debit counterpart move line
# on the partner account
partner_ml_vals = self._prepare_move_line_partner_account(
bank_line, move, labels)
partner_move_line = aml_obj.create(partner_ml_vals)
# register the payment/debit move line
# on the payment line and call reconciliation on it
bank_line.write({'transit_move_line_id': partner_move_line.id})
@api.multi
def _reconcile_payment_lines(self, bank_payment_lines):
for bline in bank_payment_lines:
if all([pline.move_line_id for pline in bline.payment_line_ids]):
bline.debit_reconcile()
else:
self.action_sent_no_move_line_hook(bline)
@api.multi
def generate_transfer_move(self):
"""
Create the moves that pay off the move lines from
the debit order.
the payment/debit order.
"""
self.ensure_one()
am_obj = self.env['account.move']
aml_obj = self.env['account.move.line']
labels = {
'outbound': _('Payment'),
'inbound': _('Direct debit'),
}
# prepare a dict "trfmoves" that can be used when
# self.mode.transfer_move_option = date or line
# self.payment_mode_id.transfer_move_option = date or line
# key = unique identifier (date or True or line.id)
# value = [pay_line1, pay_line2, ...]
# value = bank_pay_lines (recordset that can have several entries)
trfmoves = {}
for bline in self.bank_line_ids:
hashcode = bline.move_line_transfer_account_hashcode()
if hashcode in trfmoves:
trfmoves[hashcode].append(bline)
trfmoves[hashcode] += bline
else:
trfmoves[hashcode] = [bline]
trfmoves[hashcode] = bline
company_currency = self.env.user.company_id.currency_id
for hashcode, blines in trfmoves.iteritems():
mvals = self._prepare_transfer_move()
move = am_obj.create(mvals)
total_amount = 0
for bline in blines:
total_amount += bline.amount_currency
self._create_move_line_partner_account(bline, move, labels)
# create the payment/debit move line on the transfer account
if bline.currency_id != company_currency:
raise UserError(_(
"Cannot generate the transfer move when "
"the currency of the payment (%s) is not the "
"same as the currency of the company (%s). This "
"is not supported for the moment.")
% (bline.currency_id.name, company_currency.name))
partner_ml_vals = self._prepare_move_line_partner_account(
bline)
mvals['line_ids'].append((0, 0, partner_ml_vals))
trf_ml_vals = self._prepare_move_line_transfer_account(
total_amount, move, blines, labels)
aml_obj.create(trf_ml_vals)
self._reconcile_payment_lines(blines)
total_amount, blines)
mvals['line_ids'].append((0, 0, trf_ml_vals))
move = am_obj.create(mvals)
blines.reconcile_payment_lines()
move.post()

View File

@@ -2,7 +2,8 @@
# © 2015 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
from openerp import models, fields, api, _
from openerp.exceptions import UserError
class BankPaymentLine(models.Model):
@@ -45,32 +46,10 @@ class BankPaymentLine(models.Model):
related='payment_line_ids.communication_type', readonly=True)
communication = fields.Char(
string='Communication', required=True,
readonly=True) #, states={'draft': [('readonly', False)]})
readonly=True)
company_id = fields.Many2one(
related='order_id.payment_mode_id.company_id', store=True,
readonly=True)
# TODO : not shown in view ?
# why on bank payment line and not on payment line ?
transit_move_line_id = fields.Many2one(
'account.move.line', string='Transfer Move Line', readonly=True,
help="Move line through which the payment/debit order "
"pays the invoice")
transfer_move_line_id = fields.Many2one(
'account.move.line', compute='_get_transfer_move_line',
string='Transfer move line counterpart',
help="Counterpart move line on the transfer account")
@api.multi
def _get_transfer_move_line(self):
for bank_line in self:
if bank_line.transit_move_line_id:
payment_type = bank_line.payment_type
trf_lines = bank_line.transit_move_line_id.move_id.line_id
for move_line in trf_lines:
if payment_type == 'inbound' and move_line.debit > 0:
bank_line.transfer_move_line_id = move_line
elif payment_type == 'outbound' and move_line.credit > 0:
bank_line.transfer_move_line_id = move_line
@api.model
def same_fields_payment_line_and_bank_payment_line(self):
@@ -113,3 +92,54 @@ class BankPaymentLine(models.Model):
hashcode = unicode(self.id)
return hashcode
@api.multi
def reconcile_payment_lines(self):
for bline in self:
if all([pline.move_line_id for pline in bline.payment_line_ids]):
bline.reconcile()
else:
bline.no_reconcile_hook()
@api.multi
def no_reconcile_hook(self):
"""This method is designed to be inherited if needed"""
return
@api.multi
def reconcile(self):
self.ensure_one()
amlo = self.env['account.move.line']
transit_mlines = amlo.search([('bank_payment_line_id', '=', self.id)])
assert len(transit_mlines) == 1, 'We should have only 1 move'
transit_mline = transit_mlines[0]
assert not transit_mline.reconciled,\
'Transit move should not be reconciled'
lines_to_rec = transit_mline
for payment_line in self.payment_line_ids:
if not payment_line.move_line_id:
raise UserError(_(
"Can not reconcile: no move line for "
"payment line %s of partner '%s'.") % (
payment_line.name,
payment_line.partner_id.name))
if payment_line.move_line_id.reconciled:
raise UserError(_(
"Move line '%s' of partner '%s' has already "
"been reconciled") % (
payment_line.move_line_id.name,
payment_line.partner_id.name))
if (
payment_line.move_line_id.account_id !=
transit_mline.account_id):
raise UserError(_(
"For partner '%s', the account of the account "
"move line to pay (%s) is different from the "
"account of of the transit move line (%s).") % (
payment_line.move_line_id.partner_id.name,
payment_line.move_line_id.account_id.code,
transit_mline.account_id.code))
lines_to_rec += payment_line.move_line_id
lines_to_rec.reconcile()

View File

@@ -18,6 +18,7 @@
<group name="payments" position="inside">
<field name="partner_bank_id"
domain="[('partner_id', '=', partner_id)]"/>
<field name="bank_payment_line_id"/>
</group>
</field>
</record>

View File

@@ -23,7 +23,7 @@
<field name="transfer_move"/>
<field name="transfer_account_id"
attrs="{'invisible': [('transfer_move', '=', False)], 'required': [('transfer_move', '=', True)]}"
context="{'default_internal_type': 'other', 'default_reconcile': True, 'default_company_id': company_id}"/>
context="{'default_reconcile': True, 'default_company_id': company_id}"/> <!-- We can't put a default vue to user_type_id... -->
<field name="transfer_journal_id"
attrs="{'invisible': [('transfer_move', '=', False)], 'required': [('transfer_move', '=', True)]}"/>
<field name="transfer_move_option"

View File

@@ -59,6 +59,9 @@
<field name="bank_line_ids"
context="{'default_payment_type': payment_type}"/>
</page>
<page name="moves" string="Transfer Journal Entries">
<field name="move_ids"/>
</page>
</notebook>
</sheet>
</form>

View File

@@ -91,11 +91,11 @@ class AccountPaymentLineCreate(models.TransientModel):
# will not be refunded with a payment.
domain += [
('credit', '>', 0),
#'|',
# '|',
('account_id.internal_type', '=', 'payable'),
#'&',
#('account_id.internal_type', '=', 'receivable'),
#('reconcile_partial_id', '=', False), # TODO uncomment
# '&',
# ('account_id.internal_type', '=', 'receivable'),
# ('reconcile_partial_id', '=', False), # TODO uncomment
]
elif self.order_id.payment_type == 'inbound':
domain += [