From e00c726c7bc4cdc2a3abf38829482125a89f2914 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Sat, 30 Apr 2016 01:46:34 +0200 Subject: [PATCH] Start to port bank-payment to v9 (with a lot of improvements) during the Sorrento Code sprint 2016 Improvements include: - full re-organisation of modules and big re-organisation of the code - simplification of the code related to the fact that support for direct debit is now in t he base module, not added by an optional module account_direct_debit (module was removed) - new design of the wizard to select move lines to pay - support for non-SEPA file transfer- - support for German direct debit SEPA files (fixes bug #129) - remove workflow of payment.order This port to v9 is not finished... there is still a lot of work: - finish the code of account_payment_order/wizard/account_payment_line_create.py - port account_banking_payment_transfer and integrate it inside account_payment_order - fix bugs - clean-up code, remove dead code - test in several complex scenarios --- account_payment_order/README.rst | 94 ++++ account_payment_order/__init__.py | 3 + account_payment_order/__openerp__.py | 40 ++ .../data/payment_mode_type.xml | 15 + account_payment_order/data/payment_seq.xml | 38 ++ account_payment_order/demo/payment_demo.xml | 34 ++ account_payment_order/i18n/es.po | 488 +++++++++++++++++ account_payment_order/i18n/fr.po | 488 +++++++++++++++++ account_payment_order/i18n/nl.po | 488 +++++++++++++++++ account_payment_order/i18n/pt_BR.po | 489 ++++++++++++++++++ account_payment_order/i18n/sl.po | 489 ++++++++++++++++++ .../migrations/8.0.0.1.166/pre-migrate.py | 37 ++ account_payment_order/models/__init__.py | 9 + .../models/account_invoice.py | 58 +++ .../models/account_move_line.py | 88 ++++ .../models/account_payment_line.py | 124 +++++ .../models/account_payment_mode.py | 57 ++ .../models/account_payment_order.py | 261 ++++++++++ .../models/bank_payment_line.py | 78 +++ account_payment_order/models/res_bank.py | 22 + .../security/ir.model.access.csv | 4 + .../security/payment_security.xml | 39 ++ .../static/description/icon.png | Bin 0 -> 9455 bytes .../views/account_move_line.xml | 27 + .../views/account_payment_line.xml | 66 +++ .../views/account_payment_mode.xml | 51 ++ .../views/account_payment_order.xml | 127 +++++ .../views/bank_payment_line.xml | 84 +++ account_payment_order/views/ir_attachment.xml | 32 ++ .../views/payment_order_create_view.xml | 23 + account_payment_order/wizard/__init__.py | 3 + .../wizard/account_payment_line_create.py | 232 +++++++++ .../account_payment_line_create_view.xml | 62 +++ 33 files changed, 4150 insertions(+) create mode 100644 account_payment_order/README.rst create mode 100644 account_payment_order/__init__.py create mode 100644 account_payment_order/__openerp__.py create mode 100644 account_payment_order/data/payment_mode_type.xml create mode 100644 account_payment_order/data/payment_seq.xml create mode 100644 account_payment_order/demo/payment_demo.xml create mode 100644 account_payment_order/i18n/es.po create mode 100644 account_payment_order/i18n/fr.po create mode 100644 account_payment_order/i18n/nl.po create mode 100644 account_payment_order/i18n/pt_BR.po create mode 100644 account_payment_order/i18n/sl.po create mode 100644 account_payment_order/migrations/8.0.0.1.166/pre-migrate.py create mode 100644 account_payment_order/models/__init__.py create mode 100644 account_payment_order/models/account_invoice.py create mode 100644 account_payment_order/models/account_move_line.py create mode 100644 account_payment_order/models/account_payment_line.py create mode 100644 account_payment_order/models/account_payment_mode.py create mode 100644 account_payment_order/models/account_payment_order.py create mode 100644 account_payment_order/models/bank_payment_line.py create mode 100644 account_payment_order/models/res_bank.py create mode 100644 account_payment_order/security/ir.model.access.csv create mode 100644 account_payment_order/security/payment_security.xml create mode 100644 account_payment_order/static/description/icon.png create mode 100644 account_payment_order/views/account_move_line.xml create mode 100644 account_payment_order/views/account_payment_line.xml create mode 100644 account_payment_order/views/account_payment_mode.xml create mode 100644 account_payment_order/views/account_payment_order.xml create mode 100644 account_payment_order/views/bank_payment_line.xml create mode 100644 account_payment_order/views/ir_attachment.xml create mode 100644 account_payment_order/views/payment_order_create_view.xml create mode 100644 account_payment_order/wizard/__init__.py create mode 100644 account_payment_order/wizard/account_payment_line_create.py create mode 100644 account_payment_order/wizard/account_payment_line_create_view.xml diff --git a/account_payment_order/README.rst b/account_payment_order/README.rst new file mode 100644 index 000000000..90551b32e --- /dev/null +++ b/account_payment_order/README.rst @@ -0,0 +1,94 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +Account Banking - Payments Export Infrastructure +================================================ + +This module provide an infrastructure to export payment orders. +It includes some bug fixes and obvious enhancements to payment orders that will hopefully land in offical addons one +day. +This technical module provides the base infrastructure to export payment orders +for electronic banking. It provides the following technical features: + +* a new payment.mode.type model +* payment.mode now has a mandatory type +* a better implementation of payment_mode.suitable_bank_types() based on + payment.mode.type +* the "make payment" button launches a wizard depending on the + payment.mode.type +* a manual payment mode type is provided as an example, with a default "do + nothing" wizard + +To enable the use of payment order to collect money for customers, +it adds a payment_order_type (payment|debit) as a basis of direct debit support +(this field becomes visible when account_direct_debit is installed). + +Installation +============ + +This module depends on: + +* account_payment +* base_iban + +This modules is part of the OCA/bank-payment suite. + +Configuration +============= + +No configuration required. + +Usage +===== + +This module provides a menu to configure payment order types : Accounting > Configuration > Miscellaneous > Payment Export Types + +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 `_. +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 `_. + + +Credits +======= + +Contributors +------------ + +* Stéphane Bidoul +* Alexis de Lattre +* Pedro M. Baeza +* Adrien Peiffer +* Stefan Rijnhart +* Laurent Mignon +* Alexandre Fayolle +* Danimar Ribeiro +* Erwin van der Ploeg +* Raphaël Valyi +* Sandy Carter +* Angel Moya + +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. diff --git a/account_payment_order/__init__.py b/account_payment_order/__init__.py new file mode 100644 index 000000000..408a6001b --- /dev/null +++ b/account_payment_order/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +from . import models +from . import wizard diff --git a/account_payment_order/__openerp__.py b/account_payment_order/__openerp__.py new file mode 100644 index 000000000..55ed6afba --- /dev/null +++ b/account_payment_order/__openerp__.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# © 2013-2014 ACSONE SA (). +# © 2014-2016 Serv. Tecnol. Avanzados - Pedro M. Baeza +# © 2016 Akretion (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + 'name': 'Account Payment Order', + 'version': '9.0.1.0.0', + 'license': 'AGPL-3', + 'author': "ACSONE SA/NV, " + "Therp BV, " + "Serv. Tecnol. Avanzados - Pedro M. Baeza, " + "Akretion, " + "Odoo Community Association (OCA)", + 'website': 'https://github.com/OCA/bank-payment', + 'category': 'Banking addons', + 'depends': [ + 'account_payment_partner', + 'base_iban', # for manual_bank_tranfer + 'document', # to see the attachments on payment.order + ], + 'data': [ + 'security/payment_security.xml', + 'security/ir.model.access.csv', + 'wizard/account_payment_line_create_view.xml', + 'views/account_payment_mode.xml', + 'views/account_payment_order.xml', + 'views/account_payment_line.xml', + 'views/bank_payment_line.xml', + 'views/account_move_line.xml', + 'views/ir_attachment.xml', + #'views/res_partner_bank.xml', + 'data/payment_seq.xml', + ], + 'demo': ['demo/payment_demo.xml'], + 'installable': True, +} diff --git a/account_payment_order/data/payment_mode_type.xml b/account_payment_order/data/payment_mode_type.xml new file mode 100644 index 000000000..876778e62 --- /dev/null +++ b/account_payment_order/data/payment_mode_type.xml @@ -0,0 +1,15 @@ + + + + + + Manual Bank Transfer + BANKMAN + + + payment + + + diff --git a/account_payment_order/data/payment_seq.xml b/account_payment_order/data/payment_seq.xml new file mode 100644 index 000000000..9f89b95af --- /dev/null +++ b/account_payment_order/data/payment_seq.xml @@ -0,0 +1,38 @@ + + + + + + + + + Bank Payment Line + bank.payment.line + L + 5 + + + + + Payment Line + account.payment.line + P + 5 + + + + + Payment Order + account.payment.order + PAY + 4 + + + + + + diff --git a/account_payment_order/demo/payment_demo.xml b/account_payment_order/demo/payment_demo.xml new file mode 100644 index 000000000..1644a907a --- /dev/null +++ b/account_payment_order/demo/payment_demo.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/account_payment_order/i18n/es.po b/account_payment_order/i18n/es.po new file mode 100644 index 000000000..1e8e5d91a --- /dev/null +++ b/account_payment_order/i18n/es.po @@ -0,0 +1,488 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_payment_export +# +# 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 \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_export +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:17 +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:31 +#, python-format +msgid "" +"A valid BIC contains 8 or 11 caracters. The BIC '%s' contains %d caracters, " +"so it is not valid." +msgstr "Un BIC válido contiene 8 u 11 caracteres. El BIC '%s' contiene %d caracteres, por lo que no es válido." + +#. module: account_banking_payment_export +#: field:payment.mode,active:0 field:payment.mode.type,active:0 +msgid "Active" +msgstr "Activo" + +#. module: account_banking_payment_export +#: field:bank.payment.line,amount_currency:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Amount" +msgstr "Importe" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_bank +msgid "Bank" +msgstr "Banco" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_partner_bank +msgid "Bank Accounts" +msgstr "Cuentas de banco" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +#: field:payment.line,bank_line_id:0 +msgid "Bank Payment Line" +msgstr "Línea de pago bancario" + +#. module: account_banking_payment_export +#: field:bank.payment.line,name:0 +msgid "Bank Payment Line Ref" +msgstr "Ref. de la línea de pago bancario" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +#: model:ir.actions.act_window,name:account_banking_payment_export.bank_payment_line_action +#: model:ir.model,name:account_banking_payment_export.model_bank_payment_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +#: field:payment.order,bank_line_ids:0 +msgid "Bank Payment Lines" +msgstr "Líneas de pago bancario" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Cancel" +msgstr "Cancelar" + +#. module: account_banking_payment_export +#: field:payment.mode.type,code:0 +msgid "Code" +msgstr "Código" + +#. module: account_banking_payment_export +#: field:bank.payment.line,communication:0 +msgid "Communication" +msgstr "Comunicación" + +#. module: account_banking_payment_export +#: field:bank.payment.line,company_id:0 +msgid "Company" +msgstr "Compañía" + +#. module: account_banking_payment_export +#: field:bank.payment.line,create_uid:0 field:payment.manual,create_uid:0 +#: field:payment.mode.type,create_uid:0 +msgid "Created by" +msgstr "Creado por" + +#. module: account_banking_payment_export +#: field:bank.payment.line,create_date:0 field:payment.manual,create_date:0 +#: field:payment.mode.type,create_date:0 +msgid "Created on" +msgstr "Creado en" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +msgid "Debit" +msgstr "Cobro" + +#. module: account_banking_payment_export +#: selection:payment.order,payment_order_type:0 +msgid "Direct debit" +msgstr "Adeudo directo (cobro)" + +#. module: account_banking_payment_export +#: selection:payment.mode,default_date_type:0 +msgid "Due" +msgstr "Vencimiento" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +msgid "Due Date" +msgstr "Fecha de vencimiento" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Entry Information" +msgstr "Información del asiento" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:152 +#, python-format +msgid "Entry Lines" +msgstr "Líneas de pago" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:74 +#, python-format +msgid "Error" +msgstr "Error" + +#. module: account_banking_payment_export +#: field:payment.mode,type:0 +msgid "Export type" +msgstr "Tipo de exportación" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "General Information" +msgstr "Información General" + +#. module: account_banking_payment_export +#: field:payment.mode,group_lines:0 +msgid "Group lines in payment orders" +msgstr "Agrupar líneas en las órdenes de pago" + +#. module: account_banking_payment_export +#: field:bank.payment.line,id:0 field:payment.manual,id:0 +#: field:payment.mode.type,id:0 +msgid "ID" +msgstr "ID" + +#. module: account_banking_payment_export +#: help:payment.mode,group_lines:0 +msgid "" +"If this mark is checked, the payment order lines will be grouped when validating the payment order before exporting the bank file. The grouping will be done only if the following fields matches:\n" +"* Partner\n" +"* Currency\n" +"* Destination Bank Account\n" +"* Communication Type (structured, free)\n" +"* Payment Date\n" +"(other modules can set additional fields to restrict the grouping.)" +msgstr "Si esta casilla está marcada, las líneas de las órdenes de pago serán agrupadas cuando se valide la orden de pago antes de la exportación al archivo bancario. La agrupación se realizará sólo si los siguientes campos casan:\n* Empresa\n* Moneda\n* Cuenta bancaria destino\n* Tipo de comunicacion (estructurada, libre)\n* Fecha de pago\n(otros módulo pueden establecer campos adicionales para restringir la agrupación.)" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Information" +msgstr "Información" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Journal Entry" +msgstr "Asiento contable" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +#: model:ir.model,name:account_banking_payment_export.model_account_move_line +msgid "Journal Items" +msgstr "Apuntes contables" + +#. module: account_banking_payment_export +#: field:payment.mode,default_journal_ids:0 +#: field:payment.order.create,journal_ids:0 +msgid "Journals Filter" +msgstr "Filtro de diarios" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "Keep empty for using all journals" +msgstr "Dejar vacío para usar todos los diarios" + +#. module: account_banking_payment_export +#: field:bank.payment.line,write_uid:0 field:payment.manual,write_uid:0 +#: field:payment.mode.type,write_uid:0 +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: account_banking_payment_export +#: field:bank.payment.line,write_date:0 field:payment.manual,write_date:0 +#: field:payment.mode.type,write_date:0 +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +msgid "Line grouping" +msgstr "Agrupación de líneas" + +#. module: account_banking_payment_export +#: field:payment.mode,default_invoice:0 field:payment.order.create,invoice:0 +msgid "Linked to an Invoice or Refund" +msgstr "Vinculado a una factura o factura rectificativa" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Manual payment" +msgstr "Pago manual" + +#. module: account_banking_payment_export +#: selection:payment.mode,default_date_type:0 +msgid "Move" +msgstr "Asiento" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +#: field:payment.order.create,move_date:0 +msgid "Move Date" +msgstr "Fecha del asiento" + +#. module: account_banking_payment_export +#: field:payment.mode.type,name:0 +msgid "Name" +msgstr "Nombre" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +#: field:payment.mode,note:0 +msgid "Note" +msgstr "Descripción" + +#. module: account_banking_payment_export +#: field:bank.payment.line,order_id:0 +msgid "Order" +msgstr "Orden" + +#. module: account_banking_payment_export +#: field:payment.mode.type,payment_order_type:0 +msgid "Order type" +msgstr "Tipo de orden" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Owner Account" +msgstr "Cuenta propietario" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Partner Bank Account" +msgstr "Cuenta bancaria" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +#: selection:payment.order,payment_order_type:0 +msgid "Payment" +msgstr "Pago" + +#. module: account_banking_payment_export +#: model:ir.actions.act_window,name:account_banking_payment_export.action_payment_mode_type +#: model:ir.ui.menu,name:account_banking_payment_export.menu_payment_mode_type +msgid "Payment Export Types" +msgstr "Tipos de exportación de pagos" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Line" +msgstr "Línea de pago" + +#. module: account_banking_payment_export +#: field:bank.payment.line,payment_line_ids:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Lines" +msgstr "Líneas de pago" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode +msgid "Payment Mode" +msgstr "Modo de pago" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type +msgid "Payment Mode Type" +msgstr "Tipo del modo de pago" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_order +msgid "Payment Order" +msgstr "Orden de pago" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:59 +#, python-format +msgid "Payment Order Export" +msgstr "Exportación de la orden de pago" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:245 +#, python-format +msgid "Payment Orders" +msgstr "Órdenes de pago" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: help:payment.mode.type,name:0 +msgid "Payment Type" +msgstr "Tipo de pago" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_tree +msgid "Payment Types" +msgstr "Tipos de pago" + +#. module: account_banking_payment_export +#: field:payment.order,payment_order_type:0 +msgid "Payment order type" +msgstr "Tipo de la orden de pago" + +#. module: account_banking_payment_export +#: field:payment.mode.type,ir_model_id:0 +msgid "Payment wizard" +msgstr "Asistente de pago" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "" +"Please execute payment order manually, and click OK when succesfully sent." +msgstr "Ejecute la orden de pago manualmente (fuera del sistema), y pulse en Aceptar cuando la haya tramitado correctamente." + +#. module: account_banking_payment_export +#: field:payment.mode,default_populate_results:0 +#: field:payment.order.create,populate_results:0 +msgid "Populate Results Directly" +msgstr "Incluir los resultados directamente" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +msgid "Related Payment Lines" +msgstr "Líneas de pago relacionadas" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +msgid "Select Move Lines to Pay - Default Values" +msgstr "Selección de los apuntes - Valores por defecto" + +#. module: account_banking_payment_export +#: help:payment.mode,type:0 +msgid "Select the Export Payment Type for the Payment Mode." +msgstr "Seleccione el tipo de exportación de pago para el modo de pago." + +#. module: account_banking_payment_export +#: help:payment.mode.type,ir_model_id:0 +msgid "" +"Select the Payment Wizard for payments of this type. Leave empty for manual " +"processing" +msgstr "Seleccione el asistente de pago para los pagos de este tipo. Déjelo vacío para un procesado manual." + +#. module: account_banking_payment_export +#: field:payment.mode,purchase_ok:0 +msgid "Selectable on purchase operations" +msgstr "Seleccionable en operaciones de compra" + +#. module: account_banking_payment_export +#: field:payment.mode,sale_ok:0 +msgid "Selectable on sale operations" +msgstr "Seleccionable en operaciones de venta" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_manual +msgid "Send payment order(s) manually" +msgstr "Enviar la(s) orden(es) de pago manualmente" + +#. module: account_banking_payment_export +#: help:payment.mode.type,code:0 +msgid "Specify the Code for Payment Type" +msgstr "Especifica el código para el tipo de pago" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_invoice.py:16 +#, python-format +msgid "Structured Reference" +msgstr "Referencia esctructurada" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: field:payment.mode.type,suitable_bank_types:0 +msgid "Suitable bank types" +msgstr "Tipos de cuentas bancarias adecuadas" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:152 +#, python-format +msgid "The amount for Partner '%s' is negative or null (%.2f) !" +msgstr "El importe para el empresa '%s' es negativo o nulo (%.2f) !" + +#. module: account_banking_payment_export +#: help:payment.mode.type,payment_order_type:0 +msgid "" +"This field determines if this type applies to customers (Debit) or suppliers" +" (Payment)" +msgstr "Este campo determina si este tipo aplica a clientes (Cobro) o a proveedores (Pago)" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +msgid "Total Amount" +msgstr "Importe total" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Total Credit" +msgstr "Total haber" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Total Debit" +msgstr "Total debe" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Total in Company Currency" +msgstr "Total en moneda de la compañía" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Transaction Information" +msgstr "Información de transacción" + +#. module: account_banking_payment_export +#: field:payment.mode,default_date_type:0 +#: field:payment.order.create,date_type:0 +msgid "Type of Date Filter" +msgstr "Filtro de tipo de fecha" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:75 +#, python-format +msgid "You can only combine payment orders of the same type" +msgstr "Sólo puede combinar órdenes de pago del mismo tipo" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "launch_wizard" +msgstr "Asistente" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "" +"{\n" +" 'invisible': [('state', '!=', 'draft')]}" +msgstr "{\n 'invisible': [('state', '!=', 'draft')]}" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order_lines +msgid "" +"{'display_credit': context.get('display_credit', False),'display_debit': " +"context.get('display_debit', False),'journal_type': 'sale', 'tree_view_ref' " +": " +"'account_banking_payment_export.payment_order_populate_view_move_line_tree'}" +msgstr "{'display_credit': context.get('display_credit', False),'display_debit': context.get('display_debit', False),'journal_type': 'sale', 'tree_view_ref' : 'account_banking_payment_export.payment_order_populate_view_move_line_tree'}" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "" +"{'required': [('date_type', '=', 'due')], 'invisible': [('date_type', '!=', " +"'due')]}" +msgstr "{'required': [('date_type', '=', 'due')], 'invisible': [('date_type', '!=', 'due')]}" diff --git a/account_payment_order/i18n/fr.po b/account_payment_order/i18n/fr.po new file mode 100644 index 000000000..a7efd5fd1 --- /dev/null +++ b/account_payment_order/i18n/fr.po @@ -0,0 +1,488 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_payment_export +# +# 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_export +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:17 +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:31 +#, python-format +msgid "" +"A valid BIC contains 8 or 11 caracters. The BIC '%s' contains %d caracters, " +"so it is not valid." +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,active:0 field:payment.mode.type,active:0 +msgid "Active" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,amount_currency:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Amount" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_bank +msgid "Bank" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_partner_bank +msgid "Bank Accounts" +msgstr "" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +#: field:payment.line,bank_line_id:0 +msgid "Bank Payment Line" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,name:0 +msgid "Bank Payment Line Ref" +msgstr "" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +#: model:ir.actions.act_window,name:account_banking_payment_export.bank_payment_line_action +#: model:ir.model,name:account_banking_payment_export.model_bank_payment_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +#: field:payment.order,bank_line_ids:0 +msgid "Bank Payment Lines" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Cancel" +msgstr "Annuler" + +#. module: account_banking_payment_export +#: field:payment.mode.type,code:0 +msgid "Code" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,communication:0 +msgid "Communication" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,company_id:0 +msgid "Company" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,create_uid:0 field:payment.manual,create_uid:0 +#: field:payment.mode.type,create_uid:0 +msgid "Created by" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,create_date:0 field:payment.manual,create_date:0 +#: field:payment.mode.type,create_date:0 +msgid "Created on" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +msgid "Debit" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.order,payment_order_type:0 +msgid "Direct debit" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.mode,default_date_type:0 +msgid "Due" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +msgid "Due Date" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Entry Information" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:152 +#, python-format +msgid "Entry Lines" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:74 +#, python-format +msgid "Error" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,type:0 +msgid "Export type" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "General Information" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,group_lines:0 +msgid "Group lines in payment orders" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,id:0 field:payment.manual,id:0 +#: field:payment.mode.type,id:0 +msgid "ID" +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode,group_lines:0 +msgid "" +"If this mark is checked, the payment order lines will be grouped when validating the payment order before exporting the bank file. The grouping will be done only if the following fields matches:\n" +"* Partner\n" +"* Currency\n" +"* Destination Bank Account\n" +"* Communication Type (structured, free)\n" +"* Payment Date\n" +"(other modules can set additional fields to restrict the grouping.)" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Information" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Journal Entry" +msgstr "" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +#: model:ir.model,name:account_banking_payment_export.model_account_move_line +msgid "Journal Items" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,default_journal_ids:0 +#: field:payment.order.create,journal_ids:0 +msgid "Journals Filter" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "Keep empty for using all journals" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,write_uid:0 field:payment.manual,write_uid:0 +#: field:payment.mode.type,write_uid:0 +msgid "Last Updated by" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,write_date:0 field:payment.manual,write_date:0 +#: field:payment.mode.type,write_date:0 +msgid "Last Updated on" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +msgid "Line grouping" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,default_invoice:0 field:payment.order.create,invoice:0 +msgid "Linked to an Invoice or Refund" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Manual payment" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.mode,default_date_type:0 +msgid "Move" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +#: field:payment.order.create,move_date:0 +msgid "Move Date" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode.type,name:0 +msgid "Name" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +#: field:payment.mode,note:0 +msgid "Note" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,order_id:0 +msgid "Order" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode.type,payment_order_type:0 +msgid "Order type" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Owner Account" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Partner Bank Account" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +#: selection:payment.order,payment_order_type:0 +msgid "Payment" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.actions.act_window,name:account_banking_payment_export.action_payment_mode_type +#: model:ir.ui.menu,name:account_banking_payment_export.menu_payment_mode_type +msgid "Payment Export Types" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Line" +msgstr "Ligne de paiement" + +#. module: account_banking_payment_export +#: field:bank.payment.line,payment_line_ids:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Lines" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode +msgid "Payment Mode" +msgstr "Mode de paiement" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type +msgid "Payment Mode Type" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_order +msgid "Payment Order" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:59 +#, python-format +msgid "Payment Order Export" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:245 +#, python-format +msgid "Payment Orders" +msgstr "Ordres de paiement" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: help:payment.mode.type,name:0 +msgid "Payment Type" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_tree +msgid "Payment Types" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.order,payment_order_type:0 +msgid "Payment order type" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode.type,ir_model_id:0 +msgid "Payment wizard" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "" +"Please execute payment order manually, and click OK when succesfully sent." +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,default_populate_results:0 +#: field:payment.order.create,populate_results:0 +msgid "Populate Results Directly" +msgstr "" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +msgid "Related Payment Lines" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +msgid "Select Move Lines to Pay - Default Values" +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode,type:0 +msgid "Select the Export Payment Type for the Payment Mode." +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode.type,ir_model_id:0 +msgid "" +"Select the Payment Wizard for payments of this type. Leave empty for manual " +"processing" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,purchase_ok:0 +msgid "Selectable on purchase operations" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,sale_ok:0 +msgid "Selectable on sale operations" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_manual +msgid "Send payment order(s) manually" +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode.type,code:0 +msgid "Specify the Code for Payment Type" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_invoice.py:16 +#, python-format +msgid "Structured Reference" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: field:payment.mode.type,suitable_bank_types:0 +msgid "Suitable bank types" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:152 +#, python-format +msgid "The amount for Partner '%s' is negative or null (%.2f) !" +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode.type,payment_order_type:0 +msgid "" +"This field determines if this type applies to customers (Debit) or suppliers" +" (Payment)" +msgstr "" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +msgid "Total Amount" +msgstr "Montant total" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Total Credit" +msgstr "" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Total Debit" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Total in Company Currency" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Transaction Information" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,default_date_type:0 +#: field:payment.order.create,date_type:0 +msgid "Type of Date Filter" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:75 +#, python-format +msgid "You can only combine payment orders of the same type" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "launch_wizard" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "" +"{\n" +" 'invisible': [('state', '!=', 'draft')]}" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order_lines +msgid "" +"{'display_credit': context.get('display_credit', False),'display_debit': " +"context.get('display_debit', False),'journal_type': 'sale', 'tree_view_ref' " +": " +"'account_banking_payment_export.payment_order_populate_view_move_line_tree'}" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "" +"{'required': [('date_type', '=', 'due')], 'invisible': [('date_type', '!=', " +"'due')]}" +msgstr "" diff --git a/account_payment_order/i18n/nl.po b/account_payment_order/i18n/nl.po new file mode 100644 index 000000000..de3fae574 --- /dev/null +++ b/account_payment_order/i18n/nl.po @@ -0,0 +1,488 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_payment_export +# +# 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:15+0000\n" +"Last-Translator: OCA Transbot \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_export +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:17 +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:31 +#, python-format +msgid "" +"A valid BIC contains 8 or 11 caracters. The BIC '%s' contains %d caracters, " +"so it is not valid." +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,active:0 field:payment.mode.type,active:0 +msgid "Active" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,amount_currency:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Amount" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_bank +msgid "Bank" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_partner_bank +msgid "Bank Accounts" +msgstr "" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +#: field:payment.line,bank_line_id:0 +msgid "Bank Payment Line" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,name:0 +msgid "Bank Payment Line Ref" +msgstr "" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +#: model:ir.actions.act_window,name:account_banking_payment_export.bank_payment_line_action +#: model:ir.model,name:account_banking_payment_export.model_bank_payment_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +#: field:payment.order,bank_line_ids:0 +msgid "Bank Payment Lines" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Cancel" +msgstr "Annuleren" + +#. module: account_banking_payment_export +#: field:payment.mode.type,code:0 +msgid "Code" +msgstr "Code" + +#. module: account_banking_payment_export +#: field:bank.payment.line,communication:0 +msgid "Communication" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,company_id:0 +msgid "Company" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,create_uid:0 field:payment.manual,create_uid:0 +#: field:payment.mode.type,create_uid:0 +msgid "Created by" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,create_date:0 field:payment.manual,create_date:0 +#: field:payment.mode.type,create_date:0 +msgid "Created on" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +msgid "Debit" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.order,payment_order_type:0 +msgid "Direct debit" +msgstr "Incasso-opdracht" + +#. module: account_banking_payment_export +#: selection:payment.mode,default_date_type:0 +msgid "Due" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +msgid "Due Date" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Entry Information" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:152 +#, python-format +msgid "Entry Lines" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:74 +#, python-format +msgid "Error" +msgstr "Fout" + +#. module: account_banking_payment_export +#: field:payment.mode,type:0 +msgid "Export type" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "General Information" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,group_lines:0 +msgid "Group lines in payment orders" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,id:0 field:payment.manual,id:0 +#: field:payment.mode.type,id:0 +msgid "ID" +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode,group_lines:0 +msgid "" +"If this mark is checked, the payment order lines will be grouped when validating the payment order before exporting the bank file. The grouping will be done only if the following fields matches:\n" +"* Partner\n" +"* Currency\n" +"* Destination Bank Account\n" +"* Communication Type (structured, free)\n" +"* Payment Date\n" +"(other modules can set additional fields to restrict the grouping.)" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Information" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_account_invoice +msgid "Invoice" +msgstr "Factuur" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Journal Entry" +msgstr "" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +#: model:ir.model,name:account_banking_payment_export.model_account_move_line +msgid "Journal Items" +msgstr "Boekingen" + +#. module: account_banking_payment_export +#: field:payment.mode,default_journal_ids:0 +#: field:payment.order.create,journal_ids:0 +msgid "Journals Filter" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "Keep empty for using all journals" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,write_uid:0 field:payment.manual,write_uid:0 +#: field:payment.mode.type,write_uid:0 +msgid "Last Updated by" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,write_date:0 field:payment.manual,write_date:0 +#: field:payment.mode.type,write_date:0 +msgid "Last Updated on" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +msgid "Line grouping" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,default_invoice:0 field:payment.order.create,invoice:0 +msgid "Linked to an Invoice or Refund" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Manual payment" +msgstr "Handmatige betaling" + +#. module: account_banking_payment_export +#: selection:payment.mode,default_date_type:0 +msgid "Move" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +#: field:payment.order.create,move_date:0 +msgid "Move Date" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode.type,name:0 +msgid "Name" +msgstr "Naam" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +#: field:payment.mode,note:0 +msgid "Note" +msgstr "" + +#. module: account_banking_payment_export +#: field:bank.payment.line,order_id:0 +msgid "Order" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode.type,payment_order_type:0 +msgid "Order type" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Owner Account" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Partner Bank Account" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +#: selection:payment.order,payment_order_type:0 +msgid "Payment" +msgstr "Betaling" + +#. module: account_banking_payment_export +#: model:ir.actions.act_window,name:account_banking_payment_export.action_payment_mode_type +#: model:ir.ui.menu,name:account_banking_payment_export.menu_payment_mode_type +msgid "Payment Export Types" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Line" +msgstr "Betaalregel" + +#. module: account_banking_payment_export +#: field:bank.payment.line,payment_line_ids:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Lines" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode +msgid "Payment Mode" +msgstr "Betaalwijze" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type +msgid "Payment Mode Type" +msgstr "Betaalwijze soort" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_order +msgid "Payment Order" +msgstr "Betalingsopdracht" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:59 +#, python-format +msgid "Payment Order Export" +msgstr "Betaalopdracht export" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:245 +#, python-format +msgid "Payment Orders" +msgstr "Betaalopdrachten" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: help:payment.mode.type,name:0 +msgid "Payment Type" +msgstr "Betaalwijze" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_tree +msgid "Payment Types" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.order,payment_order_type:0 +msgid "Payment order type" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode.type,ir_model_id:0 +msgid "Payment wizard" +msgstr "Betaalwizard" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "" +"Please execute payment order manually, and click OK when succesfully sent." +msgstr "Voer de betaalopdracht handmatig uit en klik OK, wanneer succesvol verzonden." + +#. module: account_banking_payment_export +#: field:payment.mode,default_populate_results:0 +#: field:payment.order.create,populate_results:0 +msgid "Populate Results Directly" +msgstr "" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +msgid "Related Payment Lines" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +msgid "Select Move Lines to Pay - Default Values" +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode,type:0 +msgid "Select the Export Payment Type for the Payment Mode." +msgstr "" + +#. module: account_banking_payment_export +#: 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_payment_export +#: field:payment.mode,purchase_ok:0 +msgid "Selectable on purchase operations" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,sale_ok:0 +msgid "Selectable on sale operations" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_manual +msgid "Send payment order(s) manually" +msgstr "Verzend betaalopdrachten handmatig" + +#. module: account_banking_payment_export +#: help:payment.mode.type,code:0 +msgid "Specify the Code for Payment Type" +msgstr "Geef de code op voor het betaaltype" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_invoice.py:16 +#, python-format +msgid "Structured Reference" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: field:payment.mode.type,suitable_bank_types:0 +msgid "Suitable bank types" +msgstr "Geschikte banktypen" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:152 +#, python-format +msgid "The amount for Partner '%s' is negative or null (%.2f) !" +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode.type,payment_order_type:0 +msgid "" +"This field determines if this type applies to customers (Debit) or suppliers" +" (Payment)" +msgstr "" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +msgid "Total Amount" +msgstr "Totaalbedrag" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Total Credit" +msgstr "" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Total Debit" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Total in Company Currency" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Transaction Information" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,default_date_type:0 +#: field:payment.order.create,date_type:0 +msgid "Type of Date Filter" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:75 +#, python-format +msgid "You can only combine payment orders of the same type" +msgstr "U kunt alleen betalingsopdrachten van dezelfde soort combineren" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "launch_wizard" +msgstr "launch_wizard" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "" +"{\n" +" 'invisible': [('state', '!=', 'draft')]}" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order_lines +msgid "" +"{'display_credit': context.get('display_credit', False),'display_debit': " +"context.get('display_debit', False),'journal_type': 'sale', 'tree_view_ref' " +": " +"'account_banking_payment_export.payment_order_populate_view_move_line_tree'}" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "" +"{'required': [('date_type', '=', 'due')], 'invisible': [('date_type', '!=', " +"'due')]}" +msgstr "" diff --git a/account_payment_order/i18n/pt_BR.po b/account_payment_order/i18n/pt_BR.po new file mode 100644 index 000000000..1de801dc1 --- /dev/null +++ b/account_payment_order/i18n/pt_BR.po @@ -0,0 +1,489 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_payment_export +# +# Translators: +# danimaribeiro , 2016 +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 01:30+0000\n" +"Last-Translator: danimaribeiro \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_export +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:17 +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:31 +#, python-format +msgid "" +"A valid BIC contains 8 or 11 caracters. The BIC '%s' contains %d caracters, " +"so it is not valid." +msgstr "Um código de banco válido contém de 8 a 11 caracteres. O BIC '%s' contém %d caracteres, ou seja não é válido" + +#. module: account_banking_payment_export +#: field:payment.mode,active:0 field:payment.mode.type,active:0 +msgid "Active" +msgstr "Ativo" + +#. module: account_banking_payment_export +#: field:bank.payment.line,amount_currency:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Amount" +msgstr "Total" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_bank +msgid "Bank" +msgstr "Banco" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_partner_bank +msgid "Bank Accounts" +msgstr "Contas bancárias" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +#: field:payment.line,bank_line_id:0 +msgid "Bank Payment Line" +msgstr "Linha de pagamento bancário" + +#. module: account_banking_payment_export +#: field:bank.payment.line,name:0 +msgid "Bank Payment Line Ref" +msgstr "Referência do pagamento" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +#: model:ir.actions.act_window,name:account_banking_payment_export.bank_payment_line_action +#: model:ir.model,name:account_banking_payment_export.model_bank_payment_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +#: field:payment.order,bank_line_ids:0 +msgid "Bank Payment Lines" +msgstr "Linhas de pagamento bancária" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Cancel" +msgstr "Cancelar" + +#. module: account_banking_payment_export +#: field:payment.mode.type,code:0 +msgid "Code" +msgstr "Código" + +#. module: account_banking_payment_export +#: field:bank.payment.line,communication:0 +msgid "Communication" +msgstr "Comunicação" + +#. module: account_banking_payment_export +#: field:bank.payment.line,company_id:0 +msgid "Company" +msgstr "Empresa" + +#. module: account_banking_payment_export +#: field:bank.payment.line,create_uid:0 field:payment.manual,create_uid:0 +#: field:payment.mode.type,create_uid:0 +msgid "Created by" +msgstr "Criado por" + +#. module: account_banking_payment_export +#: field:bank.payment.line,create_date:0 field:payment.manual,create_date:0 +#: field:payment.mode.type,create_date:0 +msgid "Created on" +msgstr "Criado em" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +msgid "Debit" +msgstr "Débito" + +#. module: account_banking_payment_export +#: selection:payment.order,payment_order_type:0 +msgid "Direct debit" +msgstr "Débito direto" + +#. module: account_banking_payment_export +#: selection:payment.mode,default_date_type:0 +msgid "Due" +msgstr "Vence em" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +msgid "Due Date" +msgstr "Data de vencimento" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Entry Information" +msgstr "Registro de informação" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:152 +#, python-format +msgid "Entry Lines" +msgstr "Linhas de pagamento" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:74 +#, python-format +msgid "Error" +msgstr "Erro" + +#. module: account_banking_payment_export +#: field:payment.mode,type:0 +msgid "Export type" +msgstr "Tipo de exportação" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "General Information" +msgstr "Informação geral" + +#. module: account_banking_payment_export +#: field:payment.mode,group_lines:0 +msgid "Group lines in payment orders" +msgstr "Agrupar linhas nas ordens de pagamento" + +#. module: account_banking_payment_export +#: field:bank.payment.line,id:0 field:payment.manual,id:0 +#: field:payment.mode.type,id:0 +msgid "ID" +msgstr "ID" + +#. module: account_banking_payment_export +#: help:payment.mode,group_lines:0 +msgid "" +"If this mark is checked, the payment order lines will be grouped when validating the payment order before exporting the bank file. The grouping will be done only if the following fields matches:\n" +"* Partner\n" +"* Currency\n" +"* Destination Bank Account\n" +"* Communication Type (structured, free)\n" +"* Payment Date\n" +"(other modules can set additional fields to restrict the grouping.)" +msgstr "Se marcado, as linhas das ordens serão agrupadas quando validadas antes de exportar o arquivo do banco. O agrupamento será feito apenas se os campos forem iguais:\n* Parceiro\n* Moeda\n* Conta bancária destino\n* TIpo de comunicação\n* Data do pagamento\n(outros módulos podem adicionar campos adicionais)" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Information" +msgstr "Informação" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_account_invoice +msgid "Invoice" +msgstr "Fatura" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Journal Entry" +msgstr "Entrada do diário" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +#: model:ir.model,name:account_banking_payment_export.model_account_move_line +msgid "Journal Items" +msgstr "Itens de Diário" + +#. module: account_banking_payment_export +#: field:payment.mode,default_journal_ids:0 +#: field:payment.order.create,journal_ids:0 +msgid "Journals Filter" +msgstr "Filtro de diário" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "Keep empty for using all journals" +msgstr "Manter vazio para usar todos os diários" + +#. module: account_banking_payment_export +#: field:bank.payment.line,write_uid:0 field:payment.manual,write_uid:0 +#: field:payment.mode.type,write_uid:0 +msgid "Last Updated by" +msgstr "Última Atualização por" + +#. module: account_banking_payment_export +#: field:bank.payment.line,write_date:0 field:payment.manual,write_date:0 +#: field:payment.mode.type,write_date:0 +msgid "Last Updated on" +msgstr "Última Atualização em" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +msgid "Line grouping" +msgstr "Agrupamento de linha" + +#. module: account_banking_payment_export +#: field:payment.mode,default_invoice:0 field:payment.order.create,invoice:0 +msgid "Linked to an Invoice or Refund" +msgstr "Vinculado a uma fatura ou reembolso" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Manual payment" +msgstr "Pagamento manual" + +#. module: account_banking_payment_export +#: selection:payment.mode,default_date_type:0 +msgid "Move" +msgstr "Movimentação" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +#: field:payment.order.create,move_date:0 +msgid "Move Date" +msgstr "Data da movimentação" + +#. module: account_banking_payment_export +#: field:payment.mode.type,name:0 +msgid "Name" +msgstr "Nome" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +#: field:payment.mode,note:0 +msgid "Note" +msgstr "Nota" + +#. module: account_banking_payment_export +#: field:bank.payment.line,order_id:0 +msgid "Order" +msgstr "Ordem" + +#. module: account_banking_payment_export +#: field:payment.mode.type,payment_order_type:0 +msgid "Order type" +msgstr "Tipo de ordem" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Owner Account" +msgstr "Dono da conta" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Partner Bank Account" +msgstr "Conta bancária parceiro" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +#: selection:payment.order,payment_order_type:0 +msgid "Payment" +msgstr "Pagamento" + +#. module: account_banking_payment_export +#: model:ir.actions.act_window,name:account_banking_payment_export.action_payment_mode_type +#: model:ir.ui.menu,name:account_banking_payment_export.menu_payment_mode_type +msgid "Payment Export Types" +msgstr "Tipos de exportação dos Pagamentos" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Line" +msgstr "Linha de Pagamento" + +#. module: account_banking_payment_export +#: field:bank.payment.line,payment_line_ids:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Lines" +msgstr "Linhas do pagamento" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode +msgid "Payment Mode" +msgstr "Modo de pagamento" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type +msgid "Payment Mode Type" +msgstr "Tipo do Modo de Pagamento" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_order +msgid "Payment Order" +msgstr "Ordem de Pagamento" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:59 +#, python-format +msgid "Payment Order Export" +msgstr "Exportação da Ordem de Pagamento" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:245 +#, python-format +msgid "Payment Orders" +msgstr "Ordens de Pagamento" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: help:payment.mode.type,name:0 +msgid "Payment Type" +msgstr "Tipo de pagamento" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_tree +msgid "Payment Types" +msgstr "Tipos de pagamento" + +#. module: account_banking_payment_export +#: field:payment.order,payment_order_type:0 +msgid "Payment order type" +msgstr "Tipo da ordem de pagamento" + +#. module: account_banking_payment_export +#: field:payment.mode.type,ir_model_id:0 +msgid "Payment wizard" +msgstr "Assistente para Pagamentos" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "" +"Please execute payment order manually, and click OK when succesfully sent." +msgstr "Por favor execute a ordem de pagamento manualmente, e clique OK quando terminar de enviar." + +#. module: account_banking_payment_export +#: field:payment.mode,default_populate_results:0 +#: field:payment.order.create,populate_results:0 +msgid "Populate Results Directly" +msgstr "Popular resultados diretamente" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +msgid "Related Payment Lines" +msgstr "Linhas relacionadas do pagamento" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +msgid "Select Move Lines to Pay - Default Values" +msgstr "Selecionar os movimentos para pagar - Valores padrão" + +#. module: account_banking_payment_export +#: help:payment.mode,type:0 +msgid "Select the Export Payment Type for the Payment Mode." +msgstr "Selecione os tipos de pagamento que permitem exportação para o Modo de Pagamento." + +#. module: account_banking_payment_export +#: help:payment.mode.type,ir_model_id:0 +msgid "" +"Select the Payment Wizard for payments of this type. Leave empty for manual " +"processing" +msgstr "Selecione o Assistente de Pagamento para pagamentos deste tipo. Deixe vazio para processamento manual" + +#. module: account_banking_payment_export +#: field:payment.mode,purchase_ok:0 +msgid "Selectable on purchase operations" +msgstr "Selecionável em operações de compra" + +#. module: account_banking_payment_export +#: field:payment.mode,sale_ok:0 +msgid "Selectable on sale operations" +msgstr "Selecionável em operações de venda" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_manual +msgid "Send payment order(s) manually" +msgstr "Enviar a(s) ordem(s) de pagamento manualmente" + +#. module: account_banking_payment_export +#: help:payment.mode.type,code:0 +msgid "Specify the Code for Payment Type" +msgstr "Especifique o código para o Tipo de Pagamento" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_invoice.py:16 +#, python-format +msgid "Structured Reference" +msgstr "Referência estruturada" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: field:payment.mode.type,suitable_bank_types:0 +msgid "Suitable bank types" +msgstr "Tipos de contas bancárias adequadas" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:152 +#, python-format +msgid "The amount for Partner '%s' is negative or null (%.2f) !" +msgstr "O total para o parceiro '%s' é negativo ou nulo (%.2f) !" + +#. module: account_banking_payment_export +#: help:payment.mode.type,payment_order_type:0 +msgid "" +"This field determines if this type applies to customers (Debit) or suppliers" +" (Payment)" +msgstr "Este campo determina se este tipo se aplica a clientes (Cobrança) ou a fornecedores (Pagamentos)" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +msgid "Total Amount" +msgstr "Valor total" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Total Credit" +msgstr "Total de crédito" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Total Debit" +msgstr "Total débito" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Total in Company Currency" +msgstr "Total na moeda da empresa" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Transaction Information" +msgstr "Informação da transação" + +#. module: account_banking_payment_export +#: field:payment.mode,default_date_type:0 +#: field:payment.order.create,date_type:0 +msgid "Type of Date Filter" +msgstr "Tipo de filtro de data" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:75 +#, python-format +msgid "You can only combine payment orders of the same type" +msgstr "Você pode combinar ordens de pagamento do mesmo tipo" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "launch_wizard" +msgstr "launch_wizard" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "" +"{\n" +" 'invisible': [('state', '!=', 'draft')]}" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order_lines +msgid "" +"{'display_credit': context.get('display_credit', False),'display_debit': " +"context.get('display_debit', False),'journal_type': 'sale', 'tree_view_ref' " +": " +"'account_banking_payment_export.payment_order_populate_view_move_line_tree'}" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "" +"{'required': [('date_type', '=', 'due')], 'invisible': [('date_type', '!=', " +"'due')]}" +msgstr "" diff --git a/account_payment_order/i18n/sl.po b/account_payment_order/i18n/sl.po new file mode 100644 index 000000000..202b59504 --- /dev/null +++ b/account_payment_order/i18n/sl.po @@ -0,0 +1,489 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_payment_export +# +# Translators: +# Matjaž Mozetič , 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:59+0000\n" +"Last-Translator: Matjaž Mozetič \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_export +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:17 +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:31 +#, python-format +msgid "" +"A valid BIC contains 8 or 11 caracters. The BIC '%s' contains %d caracters, " +"so it is not valid." +msgstr "Veljavna BIC koda vsebuje 8 do 11 znakov. BIC '%s' vsebuje %d znakov, zato ni veljavna." + +#. module: account_banking_payment_export +#: field:payment.mode,active:0 field:payment.mode.type,active:0 +msgid "Active" +msgstr "Aktivno" + +#. module: account_banking_payment_export +#: field:bank.payment.line,amount_currency:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Amount" +msgstr "Znesek" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_bank +msgid "Bank" +msgstr "Banka" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_partner_bank +msgid "Bank Accounts" +msgstr "Bančni računi" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +#: field:payment.line,bank_line_id:0 +msgid "Bank Payment Line" +msgstr "Postavka bančnega plačila" + +#. module: account_banking_payment_export +#: field:bank.payment.line,name:0 +msgid "Bank Payment Line Ref" +msgstr "Sklic postavke bančnega plačila" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +#: model:ir.actions.act_window,name:account_banking_payment_export.bank_payment_line_action +#: model:ir.model,name:account_banking_payment_export.model_bank_payment_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +#: field:payment.order,bank_line_ids:0 +msgid "Bank Payment Lines" +msgstr "Postavke bančnih plačil" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Cancel" +msgstr "Preklic" + +#. module: account_banking_payment_export +#: field:payment.mode.type,code:0 +msgid "Code" +msgstr "Koda" + +#. module: account_banking_payment_export +#: field:bank.payment.line,communication:0 +msgid "Communication" +msgstr "Komunikacija" + +#. module: account_banking_payment_export +#: field:bank.payment.line,company_id:0 +msgid "Company" +msgstr "Družba" + +#. module: account_banking_payment_export +#: field:bank.payment.line,create_uid:0 field:payment.manual,create_uid:0 +#: field:payment.mode.type,create_uid:0 +msgid "Created by" +msgstr "Ustvaril" + +#. module: account_banking_payment_export +#: field:bank.payment.line,create_date:0 field:payment.manual,create_date:0 +#: field:payment.mode.type,create_date:0 +msgid "Created on" +msgstr "Ustvarjeno" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +msgid "Debit" +msgstr "Breme" + +#. module: account_banking_payment_export +#: selection:payment.order,payment_order_type:0 +msgid "Direct debit" +msgstr "Neposredno breme" + +#. module: account_banking_payment_export +#: selection:payment.mode,default_date_type:0 +msgid "Due" +msgstr "Zapadlost" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +msgid "Due Date" +msgstr "Datum zapadlosti" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Entry Information" +msgstr "Podatki o vnosu" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:152 +#, python-format +msgid "Entry Lines" +msgstr "Postavke vnosa" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:74 +#, python-format +msgid "Error" +msgstr "Napaka" + +#. module: account_banking_payment_export +#: field:payment.mode,type:0 +msgid "Export type" +msgstr "Tip izvoza" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "General Information" +msgstr "Splošne informacije" + +#. module: account_banking_payment_export +#: field:payment.mode,group_lines:0 +msgid "Group lines in payment orders" +msgstr "Združevanje postavk v plačilnih nalogih" + +#. module: account_banking_payment_export +#: field:bank.payment.line,id:0 field:payment.manual,id:0 +#: field:payment.mode.type,id:0 +msgid "ID" +msgstr "ID" + +#. module: account_banking_payment_export +#: help:payment.mode,group_lines:0 +msgid "" +"If this mark is checked, the payment order lines will be grouped when validating the payment order before exporting the bank file. The grouping will be done only if the following fields matches:\n" +"* Partner\n" +"* Currency\n" +"* Destination Bank Account\n" +"* Communication Type (structured, free)\n" +"* Payment Date\n" +"(other modules can set additional fields to restrict the grouping.)" +msgstr "Če označeno, se postavke plačilnega naloga združujejo ob overjanju plačilnega naloga pred izvozom v bančno datoteko. Združevanje se izvede le ob ujemanju naslednjih polj:\n* Partner\n* Valuta\n* Ciljni bančni račun\n* Tip komunikacije (strukturirana, prosta)\n* Datum plačila\n(drugi moduli lahko nastavijo tudi dodatna polja za omejevanje grupiranja)" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Information" +msgstr "Informacija" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_account_invoice +msgid "Invoice" +msgstr "Račun" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Journal Entry" +msgstr "Dnevniški vnos" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +#: model:ir.model,name:account_banking_payment_export.model_account_move_line +msgid "Journal Items" +msgstr "Dnevniške postavke" + +#. module: account_banking_payment_export +#: field:payment.mode,default_journal_ids:0 +#: field:payment.order.create,journal_ids:0 +msgid "Journals Filter" +msgstr "Dnevniški filter" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "Keep empty for using all journals" +msgstr "Pustite prazno za uporabo vseh dnevnikov" + +#. module: account_banking_payment_export +#: field:bank.payment.line,write_uid:0 field:payment.manual,write_uid:0 +#: field:payment.mode.type,write_uid:0 +msgid "Last Updated by" +msgstr "Zadnji posodobil" + +#. module: account_banking_payment_export +#: field:bank.payment.line,write_date:0 field:payment.manual,write_date:0 +#: field:payment.mode.type,write_date:0 +msgid "Last Updated on" +msgstr "Zadnjič posodobljeno" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +msgid "Line grouping" +msgstr "Združevanje postavk" + +#. module: account_banking_payment_export +#: field:payment.mode,default_invoice:0 field:payment.order.create,invoice:0 +msgid "Linked to an Invoice or Refund" +msgstr "Vezano na račun ali vračilo" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Manual payment" +msgstr "Ročno plačilo" + +#. module: account_banking_payment_export +#: selection:payment.mode,default_date_type:0 +msgid "Move" +msgstr "Premik" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +#: field:payment.order.create,move_date:0 +msgid "Move Date" +msgstr "Datum premika" + +#. module: account_banking_payment_export +#: field:payment.mode.type,name:0 +msgid "Name" +msgstr "Naziv" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +#: field:payment.mode,note:0 +msgid "Note" +msgstr "Opomba" + +#. module: account_banking_payment_export +#: field:bank.payment.line,order_id:0 +msgid "Order" +msgstr "Nalog" + +#. module: account_banking_payment_export +#: field:payment.mode.type,payment_order_type:0 +msgid "Order type" +msgstr "Tip naloga" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Owner Account" +msgstr "Račun lastnika" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Partner Bank Account" +msgstr "Bančni račun partnerja" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +#: selection:payment.order,payment_order_type:0 +msgid "Payment" +msgstr "Plačilo" + +#. module: account_banking_payment_export +#: model:ir.actions.act_window,name:account_banking_payment_export.action_payment_mode_type +#: model:ir.ui.menu,name:account_banking_payment_export.menu_payment_mode_type +msgid "Payment Export Types" +msgstr "Tipi izvoza plačil" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Line" +msgstr "Plačilna postavka" + +#. module: account_banking_payment_export +#: field:bank.payment.line,payment_line_ids:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Lines" +msgstr "Plačilne postavke" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode +msgid "Payment Mode" +msgstr "Metoda plačila" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type +msgid "Payment Mode Type" +msgstr "Tip metode plačila" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_order +msgid "Payment Order" +msgstr "Plačilni nalog" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:59 +#, python-format +msgid "Payment Order Export" +msgstr "Izvoz plačilnega naloga" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:245 +#, python-format +msgid "Payment Orders" +msgstr "Plačilni nalogi" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: help:payment.mode.type,name:0 +msgid "Payment Type" +msgstr "Tip plačila" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_tree +msgid "Payment Types" +msgstr "Tipi plačil" + +#. module: account_banking_payment_export +#: field:payment.order,payment_order_type:0 +msgid "Payment order type" +msgstr "Tip plačilnega naloga" + +#. module: account_banking_payment_export +#: field:payment.mode.type,ir_model_id:0 +msgid "Payment wizard" +msgstr "Čarovnik za plačila" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "" +"Please execute payment order manually, and click OK when succesfully sent." +msgstr "Ročno izvedite plačilni nalog in kliknite 'V redu' po uspešnem pošiljanju." + +#. module: account_banking_payment_export +#: field:payment.mode,default_populate_results:0 +#: field:payment.order.create,populate_results:0 +msgid "Populate Results Directly" +msgstr "Neposredno zapolni rezultate" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +msgid "Related Payment Lines" +msgstr "Povezane plačilne postavke" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +msgid "Select Move Lines to Pay - Default Values" +msgstr "Izbira postavk premikov za plačilo - privzete vrednosti" + +#. module: account_banking_payment_export +#: help:payment.mode,type:0 +msgid "Select the Export Payment Type for the Payment Mode." +msgstr "Izbira tipa izvoza plačila za metodo plačila." + +#. module: account_banking_payment_export +#: help:payment.mode.type,ir_model_id:0 +msgid "" +"Select the Payment Wizard for payments of this type. Leave empty for manual " +"processing" +msgstr "Izbira čarovnika za plačila za plačila tega tipa. Pustite prazno za ročno obdelavo." + +#. module: account_banking_payment_export +#: field:payment.mode,purchase_ok:0 +msgid "Selectable on purchase operations" +msgstr "Izbirno pri nabavnih operacijah" + +#. module: account_banking_payment_export +#: field:payment.mode,sale_ok:0 +msgid "Selectable on sale operations" +msgstr "Izbirno pri prodajnih operacijah" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_manual +msgid "Send payment order(s) manually" +msgstr "Ročno pošiljanje plačilnega naloga (plačilnih nalogov)" + +#. module: account_banking_payment_export +#: help:payment.mode.type,code:0 +msgid "Specify the Code for Payment Type" +msgstr "Določi kodo za tip plačila" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_invoice.py:16 +#, python-format +msgid "Structured Reference" +msgstr "Strukturiran sklic" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: field:payment.mode.type,suitable_bank_types:0 +msgid "Suitable bank types" +msgstr "Ustrezni tipi bank" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:152 +#, python-format +msgid "The amount for Partner '%s' is negative or null (%.2f) !" +msgstr "Znesek za partnerja '%s' je negativen ali ničen (%.2f) !" + +#. module: account_banking_payment_export +#: help:payment.mode.type,payment_order_type:0 +msgid "" +"This field determines if this type applies to customers (Debit) or suppliers" +" (Payment)" +msgstr "To polje določa, če se ta tip nanaša na kupce (breme) ali dobavitelje (plačilo )" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +msgid "Total Amount" +msgstr "Skupni znesek" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Total Credit" +msgstr "Skupaj dobroimetje" + +#. module: account_banking_payment_export +#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree +msgid "Total Debit" +msgstr "Skupaj breme" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Total in Company Currency" +msgstr "Skupaj v valuti družbe" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Transaction Information" +msgstr "Podatki o transakciji" + +#. module: account_banking_payment_export +#: field:payment.mode,default_date_type:0 +#: field:payment.order.create,date_type:0 +msgid "Type of Date Filter" +msgstr "Tip datumskega filtra" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:75 +#, python-format +msgid "You can only combine payment orders of the same type" +msgstr "Kombinirate lahko le plačilne naloge istega tipa" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "launch_wizard" +msgstr "launch_wizard" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "" +"{\n" +" 'invisible': [('state', '!=', 'draft')]}" +msgstr "{\n 'invisible': [('state', '!=', 'draft')]}" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order_lines +msgid "" +"{'display_credit': context.get('display_credit', False),'display_debit': " +"context.get('display_debit', False),'journal_type': 'sale', 'tree_view_ref' " +": " +"'account_banking_payment_export.payment_order_populate_view_move_line_tree'}" +msgstr "{'display_credit': context.get('display_credit', False),'display_debit': context.get('display_debit', False),'journal_type': 'sale', 'tree_view_ref' : 'account_banking_payment_export.payment_order_populate_view_move_line_tree'}" + +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "" +"{'required': [('date_type', '=', 'due')], 'invisible': [('date_type', '!=', " +"'due')]}" +msgstr "{'required': [('date_type', '=', 'due')], 'invisible': [('date_type', '!=', 'due')]}" diff --git a/account_payment_order/migrations/8.0.0.1.166/pre-migrate.py b/account_payment_order/migrations/8.0.0.1.166/pre-migrate.py new file mode 100644 index 000000000..870747844 --- /dev/null +++ b/account_payment_order/migrations/8.0.0.1.166/pre-migrate.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# This module copyright (C) 2015 Therp BV (). +# +# 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): + cr.execute( + 'SELECT count(attname) FROM pg_attribute ' + 'WHERE attrelid = ' + '( SELECT oid FROM pg_class WHERE relname = %s ) ' + 'AND attname = %s', + ('payment_order', 'total')) + if cr.fetchone()[0] == 0: + cr.execute('alter table payment_order add column total numeric') + cr.execute( + 'update payment_order ' + 'set total=totals.total ' + 'from ' + '(select order_id, sum(amount_currency) total ' + 'from payment_line group by order_id) totals ' + 'where payment_order.id=totals.order_id') diff --git a/account_payment_order/models/__init__.py b/account_payment_order/models/__init__.py new file mode 100644 index 000000000..48e597645 --- /dev/null +++ b/account_payment_order/models/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- + +from . import account_payment_mode +from . import account_payment_order +from . import account_payment_line +from . import bank_payment_line +from . import account_move_line +from . import account_invoice +from . import res_bank diff --git a/account_payment_order/models/account_invoice.py b/account_payment_order/models/account_invoice.py new file mode 100644 index 000000000..b6516b708 --- /dev/null +++ b/account_payment_order/models/account_invoice.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# © 2013-2014 ACSONE SA (). +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import api, models, _ +from lxml import etree + + +class AccountInvoice(models.Model): + _inherit = 'account.invoice' + + @api.model + def _get_reference_type(self): + rt = super(AccountInvoice, self)._get_reference_type() + rt.append(('structured', _('Structured Reference'))) + return rt + + @api.model + def fields_view_get(self, view_id=None, view_type=False, toolbar=False, + submenu=False): + """This adds the field 'reference_type' only if the view doesn't + contain this field (this is for customer invoice and with + l10n_be_invoice_bba not installed). + """ + res = super(AccountInvoice, self).fields_view_get( + view_id=view_id, view_type=view_type, toolbar=toolbar, + submenu=submenu) + if view_type != 'form': + return res + field_name = 'reference_type' + doc = etree.XML(res['arch']) + if not doc.xpath("//field[@name='%s']" % field_name): + nodes = doc.xpath("//field[@name='origin']") + if nodes: + field = self.fields_get([field_name])[field_name] + field_xml = etree.Element( + 'field', {'name': field_name, + 'widget': 'selection', + 'states': str(field['states']), + 'selection': str(field['selection']), + 'required': '1' if field['required'] else '0', + 'string': field['string'], + 'nolabel': '0'}) + nodes[0].addnext(field_xml) + res['arch'] = etree.tostring(doc) + res['fields'][field_name] = field + return res + + @api.model + def line_get_convert(self, line, part): + """Copy supplier bank account from invoice to account move line""" + res = super(AccountInvoice, self).line_get_convert(line, part) + if line.get('type') == 'dest' and line.get('invoice_id'): + invoice = self.browse(line['invoice_id']) + if invoice.type in ('in_invoice', 'in_refund'): + res['partner_bank_id'] = invoice.partner_bank_id.id or False + return res diff --git a/account_payment_order/models/account_move_line.py b/account_payment_order/models/account_move_line.py new file mode 100644 index 000000000..b66cd3f4a --- /dev/null +++ b/account_payment_order/models/account_move_line.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- +# © 2014-2016 Akretion (Alexis de Lattre ) +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# 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 + + @api.multi + def _prepare_payment_line_vals(self, payment_order): + self.ensure_one() + assert payment_order, 'Missing payment order' + aplo = self.env['account.payment.line'] + communication_type = 'normal' + communication = self.move_id.name or '-' + ref2comm_type = aplo.invoice_reference_type2communication_type() + if ( + self.invoice_id and + self.invoice_id.type in ('in_invoice', 'in_refund') and + self.invoice_id.reference): + communication = self.invoice_id.reference + if self.invoice_id.reference_type: + communication_type =\ + ref2comm_type[self.invoice_id.reference_type] + if self.currency_id: + currency_id = self.currency_id.id + amount_currency = self.amount_residual_currency + 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') + if payment_order.payment_type == 'outbound': + amount_currency *= -1 + # TODO : inherit for mandate + vals = { + 'order_id': payment_order.id, + 'partner_bank_id': self.partner_bank_id.id, + 'partner_id': self.partner_id.id, + 'move_line_id': self.id, + 'communication': communication, + 'communication_type': communication_type, + 'currency_id': currency_id, + 'amount_currency': amount_currency, + # date is set when the user confirms the payment order + } + return vals + + @api.multi + def create_payment_line_from_move_line(self, payment_order): + aplo = self.env['account.payment.line'] + for mline in self: + aplo.create(mline._prepare_payment_line_vals(payment_order)) + return diff --git a/account_payment_order/models/account_payment_line.py b/account_payment_order/models/account_payment_line.py new file mode 100644 index 000000000..2058c0e00 --- /dev/null +++ b/account_payment_order/models/account_payment_line.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +# © 2015-2016 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import models, fields, api, _ +from openerp.exceptions import UserError + + +class AccountPaymentLine(models.Model): + _name = 'account.payment.line' + _description = 'Payment Lines' + + name = fields.Char(string='Payment Reference', readonly=True, copy=False) + order_id = fields.Many2one( + 'account.payment.order', string='Payment Order', + ondelete='cascade', select=True) + company_id = fields.Many2one( + related='order_id.company_id', store=True, readonly=True) + company_currency_id = fields.Many2one( + related='order_id.company_currency_id', store=True, readonly=True) + payment_type = fields.Selection( + related='order_id.payment_type', store=True, readonly=True) + move_line_id = fields.Many2one( + 'account.move.line', string='Journal Item') + ml_maturity_date = fields.Date( + related='move_line_id.date_maturity', readonly=True) + currency_id = fields.Many2one( + 'res.currency', string='Currency of the Payment Transaction', + required=True, + default=lambda self: self.env.user.company_id.currency_id) + # v8 field : currency + amount_currency = fields.Monetary( + string="Amount", currency_field='currency_id') + amount_company_currency = fields.Monetary( + compute='compute_amount_company_currency', + string='Amount in Company Currency', readonly=True, + currency_field='company_currency_id') # v8 field : amount + partner_id = fields.Many2one( + 'res.partner', string='Partner', required=True, + domain=[('parent_id', '=', False)]) + partner_bank_id = fields.Many2one( + 'res.partner.bank', string='Partner Bank Account', required=False, + ondelete='restrict') # v8 field : bank_id + date = fields.Date(string='Payment Date') + communication = fields.Char( + string='Communication', required=True, + help="Label of the payment that will be seen by the destinee") + communication_type = fields.Selection([ + ('normal', 'Free'), + ], string='Communication Type', required=True, default='normal') + # v8 field : state + bank_line_id = fields.Many2one( + 'bank.payment.line', string='Bank Payment Line', readonly=True) + + _sql_constraints = [( + 'name_company_unique', + 'unique(name, company_id)', + 'A payment line already exists with this reference ' + 'in the same company!' + )] + + @api.model + def create(self, vals): + if vals.get('name', 'New') == 'New': + vals['name'] = self.env['ir.sequence'].next_by_code( + 'account.payment.line') or 'New' + return super(AccountPaymentLine, self).create(vals) + + @api.multi + @api.depends( + 'amount_currency', 'currency_id', 'company_currency_id', 'date') + def compute_amount_company_currency(self): + for line in self: + if line.currency_id and line.company_currency_id: + line.amount_company_currency = line.currency_id.with_context( + date=line.date).compute( + line.amount_currency, line.company_currency_id) + + @api.multi + def payment_line_hashcode(self): + self.ensure_one() + bplo = self.env['bank.payment.line'] + values = [] + for field in bplo.same_fields_payment_line_and_bank_payment_line(): + values.append(unicode(self[field])) + hashcode = '-'.join(values) + return hashcode + + @api.onchange('partner_id') + def partner_id_change(self): + partner_bank = False + if self.partner_id and self.partner_id.bank_ids: + partner_bank = self.partner_id.bank_ids[0] + self.partner_bank_id = partner_bank + + @api.onchange('move_line_id') + def move_line_id_change(self): + if self.move_line_id: + vals = self.move_line_id._prepare_payment_line_vals(self.order_id) + vals.pop('order_id') + for field, value in vals.iteritems(): + self[field] = value + else: + self.partner_id = False + self.partner_bank_id = False + self.amount_currency = 0.0 + self.currency_id = False + self.communication = False + + def invoice_reference_type2communication_type(self): + """This method is designed to be inherited by + localization modules""" + # key = value of 'reference_type' field on account_invoice + # value = value of 'communication_type' field on account_payment_line + res = {'none': 'normal'} + return res + + @api.multi + def check_payment_line(self): + for line in self: + if not line.partner_bank_id: + raise UserError(_( + 'Missing Partner Bank Account on payment line %s') + % line.name) diff --git a/account_payment_order/models/account_payment_mode.py b/account_payment_order/models/account_payment_mode.py new file mode 100644 index 000000000..956f918c5 --- /dev/null +++ b/account_payment_order/models/account_payment_mode.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# © 2014-2016 Serv. Tecnol. Avanzados - Pedro M. Baeza +# © 2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import models, fields, api + + +class AccountPaymentMode(models.Model): + """This corresponds to the object payment.mode of v8 with some + important changes""" + _inherit = "account.payment.mode" + + payment_order_ok = fields.Boolean( + string='Selectable in Payment Orders', default=True) + # Default options for the "payment.order.create" wizard + default_payment_mode = fields.Selection([ + ('same', 'Same'), + ('same_or_null', 'Same or empty'), + ('any', 'Any'), + ], string='Payment Mode on Invoice', default='same') + default_journal_ids = fields.Many2many( + 'account.journal', string="Journals Filter") + default_invoice = fields.Boolean( + string='Linked to an Invoice or Refund', default=False) + default_date_type = fields.Selection([ + ('due', 'Due'), + ('move', 'Move'), + ], default='due', string="Type of Date Filter") + group_lines = fields.Boolean( + string="Group lines in payment orders", default=True, + help="If this mark is checked, the payment order lines will be " + "grouped when validating the payment order before exporting the " + "bank file. The grouping will be done only if the following " + "fields matches:\n" + "* Partner\n" + "* Currency\n" + "* Destination Bank Account\n" + "* Communication Type (structured, free)\n" + "* Payment Date\n" + "(other modules can set additional fields to restrict the " + "grouping.)") + + @api.onchange('payment_method_id') + def payment_method_id_change(self): + if self.payment_method_id: + ajo = self.env['account.journal'] + aj_ids = [] + if self.payment_method_id.payment_type == 'outbound': + aj_ids = ajo.search([ + ('type', 'in', ('purchase_refund', 'purchase'))]).ids + elif self.payment_method_id.payment_type == 'inbound': + aj_ids = ajo.search([ + ('type', 'in', ('sale_refund', 'sale'))]).ids + self.default_journal_ids = [(6, 0, aj_ids)] diff --git a/account_payment_order/models/account_payment_order.py b/account_payment_order/models/account_payment_order.py new file mode 100644 index 000000000..f23bb1b44 --- /dev/null +++ b/account_payment_order/models/account_payment_order.py @@ -0,0 +1,261 @@ +# -*- coding: utf-8 -*- +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# © 2016 Serv. Tecnol. Avanzados - Pedro M. Baeza +# © 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, api, _ +from openerp.exceptions import UserError, ValidationError + + +class AccountPaymentOrder(models.Model): + _name = 'account.payment.order' + _description = 'Payment Order' + _inherit = ['mail.thread'] + _order = 'id desc' + + name = fields.Char( + string='Number', readonly=True, copy=False, + track_visibility='onchange') # v8 field : name + payment_mode_id = fields.Many2one( + 'account.payment.mode', 'Payment Method', required=True, + ondelete='restrict', track_visibility='onchange', + readonly=True, states={'draft': [('readonly', False)]}) + payment_type = fields.Selection([ + ('inbound', 'Inbound'), + ('outbound', 'Outbound'), + ], string='Payment Type', readonly=True, required=True) + company_id = fields.Many2one( + related='payment_mode_id.company_id', store=True, readonly=True) + company_currency_id = fields.Many2one( + related='payment_mode_id.company_id.currency_id', store=True, + readonly=True) + bank_account_link = fields.Selection( + related='payment_mode_id.bank_account_link', readonly=True) + journal_id = fields.Many2one( + 'account.journal', string='Bank Journal', + required=True) + company_partner_bank_id = fields.Many2one( + related='journal_id.bank_account_id', string='Company Bank Account', + readonly=True) + state = fields.Selection([ + ('draft', 'Draft'), + ('open', 'Confirmed'), + ('generated', 'File Generated'), + ('uploaded', 'File Uploaded'), + ('done', 'Done'), + ('cancel', 'Cancel'), + ], string='Status', readonly=True, copy=False, default='draft', + track_visibility='onchange') + date_prefered = fields.Selection([ + ('now', 'Immediately'), + ('due', 'Due Date'), + ('fixed', 'Fixed Date'), + ], string='Payment Execution Date Type', required=True, default='due', + track_visibility='onchange', readonly=True, + states={'draft': [('readonly', False)]}) + date_scheduled = fields.Date( + string='Payment Execution Date', readonly=True, + states={'draft': [('readonly', False)]}, track_visibility='onchange', + help="Select a requested date of execution if you selected 'Due Date' " + "as the Payment Execution Date Type.") + date_done = fields.Date(string='Date Done', readonly=True) + date_generated = fields.Date(string='Date Generated', readonly=True) + generated_user_id = fields.Many2one( + 'res.users', string='Generated by', readonly=True, ondelete='restrict', + copy=False) + payment_line_ids = fields.One2many( + 'account.payment.line', 'order_id', string='Transaction Lines', + readonly=True, states={'draft': [('readonly', False)]}) + # v8 field : line_ids + bank_line_ids = fields.One2many( + 'bank.payment.line', 'order_id', string="Bank Payment Lines", + readonly=True) + total_company_currency = fields.Monetary( + compute='_compute_total', store=True, readonly=True, + currency_field='company_currency_id') + bank_line_count = fields.Integer( + compute='_bank_line_count', string='Number of Bank Lines', + readonly=True) + + @api.multi + @api.constrains('payment_type', 'payment_mode_id') + def payment_order_constraints(self): + for order in self: + if ( + order.payment_mode_id.payment_type and + order.payment_mode_id.payment_type != order.payment_type): + raise ValidationError(_( + "The payment type (%s) is not the same as the payment " + "type of the payment mode (%s)") % ( + order.payment_type, + order.payment_mode_id.payment_type)) + + @api.one + @api.depends( + 'payment_line_ids', 'payment_line_ids.amount_company_currency') + def _compute_total(self): + self.total_company_currency = sum( + self.mapped('payment_line_ids.amount_company_currency') or [0.0]) + + @api.multi + @api.depends('bank_line_ids') + def _bank_line_count(self): + for order in self: + order.bank_line_count = len(order.bank_line_ids) + + @api.model + def create(self, vals): + if vals.get('name', 'New') == 'New': + vals['name'] = self.env['ir.sequence'].next_by_code( + 'account.payment.order') or 'New' + return super(AccountPaymentOrder, self).create(vals) + + @api.onchange('payment_mode_id') + def payment_mode_id_change(self): + res = {'domain': {}} + if self.payment_mode_id: + if self.payment_mode_id.bank_account_link == 'fixed': + self.journal_id = self.payment_mode_id.fixed_journal_id + # journal_id is a required field, so I can't set it readonly + # so I restrict the domain so that the user cannot change + # the journal + res['domain']['journal_id'] = [( + 'id', + '=', + self.payment_mode_id.fixed_journal_id.id)] + else: + res['domain']['journal_id'] = [( + 'id', + 'in', + self.payment_mode_id.variable_journal_ids.ids)] + else: + self.journal_id = False + return res + + @api.multi + def action_done(self): + self.write({ + 'date_done': fields.Date.context_today(self), + 'state': 'done', + }) + return True + + @api.multi + def cancel2draft(self): + self.write({'state': 'draft'}) + return True + + @api.multi + def action_cancel(self): + for order in self: + order.write({'state': 'cancel'}) + order.bank_line_ids.unlink() + return True + + @api.model + def _prepare_bank_payment_line(self, paylines): + return { + 'order_id': paylines[0].order_id.id, + 'payment_line_ids': [(6, 0, paylines.ids)], + 'communication': '-'.join( + [line.communication for line in paylines]), + } + + @api.multi + def draft2open(self): + """ + Called when you click on the 'Confirm' button + Set the 'date' on payment line depending on the 'date_prefered' + setting of the payment.order + Re-generate the bank payment lines + """ + bplo = self.env['bank.payment.line'] + today = fields.Date.context_today(self) + for order in self: + # Delete existing bank payment lines + order.bank_line_ids.unlink() + # Create the bank payment lines from the payment lines + group_paylines = {} # key = hashcode + for payline in order.payment_line_ids: + payline.check_payment_line() + # Compute requested payment date + if order.date_prefered == 'due': + requested_date = payline.ml_maturity_date or today + elif order.date_prefered == 'fixed': + requested_date = order.date_scheduled or today + else: + requested_date = today + # Write requested_date on 'date' field of payment line + payline.date = requested_date + # Group options + if order.payment_mode_id.group_lines: + hashcode = payline.payment_line_hashcode() + else: + # Use line ID as hascode, which actually means no grouping + hashcode = payline.id + if hashcode in group_paylines: + group_paylines[hashcode]['paylines'] += payline + group_paylines[hashcode]['total'] +=\ + payline.amount_currency + else: + group_paylines[hashcode] = { + 'paylines': payline, + 'total': payline.amount_currency, + } + # Create bank payment lines + for paydict in group_paylines.values(): + # Block if a bank payment line is <= 0 + if paydict['total'] <= 0: + raise UserError(_( + "The amount for Partner '%s' is negative " + "or null (%.2f) !") + % (paydict['paylines'][0].partner_id.name, + paydict['total'])) + vals = self._prepare_bank_payment_line(paydict['paylines']) + bplo.create(vals) + self.write({'state': 'open'}) + return True + + @api.multi + def generate_payment_file(self): + """Returns (payment file as string, filename)""" + self.ensure_one() + raise UserError(_( + "No handler for this payment method. Maybe you haven't " + "installed the related Odoo module.")) + + @api.multi + def open2generated(self): + self.ensure_one() + payment_file_str, filename = self.generate_payment_file() + attachment = self.env['ir.attachment'].create({ + 'res_model': 'account.payment.order', + 'res_id': self.id, + 'name': filename, + 'datas': payment_file_str.encode('base64'), + 'datas_fname': filename, + }) + self.write({ + 'date_generated': fields.Date.context_today(self), + 'state': 'generated', + 'generated_user_id': self._uid, + }) + simplified_form_view = self.env.ref( + 'account_payment_order.view_attachment_simplified_form') + action = { + 'name': _('Payment File'), + 'view_mode': 'form', + 'view_id': simplified_form_view.id, + 'res_model': 'ir.attachment', + 'type': 'ir.actions.act_window', + 'target': 'current', + 'res_id': attachment.id, + } + return action + + @api.multi + def generated2uploaded(self): + self.write({'state': 'uploaded'}) + return True diff --git a/account_payment_order/models/bank_payment_line.py b/account_payment_order/models/bank_payment_line.py new file mode 100644 index 000000000..bc419eb73 --- /dev/null +++ b/account_payment_order/models/bank_payment_line.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import models, fields, api + + +class BankPaymentLine(models.Model): + _name = 'bank.payment.line' + _description = 'Bank Payment Lines' + + name = fields.Char( + string='Bank Payment Line Ref', required=True, + readonly=True) + order_id = fields.Many2one( + 'account.payment.order', string='Order', ondelete='cascade', + select=True) + payment_type = fields.Selection( + related='order_id.payment_type', string="Payment Type", + readonly=True, store=True) + state = fields.Selection( + related='order_id.state', string='State', + readonly=True, store=True) + payment_line_ids = fields.One2many( + 'account.payment.line', 'bank_line_id', string='Payment Lines', + readonly=True) + partner_id = fields.Many2one( + 'res.partner', related='payment_line_ids.partner_id', + readonly=True) + # Function Float fields are sometimes badly displayed in tree view, + # see bug report https://github.com/odoo/odoo/issues/8632 + amount_currency = fields.Monetary( + string='Amount', currency_field='currency_id', + compute='_compute_amount', store=True, readonly=True) + currency_id = fields.Many2one( + 'res.currency', required=True, readonly=True, + related='payment_line_ids.currency_id') # v8 field: currency + partner_bank_id = fields.Many2one( + 'res.partner.bank', string='Bank Account', readonly=True, + related='payment_line_ids.partner_bank_id') # v8 field: bank_id + date = fields.Date( + related='payment_line_ids.date', readonly=True) + communication_type = fields.Selection( + related='payment_line_ids.communication_type', readonly=True) + communication = fields.Char( + string='Communication', required=True, + readonly=True) #, states={'draft': [('readonly', False)]}) + company_id = fields.Many2one( + related='order_id.payment_mode_id.company_id', store=True, + readonly=True) + + @api.model + def same_fields_payment_line_and_bank_payment_line(self): + """ + This list of fields is used both to compute the grouping + hashcode and to copy the values from payment line + to bank payment line + The fields must have the same name on the 2 objects + """ + same_fields = [ + 'currency_id', 'partner_id', + 'partner_bank_id', 'date', 'communication_type'] + return same_fields + + @api.multi + @api.depends('payment_line_ids', 'payment_line_ids.amount_currency') + def _compute_amount(self): + for line in self: + line.amount_currency = sum( + line.mapped('payment_line_ids.amount_currency')) + + @api.model + @api.returns('self') + def create(self, vals): + if vals.get('name', 'New') == 'New': + vals['name'] = self.env['ir.sequence'].next_by_code( + 'bank.payment.line') or 'New' + return super(BankPaymentLine, self).create(vals) diff --git a/account_payment_order/models/res_bank.py b/account_payment_order/models/res_bank.py new file mode 100644 index 000000000..fa927bbd1 --- /dev/null +++ b/account_payment_order/models/res_bank.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# © 2015-2016 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import models, api, _ +from openerp.exceptions import ValidationError + + +class ResBank(models.Model): + _inherit = 'res.bank' + + @api.multi + @api.constrains('bic') + def check_bic_length(self): + for bank in self: + if bank.bic and len(bank.bic) not in (8, 11): + raise ValidationError(_( + "A valid BIC contains 8 or 11 caracters. The BIC '%s' " + "contains %d caracters, so it is not valid.") + % (bank.bic, len(bank.bic))) + +# in v9, on res.partner.bank bank_bic is a related of bank_id.bic diff --git a/account_payment_order/security/ir.model.access.csv b/account_payment_order/security/ir.model.access.csv new file mode 100644 index 000000000..753793646 --- /dev/null +++ b/account_payment_order/security/ir.model.access.csv @@ -0,0 +1,4 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_payment_order,Full access on account.payment.order to Payment Manager,model_account_payment_order,group_account_payment,1,1,1,1 +access_account_payment_line,Full access on account.payment.line to Payment Manager,model_account_payment_line,group_account_payment,1,1,1,1 +access_bank_payment_line,Full access on bank.payment.line to Payment Manager,model_bank_payment_line,group_account_payment,1,1,1,1 diff --git a/account_payment_order/security/payment_security.xml b/account_payment_order/security/payment_security.xml new file mode 100644 index 000000000..cb5ce34f2 --- /dev/null +++ b/account_payment_order/security/payment_security.xml @@ -0,0 +1,39 @@ + + + + + + + Accounting / Payments + + + + + + + + + + + + Payment mode multi-company rule + + ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + + + + + + diff --git a/account_payment_order/static/description/icon.png b/account_payment_order/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 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 z 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 Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/account_payment_order/views/account_move_line.xml b/account_payment_order/views/account_move_line.xml new file mode 100644 index 000000000..d9e606d11 --- /dev/null +++ b/account_payment_order/views/account_move_line.xml @@ -0,0 +1,27 @@ + + + + + + + + + + account_payment_order.move_line_form + account.move.line + + + + + + + + + + + diff --git a/account_payment_order/views/account_payment_line.xml b/account_payment_order/views/account_payment_line.xml new file mode 100644 index 000000000..152c119d4 --- /dev/null +++ b/account_payment_order/views/account_payment_line.xml @@ -0,0 +1,66 @@ + + + + + + + account.payment.line.form + account.payment.line + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + account.payment.line.tree + account.payment.line + + + + + + + + + + + + + + + + + + + Payment Lines + account.payment.line + tree,form + {'account_payment_line_main_view': True} + + + +
+
diff --git a/account_payment_order/views/account_payment_mode.xml b/account_payment_order/views/account_payment_mode.xml new file mode 100644 index 000000000..f0a8f6864 --- /dev/null +++ b/account_payment_order/views/account_payment_mode.xml @@ -0,0 +1,51 @@ + + + + + + + account_payment_order.account.payment.mode.form + account.payment.mode + + + + + + + + + + + + + + + + + + + account_payment_order.account.payment.mode.tree + account.payment.mode + + + + + + + + + + account_payment_order.account.payment.mode.search + account.payment.mode + + + + + + + + + + diff --git a/account_payment_order/views/account_payment_order.xml b/account_payment_order/views/account_payment_order.xml new file mode 100644 index 000000000..c71c33d25 --- /dev/null +++ b/account_payment_order/views/account_payment_order.xml @@ -0,0 +1,127 @@ + + + + + + + account.payment.order.form + account.payment.order + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + account.payment.order.tree + account.payment.order + + + + + + + + + + + + + + + + + account.payment.order.search + account.payment.order + + + + + + + + + + + + + + Payment Orders + account.payment.order + tree,form + [('payment_type', '=', 'outbound')] + {'default_payment_type': 'outbound'} + + + + Debit Orders + account.payment.order + tree,form + [('payment_type', '=', 'inbound')] + {'default_payment_type': 'inbound'} + + + + + + + + +
+
diff --git a/account_payment_order/views/bank_payment_line.xml b/account_payment_order/views/bank_payment_line.xml new file mode 100644 index 000000000..bd62865f0 --- /dev/null +++ b/account_payment_order/views/bank_payment_line.xml @@ -0,0 +1,84 @@ + + + + + + + bank.payment.line.form + bank.payment.line + +
+ + + + + + + + + + + + + + + +
+
+
+ + + bank.payment.line.tree + bank.payment.line + + + + + + + + + + + + + + + + + bank.payment.line.search + bank.payment.line + + + + + + + + + + + + + + + + Bank Payment Lines + bank.payment.line + tree,form + {'bank_payment_line_main_view': True} + + + + +
+
diff --git a/account_payment_order/views/ir_attachment.xml b/account_payment_order/views/ir_attachment.xml new file mode 100644 index 000000000..98f5ac991 --- /dev/null +++ b/account_payment_order/views/ir_attachment.xml @@ -0,0 +1,32 @@ + + + + + + + ir.attachment.simplified.form + ir.attachment + +
+ + +
+
+
+ +
+
diff --git a/account_payment_order/views/payment_order_create_view.xml b/account_payment_order/views/payment_order_create_view.xml new file mode 100644 index 000000000..8a6d69a47 --- /dev/null +++ b/account_payment_order/views/payment_order_create_view.xml @@ -0,0 +1,23 @@ + + + + + + + add.context.to.display.maturity.date + payment.order.create + + + + {'journal_type': 'sale'} + 1 + + + + + + diff --git a/account_payment_order/wizard/__init__.py b/account_payment_order/wizard/__init__.py new file mode 100644 index 000000000..0cbec9692 --- /dev/null +++ b/account_payment_order/wizard/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import account_payment_line_create diff --git a/account_payment_order/wizard/account_payment_line_create.py b/account_payment_order/wizard/account_payment_line_create.py new file mode 100644 index 000000000..944382de5 --- /dev/null +++ b/account_payment_order/wizard/account_payment_line_create.py @@ -0,0 +1,232 @@ +# -*- coding: utf-8 -*- +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# © 2014-2015 ACSONE SA/NV () +# © 2015-2016 Akretion () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import models, fields, api, _ + + +class AccountPaymentLineCreate(models.TransientModel): + _name = 'account.payment.line.create' + _description = 'Wizard to create payment lines' + + order_id = fields.Many2one( + 'account.payment.order', string='Payment Order') + journal_ids = fields.Many2many( + 'account.journal', string='Journals Filter') + invoice = fields.Boolean( + string='Linked to an Invoice or Refund') + date_type = fields.Selection([ + ('due', 'Due Date'), + ('move', 'Move Date'), + ], string="Type of Date Filter", required=True) + due_date = fields.Date(string="Due Date") + move_date = fields.Date( + string='Move Date', default=fields.Date.context_today) + payment_mode = fields.Selection([ + ('same', 'Same'), + ('same_or_null', 'Same or Empty'), + ('any', 'Any'), + ], string='Payment Mode') + move_line_ids = fields.Many2many( + 'account.move.line', string='Move Lines') + + @api.model + def default_get(self, field_list): + res = super(AccountPaymentLineCreate, self).default_get(field_list) + context = self.env.context + assert context.get('active_model') == 'account.payment.order',\ + 'active_model should be payment.order' + assert context.get('active_id'), 'Missing active_id in context !' + order = self.env['account.payment.order'].browse(context['active_id']) + mode = order.payment_mode_id + res.update({ + 'journal_ids': mode.default_journal_ids.ids or False, + 'invoice': mode.default_invoice, + 'date_type': mode.default_date_type, + 'payment_mode': mode.default_payment_mode, + 'order_id': order.id, + }) + return res + + @api.multi + def _prepare_move_line_domain(self): + self.ensure_one() + journals = self.journal_ids or self.env['account.journal'].search([]) + domain = [('move_id.state', '=', 'posted'), + ('reconciled', '=', False), + ('company_id', '=', self.order_id.company_id.id), + ('journal_id', 'in', journals.ids)] + if self.date_type == 'due': + domain += [ + '|', + ('date_maturity', '<=', self.due_date), + ('date_maturity', '=', False)] + elif self.date_type == 'move': + domain.append(('date', '<=', self.move_date)) + if self.invoice: + domain.append(('invoice_id', '!=', False)) + if self.payment_mode: + if self.payment_mode == 'same': + domain.append( + ('payment_mode_id', '=', self.order_id.payment_mode_id.id)) + elif self.payment_mode == 'same_or_null': + domain += [ + '|', + ('payment_mode_id', '=', False), + ('payment_mode_id', '=', self.order_id.payment_mode_id.id)] + + if self.order_id.payment_type == 'outbound': + # For payables, propose all unreconciled credit lines, + # including partially reconciled ones. + # If they are partially reconciled with a supplier refund, + # the residual will be added to the payment order. + # + # For receivables, propose all unreconciled credit lines. + # (ie customer refunds): they can be refunded with a payment. + # Do not propose partially reconciled credit lines, + # as they are deducted from a customer invoice, and + # 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 + ] + elif self.order_id.payment_type == 'inbound': + domain += [ + ('debit', '>', 0), + ('account_id.internal_type', '=', 'receivable'), + ] + return domain + + @api.multi + def populate(self): + domain = self._prepare_move_line_domain() + lines = self.env['account.move.line'].search(domain) + self.move_line_ids = [(6, 0, lines.ids)] + action = { + 'name': _('Select Move Lines to Create Transactions'), + 'type': 'ir.actions.act_window', + 'res_model': 'account.payment.line.create', + 'view_mode': 'form', + 'target': 'new', + 'res_id': self.id, + 'context': self._context, + } + return action + + @api.onchange( + 'date_type', 'move_date', 'due_date', 'journal_ids', 'invoice') + def move_line_filters_change(self): + domain = self._prepare_move_line_domain() + res = {'domain': {'move_line_ids': domain}} + return res + + @api.multi + def filter_lines(self, lines): + """ Filter move lines before proposing them for inclusion + in the payment order. + + This implementation filters out move lines that are already + included in draft or open payment orders. This prevents the + user to include the same line in two different open payment + orders. When the payment order is sent, it is assumed that + the move will be reconciled soon (or immediately with + account_banking_payment_transfer), so it will not be + proposed anymore for payment. + + See also https://github.com/OCA/bank-payment/issues/93. + + :param lines: recordset of move lines + :returns: list of move line ids + """ + self.ensure_one() + payment_lines = self.env['account.payment.line'].\ + search([('order_id.state', 'in', ('draft', 'open')), + ('move_line_id', 'in', lines.ids)]) + to_exclude = set([l.move_line_id.id for l in payment_lines]) + return [l.id for l in lines if l.id not in to_exclude] + + @api.multi + def _prepare_payment_line(self, payment, line): + """This function is designed to be inherited + The resulting dict is passed to the create method of payment.line""" + self.ensure_one() + _today = fields.Date.context_today(self) + date_to_pay = False # no payment date => immediate payment + if payment.date_prefered == 'due': + # -- account_banking + # date_to_pay = line.date_maturity + date_to_pay = ( + line.date_maturity + if line.date_maturity and line.date_maturity > _today + else False) + # -- end account banking + elif payment.date_prefered == 'fixed': + # -- account_banking + # date_to_pay = payment.date_scheduled + date_to_pay = ( + payment.date_scheduled + if payment.date_scheduled and payment.date_scheduled > _today + else False) + # -- end account banking + # -- account_banking + state = 'normal' + communication = line.ref or '-' + if line.invoice: + if line.invoice.reference_type == 'structured': + state = 'structured' + # Fallback to invoice number to keep previous behaviour + communication = line.invoice.reference or line.invoice.number + else: + if line.invoice.type in ('in_invoice', 'in_refund'): + communication = ( + line.invoice.reference or + line.invoice.supplier_invoice_number or line.ref) + else: + # Make sure that the communication includes the + # customer invoice number (in the case of debit order) + communication = line.invoice.number + # support debit orders when enabled + if line.debit > 0: + amount_currency = line.amount_residual_currency * -1 + else: + amount_currency = line.amount_residual_currency + if payment.payment_order_type == 'debit': + amount_currency *= -1 + line2bank = line.line2bank(payment.mode.id) + # -- end account banking + res = {'move_line_id': line.id, + 'amount_currency': amount_currency, + 'bank_id': line2bank.get(line.id), + 'order_id': payment.id, + 'partner_id': line.partner_id and line.partner_id.id or False, + # account banking + 'communication': communication, + 'state': state, + # end account banking + 'date': date_to_pay, + 'currency': (line.invoice and line.invoice.currency_id.id or + line.journal_id.currency.id or + line.journal_id.company_id.currency_id.id)} + return res + + @api.multi + def create_payment_lines(self): + if self.move_line_ids: + self.move_line_ids.create_payment_line_from_move_line( + self.order_id) + return True + # Force reload of payment order view as a workaround for lp:1155525 + return {'name': _('Payment Orders'), + 'context': context, + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': 'payment.order', + 'res_id': context['active_id'], + 'type': 'ir.actions.act_window'} diff --git a/account_payment_order/wizard/account_payment_line_create_view.xml b/account_payment_order/wizard/account_payment_line_create_view.xml new file mode 100644 index 000000000..85234ae2f --- /dev/null +++ b/account_payment_order/wizard/account_payment_line_create_view.xml @@ -0,0 +1,62 @@ + + + + + + + account_payment_line_create.form + account.payment.line.create + +
+ + + + + + + + +