From c7d69f24ac4c646237231ea9772c8082b12c601d Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Tue, 25 Feb 2025 10:31:32 +0100 Subject: [PATCH] UBL Integration --- .../account_payment_partner/README.rst | 128 +++++ .../account_payment_partner/__init__.py | 3 + .../account_payment_partner/__manifest__.py | 26 + .../demo/partner_demo.xml | 24 + .../i18n/account_payment_partner.pot | 165 ++++++ .../account_payment_partner/i18n/ca.po | 188 +++++++ .../account_payment_partner/i18n/da_DK.po | 177 +++++++ .../account_payment_partner/i18n/de.po | 184 +++++++ .../account_payment_partner/i18n/es.po | 193 +++++++ .../account_payment_partner/i18n/fr.po | 185 +++++++ .../account_payment_partner/i18n/hr.po | 177 +++++++ .../account_payment_partner/i18n/nb_NO.po | 178 +++++++ .../account_payment_partner/i18n/nl.po | 178 +++++++ .../account_payment_partner/i18n/pt_BR.po | 177 +++++++ .../account_payment_partner/i18n/sl.po | 177 +++++++ .../migrations/11.0.1.3.0/post-migrate.py | 12 + .../models/__init__.py | 5 + .../models/account_invoice.py | 140 ++++++ .../models/account_move_line.py | 16 + .../models/account_payment_mode.py | 49 ++ .../models/res_partner.py | 27 + .../readme/CONTRIBUTORS.rst | 11 + .../readme/DESCRIPTION.rst | 20 + .../readme/HISTORY.rst | 5 + .../account_payment_partner/readme/USAGE.rst | 9 + .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 471 ++++++++++++++++++ .../account_payment_partner/tests/__init__.py | 1 + .../tests/test_account_payment_partner.py | 382 ++++++++++++++ .../views/account_invoice_view.xml | 85 ++++ .../views/account_move_line.xml | 25 + .../views/account_payment_mode.xml | 24 + .../views/report_invoice.xml | 30 ++ .../views/res_partner_view.xml | 25 + 34 files changed, 3497 insertions(+) create mode 100644 ext/custom-addons/account_payment_partner/README.rst create mode 100644 ext/custom-addons/account_payment_partner/__init__.py create mode 100644 ext/custom-addons/account_payment_partner/__manifest__.py create mode 100644 ext/custom-addons/account_payment_partner/demo/partner_demo.xml create mode 100644 ext/custom-addons/account_payment_partner/i18n/account_payment_partner.pot create mode 100644 ext/custom-addons/account_payment_partner/i18n/ca.po create mode 100644 ext/custom-addons/account_payment_partner/i18n/da_DK.po create mode 100644 ext/custom-addons/account_payment_partner/i18n/de.po create mode 100644 ext/custom-addons/account_payment_partner/i18n/es.po create mode 100644 ext/custom-addons/account_payment_partner/i18n/fr.po create mode 100644 ext/custom-addons/account_payment_partner/i18n/hr.po create mode 100644 ext/custom-addons/account_payment_partner/i18n/nb_NO.po create mode 100644 ext/custom-addons/account_payment_partner/i18n/nl.po create mode 100644 ext/custom-addons/account_payment_partner/i18n/pt_BR.po create mode 100644 ext/custom-addons/account_payment_partner/i18n/sl.po create mode 100644 ext/custom-addons/account_payment_partner/migrations/11.0.1.3.0/post-migrate.py create mode 100644 ext/custom-addons/account_payment_partner/models/__init__.py create mode 100644 ext/custom-addons/account_payment_partner/models/account_invoice.py create mode 100644 ext/custom-addons/account_payment_partner/models/account_move_line.py create mode 100644 ext/custom-addons/account_payment_partner/models/account_payment_mode.py create mode 100644 ext/custom-addons/account_payment_partner/models/res_partner.py create mode 100644 ext/custom-addons/account_payment_partner/readme/CONTRIBUTORS.rst create mode 100644 ext/custom-addons/account_payment_partner/readme/DESCRIPTION.rst create mode 100644 ext/custom-addons/account_payment_partner/readme/HISTORY.rst create mode 100644 ext/custom-addons/account_payment_partner/readme/USAGE.rst create mode 100644 ext/custom-addons/account_payment_partner/static/description/icon.png create mode 100644 ext/custom-addons/account_payment_partner/static/description/index.html create mode 100644 ext/custom-addons/account_payment_partner/tests/__init__.py create mode 100644 ext/custom-addons/account_payment_partner/tests/test_account_payment_partner.py create mode 100644 ext/custom-addons/account_payment_partner/views/account_invoice_view.xml create mode 100644 ext/custom-addons/account_payment_partner/views/account_move_line.xml create mode 100644 ext/custom-addons/account_payment_partner/views/account_payment_mode.xml create mode 100644 ext/custom-addons/account_payment_partner/views/report_invoice.xml create mode 100644 ext/custom-addons/account_payment_partner/views/res_partner_view.xml diff --git a/ext/custom-addons/account_payment_partner/README.rst b/ext/custom-addons/account_payment_partner/README.rst new file mode 100644 index 00000000..addf682a --- /dev/null +++ b/ext/custom-addons/account_payment_partner/README.rst @@ -0,0 +1,128 @@ +======================= +Account Payment Partner +======================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:55dfff98536af3b8ce42e258219d2f3fc27ea744c28c8024d9590a791026b769 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github + :target: https://github.com/OCA/bank-payment/tree/11.0/account_payment_partner + :alt: OCA/bank-payment +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/bank-payment-11-0/bank-payment-11-0-account_payment_partner + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/bank-payment&target_branch=11.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds severals fields: + +* the *Supplier Payment Mode* and *Customer Payment Mode* on Partners, + +* the *Payment Mode* on Invoices. + +* the *Show bank account* on Payment Mode. + +* the *# of digits for customer bank account* on Payment Mode. + +* the *Bank account from journals* on Payment Mode. + +On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices will +be filtered per Payment Mode. + +Allows to print in the invoice to which account number the payment +(via SEPA direct debit) is going to be charged so the customer knows that +information, but there are some customers that don't want that everyone +looking at the invoice sees the full account number (and even GDPR can say a +word about that), so that's the reason behind the several options. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +You are able to add a payment mode directly on a partner. + +This payment mode is automatically associated to the invoice related to the +partner. This default value could be changed in a draft invoice. + +When you create a payment order, only invoices related to chosen payment mode +are displayed. + +Invoices without any payment mode are displayed too. + +Changelog +========= + +10.0.1.2.0 (2018-05-24) +~~~~~~~~~~~~~~~~~~~~~~~ + +* [IMP] Add options to show partner bank account in invoice report + (`#458 `_) + +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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Akretion +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Alexis de Lattre +* Raphaël Valyi +* Stefan Rijnhart (Therp) +* Alexandre Fayolle +* Stéphane Bidoul +* Danimar Ribeiro +* Angel Moya +* `Tecnativa `_: + + * Pedro M. Baeza + * Carlos Dauden + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +This module is part of the `OCA/bank-payment `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/ext/custom-addons/account_payment_partner/__init__.py b/ext/custom-addons/account_payment_partner/__init__.py new file mode 100644 index 00000000..83e553ac --- /dev/null +++ b/ext/custom-addons/account_payment_partner/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/ext/custom-addons/account_payment_partner/__manifest__.py b/ext/custom-addons/account_payment_partner/__manifest__.py new file mode 100644 index 00000000..73b2a7c9 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/__manifest__.py @@ -0,0 +1,26 @@ +# Copyright 2014 Akretion - Alexis de Lattre +# Copyright 2014 Tecnativa - Pedro M. Baeza +# Copyright 2018 Tecnativa - Carlos Dauden +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + 'name': 'Account Payment Partner', + 'version': '11.0.1.4.0', + 'category': 'Banking addons', + 'license': 'AGPL-3', + 'summary': 'Adds payment mode on partners and invoices', + 'author': "Akretion, " + "Tecnativa, " + "Odoo Community Association (OCA)", + 'website': 'https://github.com/OCA/bank-payment', + 'depends': ['account_payment_mode'], + 'data': [ + 'views/res_partner_view.xml', + 'views/account_invoice_view.xml', + 'views/account_move_line.xml', + 'views/account_payment_mode.xml', + 'views/report_invoice.xml', + ], + 'demo': ['demo/partner_demo.xml'], + 'installable': True, +} diff --git a/ext/custom-addons/account_payment_partner/demo/partner_demo.xml b/ext/custom-addons/account_payment_partner/demo/partner_demo.xml new file mode 100644 index 00000000..bf5b8b75 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/demo/partner_demo.xml @@ -0,0 +1,24 @@ + + + + + + Default Supplier Payment Mode + + + + + + + Default Customer Payment Mode + + + + + + + diff --git a/ext/custom-addons/account_payment_partner/i18n/account_payment_partner.pot b/ext/custom-addons/account_payment_partner/i18n/account_payment_partner.pot new file mode 100644 index 00000000..00ff3e8f --- /dev/null +++ b/ext/custom-addons/account_payment_partner/i18n/account_payment_partner.pot @@ -0,0 +1,165 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "# of chars" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_chars +msgid "# of digits for customer bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Bank Account:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Payment Mode:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_invoice_bank_account_required +msgid "Activate this option if this payment method requires you to know the bank account number of your customer or supplier." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_bank_account_required +msgid "Bank Account Required" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_from_journal +msgid "Bank account from journals" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Contact" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Customer Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "First n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Full" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Last n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "No" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/tests/test_account_payment_partner.py:35 +#, python-format +msgid "No Chart of Account Template has been defined !" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_account_move_line_payment_mode_id +#: model:ir.ui.view,arch_db:account_payment_partner.view_account_invoice_filter +msgid "Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_payment_mode +msgid "Payment Modes" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.view_move_line_form +msgid "Payments" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Select the default payment mode for this customer." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Select the default payment mode for this supplier." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "Show bank account in invoice report" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show in invoices partial or full bank account number" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Supplier Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_invoice.py:122 +#, python-format +msgid "The company of the invoice %s does not match with that of the payment mode" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:35 +#, python-format +msgid "You cannot change the Company. There exists at least one Invoice with this Payment Mode, already assigned to another Company." +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:46 +#, python-format +msgid "You cannot change the Company. There exists at least one Journal Item with this Payment Mode, already assigned to another Company." +msgstr "" + diff --git a/ext/custom-addons/account_payment_partner/i18n/ca.po b/ext/custom-addons/account_payment_partner/i18n/ca.po new file mode 100644 index 00000000..157ae72e --- /dev/null +++ b/ext/custom-addons/account_payment_partner/i18n/ca.po @@ -0,0 +1,188 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-02 03:43+0000\n" +"PO-Revision-Date: 2019-03-15 12:53+0000\n" +"Last-Translator: Jaume Planas \n" +"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "# of chars" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_chars +msgid "# of digits for customer bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Bank Account:" +msgstr "Compte bancari:" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Payment Mode:" +msgstr "Mode de pagament:" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_invoice_bank_account_required +msgid "" +"Activate this option if this payment method requires you to know the bank " +"account number of your customer or supplier." +msgstr "" +"Activeu aquesta opció si aquest mètode de pagament ha de demanar el número " +"de compte bancari del client o proveïdor." + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_bank_account_required +msgid "Bank Account Required" +msgstr "Compte bancari necessari" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_from_journal +msgid "Bank account from journals" +msgstr "Compte bancari dels diaris" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Contact" +msgstr "Contacte" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Customer Payment Mode" +msgstr "Mode de pagament del client" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "First n chars" +msgstr "Primers n caràcters" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Full" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_move_line +msgid "Journal Item" +msgstr "Apunt comptable" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Last n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "No" +msgstr "No" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/tests/test_account_payment_partner.py:35 +#, python-format +msgid "No Chart of Account Template has been defined !" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_account_move_line_payment_mode_id +#: model:ir.ui.view,arch_db:account_payment_partner.view_account_invoice_filter +msgid "Payment Mode" +msgstr "Mode de pagament" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_payment_mode +msgid "Payment Modes" +msgstr "Modes de pagament" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.view_move_line_form +msgid "Payments" +msgstr "Pagaments" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Select the default payment mode for this customer." +msgstr "" +"Seleccioneu el mode de pagament per defecte quan aquesta empresa actua com a " +"client." + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Select the default payment mode for this supplier." +msgstr "" +"Seleccioneu el mode de pagament per defecte quan aquesta empresa actua com a " +"proveïdor." + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show bank account" +msgstr "Mostra el compte bancari" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "Show bank account in invoice report" +msgstr "Mostra el compte bancari a la factura impresa" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show in invoices partial or full bank account number" +msgstr "Mostra a les factures el número de compte bancari parcial o complet" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Supplier Payment Mode" +msgstr "Mode de pagament de proveïdor" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_invoice.py:122 +#, python-format +msgid "" +"The company of the invoice %s does not match with that of the payment mode" +msgstr "" +"La companyia de la factura %s no coincideix amb la del mode de pagament" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:35 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Invoice with this " +"Payment Mode, already assigned to another Company." +msgstr "" +"No podeu canviar la companyia. Existeix com a mínim una factura amb aquest " +"mode de pagament que ja s'ha assignat a una altra companyia." + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:46 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Journal Item with " +"this Payment Mode, already assigned to another Company." +msgstr "" +"No podeu canviar la companyia. Com a mínim existeix un apunt comptable amb " +"aquest mode de pagament que ja s'ha assignat a una altra companyia." diff --git a/ext/custom-addons/account_payment_partner/i18n/da_DK.po b/ext/custom-addons/account_payment_partner/i18n/da_DK.po new file mode 100644 index 00000000..8341c75b --- /dev/null +++ b/ext/custom-addons/account_payment_partner/i18n/da_DK.po @@ -0,0 +1,177 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-02 03:43+0000\n" +"PO-Revision-Date: 2018-02-02 03:43+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Danish (Denmark) (https://www.transifex.com/oca/teams/23907/" +"da_DK/)\n" +"Language: da_DK\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "# of chars" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_chars +msgid "# of digits for customer bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Bank Account:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Payment Mode:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_invoice_bank_account_required +msgid "" +"Activate this option if this payment method requires you to know the bank " +"account number of your customer or supplier." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_bank_account_required +msgid "Bank Account Required" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_from_journal +msgid "Bank account from journals" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Contact" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Customer Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "First n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Full" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Last n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "No" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/tests/test_account_payment_partner.py:35 +#, python-format +msgid "No Chart of Account Template has been defined !" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_account_move_line_payment_mode_id +#: model:ir.ui.view,arch_db:account_payment_partner.view_account_invoice_filter +msgid "Payment Mode" +msgstr "Betalingsform" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_payment_mode +msgid "Payment Modes" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.view_move_line_form +msgid "Payments" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Select the default payment mode for this customer." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Select the default payment mode for this supplier." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "Show bank account in invoice report" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show in invoices partial or full bank account number" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Supplier Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_invoice.py:122 +#, python-format +msgid "" +"The company of the invoice %s does not match with that of the payment mode" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:35 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Invoice with this " +"Payment Mode, already assigned to another Company." +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:46 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Journal Item with " +"this Payment Mode, already assigned to another Company." +msgstr "" diff --git a/ext/custom-addons/account_payment_partner/i18n/de.po b/ext/custom-addons/account_payment_partner/i18n/de.po new file mode 100644 index 00000000..7468aa9b --- /dev/null +++ b/ext/custom-addons/account_payment_partner/i18n/de.po @@ -0,0 +1,184 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 03:38+0000\n" +"PO-Revision-Date: 2019-02-15 15:34+0000\n" +"Last-Translator: Thorsten Vocks \n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "# of chars" +msgstr "# Zeichen" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_chars +msgid "# of digits for customer bank account" +msgstr "# Zeichen für Kunden Bankkonto" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Bank Account:" +msgstr "Bankkonto:" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Payment Mode:" +msgstr "Zahlungsmodus:" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_invoice_bank_account_required +msgid "" +"Activate this option if this payment method requires you to know the bank " +"account number of your customer or supplier." +msgstr "" +"Aktivieren Sie diese Option, wenn mit dieser Zahlungsmethode die " +"Bankkontonummer des Kunden oder Lieferanten bekannt sein muss." + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_bank_account_required +msgid "Bank Account Required" +msgstr "Bankkonto erforderlich" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_from_journal +msgid "Bank account from journals" +msgstr "Bankkonto des Journals" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Contact" +msgstr "Kontakt" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Customer Payment Mode" +msgstr "Zahlungsmethode des Kunden" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "First n chars" +msgstr "Ersten n Zeichen" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Full" +msgstr "Vollständig" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "Rechnung" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_move_line +msgid "Journal Item" +msgstr "Buchung" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Last n chars" +msgstr "Letzten n Zeichen" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "No" +msgstr "Nein" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/tests/test_account_payment_partner.py:35 +#, python-format +msgid "No Chart of Account Template has been defined !" +msgstr "Es wurde keine Kontenplanvorlage definiert!" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_account_move_line_payment_mode_id +#: model:ir.ui.view,arch_db:account_payment_partner.view_account_invoice_filter +msgid "Payment Mode" +msgstr "Zahlungsmodus" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_payment_mode +msgid "Payment Modes" +msgstr "Zahlungsmodi" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.view_move_line_form +msgid "Payments" +msgstr "Zahlungen" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Select the default payment mode for this customer." +msgstr "Wählen Sie die Standard Zahlungsmethode für diesen Kunden." + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Select the default payment mode for this supplier." +msgstr "Wählen Sie die Standard Zahlungsmethode für diesen Lieferanten." + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show bank account" +msgstr "Bankkonto anzeigen" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "Show bank account in invoice report" +msgstr "Bankkonto in Rechnung anzeigen" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show in invoices partial or full bank account number" +msgstr "Teilweise oder vollständige Bankkontoanzeige in Rechnungen" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Supplier Payment Mode" +msgstr "Zahlungsmethode des Lieferanten" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_invoice.py:122 +#, python-format +msgid "" +"The company of the invoice %s does not match with that of the payment mode" +msgstr "" +"Das Unternehmen zur Rechnung %s entspricht nicht demjenigen des Zahlungsmodus" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:35 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Invoice with this " +"Payment Mode, already assigned to another Company." +msgstr "" +"Sie können das Unternehmen nicht ändern. Es existiert mindestens eine " +"Rechnung eines anderen Unternehmens mit dieser Zahlungsmethode." + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:46 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Journal Item with " +"this Payment Mode, already assigned to another Company." +msgstr "" +"Sie können das Unternehmen nicht ändern. Es existiert mindestens eine " +"Rechnung eines anderen Unternehmens mit dieser Zahlungsmethode." diff --git a/ext/custom-addons/account_payment_partner/i18n/es.po b/ext/custom-addons/account_payment_partner/i18n/es.po new file mode 100644 index 00000000..91e4bcba --- /dev/null +++ b/ext/custom-addons/account_payment_partner/i18n/es.po @@ -0,0 +1,193 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 03:38+0000\n" +"PO-Revision-Date: 2018-07-13 09:23+0000\n" +"Last-Translator: Enric Tobella \n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.0.1\n" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "# of chars" +msgstr "Nº de caracteres" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_chars +msgid "# of digits for customer bank account" +msgstr "Nº de dígitos de cuenta bancaria del cliente" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Bank Account:" +msgstr "Cuenta bancaria:" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Payment Mode:" +msgstr "Modo de pago:" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_invoice_bank_account_required +msgid "" +"Activate this option if this payment method requires you to know the bank " +"account number of your customer or supplier." +msgstr "" +"Activa esta opción si este método de pago debe requerirte informar el número " +"de cuenta bancaria de tu cliente o proveedor" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_bank_account_required +msgid "Bank Account Required" +msgstr "Cuenta bancaria requerida" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_from_journal +msgid "Bank account from journals" +msgstr "Cuenta bancaria de los diarios" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Contact" +msgstr "Contacto" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Customer Payment Mode" +msgstr "Modo de pago de cliente" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "First n chars" +msgstr "Primeros n caracteres" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Full" +msgstr "Completo" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_move_line +msgid "Journal Item" +msgstr "Apunte contable" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Last n chars" +msgstr "Últimos n caracteres" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "No" +msgstr "No" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/tests/test_account_payment_partner.py:35 +#, python-format +msgid "No Chart of Account Template has been defined !" +msgstr "No se ha definido un Plan Contable!" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_account_move_line_payment_mode_id +#: model:ir.ui.view,arch_db:account_payment_partner.view_account_invoice_filter +msgid "Payment Mode" +msgstr "Modo de pago" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_payment_mode +msgid "Payment Modes" +msgstr "Modos de pago" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.view_move_line_form +msgid "Payments" +msgstr "Pagos" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Select the default payment mode for this customer." +msgstr "" +"Seleccione el modo de pago por defecto cuando esta empresa actúa como " +"cliente." + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Select the default payment mode for this supplier." +msgstr "" +"Seleccione el modo de pago por defecto cuando esta empresa actúa como " +"proveedor." + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show bank account" +msgstr "Mostrar cuenta bancaria" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "Show bank account in invoice report" +msgstr "Mostrar cuenta bancaria en informe factura" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show in invoices partial or full bank account number" +msgstr "Mostrar en facturas nº de cuenta bancaria parcial o completo" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Supplier Payment Mode" +msgstr "Modo de pago de proveedor" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_invoice.py:122 +#, python-format +msgid "" +"The company of the invoice %s does not match with that of the payment mode" +msgstr "La compañía de la factura %s no corresponde con la del modo de pago" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:35 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Invoice with this " +"Payment Mode, already assigned to another Company." +msgstr "" +"No puede cambiar la Compañía. Ya existe como mínimo una Factura para este " +"Modo de Pago asignado a otra Compañía." + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:46 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Journal Item with " +"this Payment Mode, already assigned to another Company." +msgstr "" +"No puede cambiar la Compañía. Existe como mínimo una elemento del Diario con " +"este Modo de Pago que ya está asignado a otra Compañía." + +#~ msgid "Partner" +#~ msgstr "Empresa" + +#~ msgid "Payment Methods" +#~ msgstr "Métodos de pago" diff --git a/ext/custom-addons/account_payment_partner/i18n/fr.po b/ext/custom-addons/account_payment_partner/i18n/fr.po new file mode 100644 index 00000000..ef0ada7c --- /dev/null +++ b/ext/custom-addons/account_payment_partner/i18n/fr.po @@ -0,0 +1,185 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +# Translators: +# OCA Transbot , 2017 +# Quentin THEURET , 2018 +# Nicolas JEUDY , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-05-23 11:14+0000\n" +"PO-Revision-Date: 2018-05-23 11:14+0000\n" +"Last-Translator: Nicolas JEUDY , 2018\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "# of chars" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_chars +msgid "# of digits for customer bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Bank Account:" +msgstr "Compte bancaire:" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Payment Mode:" +msgstr "Mode de paiement :" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_invoice_bank_account_required +msgid "" +"Activate this option if this payment method requires you to know the bank " +"account number of your customer or supplier." +msgstr "" +"Activez cette option si ce mode de paiement exige que vous connaissiez le " +"numéro de compte bancaire de votre client ou fournisseur." + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_bank_account_required +msgid "Bank Account Required" +msgstr "Compte bancaire requis" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_from_journal +msgid "Bank account from journals" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Contact" +msgstr "Contacte" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Customer Payment Mode" +msgstr "Mode de paiement client" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "First n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Full" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "Facture" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_move_line +msgid "Journal Item" +msgstr "Élément de journal" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Last n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "No" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/tests/test_account_payment_partner.py:35 +#, python-format +msgid "No Chart of Account Template has been defined !" +msgstr "Aucun modèle de plan comptable n'a été défini !" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_account_move_line_payment_mode_id +#: model:ir.ui.view,arch_db:account_payment_partner.view_account_invoice_filter +msgid "Payment Mode" +msgstr "Mode de paiement" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_payment_mode +msgid "Payment Modes" +msgstr "Mode de paiement" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.view_move_line_form +msgid "Payments" +msgstr "Règlements" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Select the default payment mode for this customer." +msgstr "Sélectionnez le mode de paiement par défaut pour ce client." + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Select the default payment mode for this supplier." +msgstr "Sélectionnez le mode de paiement par défaut pour ce fournisseur." + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "Show bank account in invoice report" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show in invoices partial or full bank account number" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Supplier Payment Mode" +msgstr "Mode de règlement fournisseur" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_invoice.py:122 +#, python-format +msgid "" +"The company of the invoice %s does not match with that of the payment mode" +msgstr "" +"La société de la facture %s ne correspond pas à celle du mode de paiement" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:35 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Invoice with this " +"Payment Mode, already assigned to another Company." +msgstr "" +"Vous ne pouvez pas modifier la Société. Il existe au moins une facture avec " +"ce mode de paiement, déjà affectée à une autre société." + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:46 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Journal Item with " +"this Payment Mode, already assigned to another Company." +msgstr "" +"Vous ne pouvez pas modifier la Société. Il existe au moins un poste " +"journalier avec ce mode de paiement, déjà affecté à une autre société." diff --git a/ext/custom-addons/account_payment_partner/i18n/hr.po b/ext/custom-addons/account_payment_partner/i18n/hr.po new file mode 100644 index 00000000..6cbb8e90 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/i18n/hr.po @@ -0,0 +1,177 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 03:38+0000\n" +"PO-Revision-Date: 2017-11-23 03:38+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "# of chars" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_chars +msgid "# of digits for customer bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Bank Account:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Payment Mode:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_invoice_bank_account_required +msgid "" +"Activate this option if this payment method requires you to know the bank " +"account number of your customer or supplier." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_bank_account_required +msgid "Bank Account Required" +msgstr "Bankovni račun je obavezan" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_from_journal +msgid "Bank account from journals" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Contact" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Customer Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "First n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Full" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Last n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "No" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/tests/test_account_payment_partner.py:35 +#, python-format +msgid "No Chart of Account Template has been defined !" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_account_move_line_payment_mode_id +#: model:ir.ui.view,arch_db:account_payment_partner.view_account_invoice_filter +msgid "Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_payment_mode +msgid "Payment Modes" +msgstr "Modeli plaćanja" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.view_move_line_form +msgid "Payments" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Select the default payment mode for this customer." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Select the default payment mode for this supplier." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "Show bank account in invoice report" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show in invoices partial or full bank account number" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Supplier Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_invoice.py:122 +#, python-format +msgid "" +"The company of the invoice %s does not match with that of the payment mode" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:35 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Invoice with this " +"Payment Mode, already assigned to another Company." +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:46 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Journal Item with " +"this Payment Mode, already assigned to another Company." +msgstr "" diff --git a/ext/custom-addons/account_payment_partner/i18n/nb_NO.po b/ext/custom-addons/account_payment_partner/i18n/nb_NO.po new file mode 100644 index 00000000..448c0e04 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/i18n/nb_NO.po @@ -0,0 +1,178 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +# Translators: +# Imre Kristoffer Eilertsen , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-30 07:37+0000\n" +"PO-Revision-Date: 2016-07-30 07:37+0000\n" +"Last-Translator: Imre Kristoffer Eilertsen , 2016\n" +"Language-Team: Norwegian Bokmål (Norway) (https://www.transifex.com/oca/" +"teams/23907/nb_NO/)\n" +"Language: nb_NO\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "# of chars" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_chars +msgid "# of digits for customer bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Bank Account:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Payment Mode:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_invoice_bank_account_required +msgid "" +"Activate this option if this payment method requires you to know the bank " +"account number of your customer or supplier." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_bank_account_required +msgid "Bank Account Required" +msgstr "Bankkonto påkrevd" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_from_journal +msgid "Bank account from journals" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Contact" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Customer Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "First n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Full" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_move_line +msgid "Journal Item" +msgstr "Journalgjenstand" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Last n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "No" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/tests/test_account_payment_partner.py:35 +#, python-format +msgid "No Chart of Account Template has been defined !" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_account_move_line_payment_mode_id +#: model:ir.ui.view,arch_db:account_payment_partner.view_account_invoice_filter +msgid "Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_payment_mode +#, fuzzy +msgid "Payment Modes" +msgstr "Betalinger" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.view_move_line_form +msgid "Payments" +msgstr "Betalinger" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Select the default payment mode for this customer." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Select the default payment mode for this supplier." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "Show bank account in invoice report" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show in invoices partial or full bank account number" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Supplier Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_invoice.py:122 +#, python-format +msgid "" +"The company of the invoice %s does not match with that of the payment mode" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:35 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Invoice with this " +"Payment Mode, already assigned to another Company." +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:46 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Journal Item with " +"this Payment Mode, already assigned to another Company." +msgstr "" diff --git a/ext/custom-addons/account_payment_partner/i18n/nl.po b/ext/custom-addons/account_payment_partner/i18n/nl.po new file mode 100644 index 00000000..af7f4def --- /dev/null +++ b/ext/custom-addons/account_payment_partner/i18n/nl.po @@ -0,0 +1,178 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 03:38+0000\n" +"PO-Revision-Date: 2017-11-23 03:38+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "# of chars" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_chars +msgid "# of digits for customer bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Bank Account:" +msgstr "Bankrekening:" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Payment Mode:" +msgstr "Betaalmode:" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_invoice_bank_account_required +msgid "" +"Activate this option if this payment method requires you to know the bank " +"account number of your customer or supplier." +msgstr "" +"Activeer deze optie als de betaalwijze verwacht dat u het bankrekeningnummer " +"van uw klant of leverancier kent." + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_bank_account_required +msgid "Bank Account Required" +msgstr "Bankrekening verplicht" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_from_journal +msgid "Bank account from journals" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Contact" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Customer Payment Mode" +msgstr "Betaalwijze klant" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "First n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Full" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "Factuur" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_move_line +msgid "Journal Item" +msgstr "Boekingsregel" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Last n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "No" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/tests/test_account_payment_partner.py:35 +#, python-format +msgid "No Chart of Account Template has been defined !" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_account_move_line_payment_mode_id +#: model:ir.ui.view,arch_db:account_payment_partner.view_account_invoice_filter +msgid "Payment Mode" +msgstr "Betaalwijze" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_payment_mode +msgid "Payment Modes" +msgstr "Betaalwijze" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.view_move_line_form +msgid "Payments" +msgstr "Betalingen" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Select the default payment mode for this customer." +msgstr "Selecteer de standaard betaalwijze voor deze klant." + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Select the default payment mode for this supplier." +msgstr "Selecteer de standaard betaalwijze voor deze leverancier." + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "Show bank account in invoice report" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show in invoices partial or full bank account number" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Supplier Payment Mode" +msgstr "Betaalwijze leverancier" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_invoice.py:122 +#, python-format +msgid "" +"The company of the invoice %s does not match with that of the payment mode" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:35 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Invoice with this " +"Payment Mode, already assigned to another Company." +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:46 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Journal Item with " +"this Payment Mode, already assigned to another Company." +msgstr "" diff --git a/ext/custom-addons/account_payment_partner/i18n/pt_BR.po b/ext/custom-addons/account_payment_partner/i18n/pt_BR.po new file mode 100644 index 00000000..321f9042 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/i18n/pt_BR.po @@ -0,0 +1,177 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 03:38+0000\n" +"PO-Revision-Date: 2017-11-23 03:38+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "# of chars" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_chars +msgid "# of digits for customer bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Bank Account:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Payment Mode:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_invoice_bank_account_required +msgid "" +"Activate this option if this payment method requires you to know the bank " +"account number of your customer or supplier." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_bank_account_required +msgid "Bank Account Required" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_from_journal +msgid "Bank account from journals" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Contact" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Customer Payment Mode" +msgstr "Modo de Pagamento do Cliente" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "First n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Full" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "Fatura" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Last n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "No" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/tests/test_account_payment_partner.py:35 +#, python-format +msgid "No Chart of Account Template has been defined !" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_account_move_line_payment_mode_id +#: model:ir.ui.view,arch_db:account_payment_partner.view_account_invoice_filter +msgid "Payment Mode" +msgstr "Modo de Pagamento" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_payment_mode +msgid "Payment Modes" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.view_move_line_form +msgid "Payments" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Select the default payment mode for this customer." +msgstr "Selecione o modo de pagamento padrão para este cliente." + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Select the default payment mode for this supplier." +msgstr "Selecione o modo de pagamento padrão para este fornecedor." + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "Show bank account in invoice report" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show in invoices partial or full bank account number" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Supplier Payment Mode" +msgstr "Modo de Pagamento do Fornecedor" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_invoice.py:122 +#, python-format +msgid "" +"The company of the invoice %s does not match with that of the payment mode" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:35 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Invoice with this " +"Payment Mode, already assigned to another Company." +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:46 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Journal Item with " +"this Payment Mode, already assigned to another Company." +msgstr "" diff --git a/ext/custom-addons/account_payment_partner/i18n/sl.po b/ext/custom-addons/account_payment_partner/i18n/sl.po new file mode 100644 index 00000000..8eff9c68 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/i18n/sl.po @@ -0,0 +1,177 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 03:38+0000\n" +"PO-Revision-Date: 2017-11-23 03:38+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \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_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "# of chars" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_chars +msgid "# of digits for customer bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Bank Account:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.report_invoice_payment_mode +msgid "Payment Mode:" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_invoice_bank_account_required +msgid "" +"Activate this option if this payment method requires you to know the bank " +"account number of your customer or supplier." +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_bank_account_required +msgid "Bank Account Required" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account_from_journal +msgid "Bank account from journals" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Contact" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Customer Payment Mode" +msgstr "Metoda plačila kupca" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "First n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Full" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "Račun" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "Last n chars" +msgstr "" + +#. module: account_payment_partner +#: selection:account.payment.mode,show_bank_account:0 +msgid "No" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/tests/test_account_payment_partner.py:35 +#, python-format +msgid "No Chart of Account Template has been defined !" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_invoice_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_account_move_line_payment_mode_id +#: model:ir.ui.view,arch_db:account_payment_partner.view_account_invoice_filter +msgid "Payment Mode" +msgstr "Metoda plačila" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_payment_mode +msgid "Payment Modes" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.view_move_line_form +msgid "Payments" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_customer_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_customer_payment_mode_id +msgid "Select the default payment mode for this customer." +msgstr "Izbira privzete metode plačila za tega kupca." + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,help:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Select the default payment mode for this supplier." +msgstr "Izbira privzete metode plačila za tega dobavitelja." + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show bank account" +msgstr "" + +#. module: account_payment_partner +#: model:ir.ui.view,arch_db:account_payment_partner.account_payment_mode_form +msgid "Show bank account in invoice report" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,help:account_payment_partner.field_account_payment_mode_show_bank_account +msgid "Show in invoices partial or full bank account number" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model.fields,field_description:account_payment_partner.field_res_partner_supplier_payment_mode_id +#: model:ir.model.fields,field_description:account_payment_partner.field_res_users_supplier_payment_mode_id +msgid "Supplier Payment Mode" +msgstr "Metoda plačila dobavitelja" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_invoice.py:122 +#, python-format +msgid "" +"The company of the invoice %s does not match with that of the payment mode" +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:35 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Invoice with this " +"Payment Mode, already assigned to another Company." +msgstr "" + +#. module: account_payment_partner +#: code:addons/account_payment_partner/models/account_payment_mode.py:46 +#, python-format +msgid "" +"You cannot change the Company. There exists at least one Journal Item with " +"this Payment Mode, already assigned to another Company." +msgstr "" diff --git a/ext/custom-addons/account_payment_partner/migrations/11.0.1.3.0/post-migrate.py b/ext/custom-addons/account_payment_partner/migrations/11.0.1.3.0/post-migrate.py new file mode 100644 index 00000000..e63be714 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/migrations/11.0.1.3.0/post-migrate.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# Copyright 2018 Carlos Dauden - Tecnativa +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + + +def migrate(cr, version): + """Update database from previous versions, after updating module.""" + cr.execute( + "UPDATE account_payment_mode " + "SET show_bank_account_from_journal = true " + "WHERE bank_account_link = 'fixed'" + ) diff --git a/ext/custom-addons/account_payment_partner/models/__init__.py b/ext/custom-addons/account_payment_partner/models/__init__.py new file mode 100644 index 00000000..6237433e --- /dev/null +++ b/ext/custom-addons/account_payment_partner/models/__init__.py @@ -0,0 +1,5 @@ + +from . import res_partner +from . import account_invoice +from . import account_move_line +from . import account_payment_mode diff --git a/ext/custom-addons/account_payment_partner/models/account_invoice.py b/ext/custom-addons/account_payment_partner/models/account_invoice.py new file mode 100644 index 00000000..0a57d1db --- /dev/null +++ b/ext/custom-addons/account_payment_partner/models/account_invoice.py @@ -0,0 +1,140 @@ +# Copyright 2014-16 Akretion - Alexis de Lattre +# Copyright 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class AccountInvoice(models.Model): + _inherit = 'account.invoice' + + payment_mode_id = fields.Many2one( + comodel_name='account.payment.mode', string="Payment Mode", + ondelete='restrict', + readonly=True, states={'draft': [('readonly', False)]}) + bank_account_required = fields.Boolean( + related='payment_mode_id.payment_method_id.bank_account_required', + readonly=True) + partner_bank_id = fields.Many2one(ondelete='restrict') + + @api.onchange('partner_id', 'company_id') + def _onchange_partner_id(self): + if self.company_id: + company = self.company_id + else: + company = self.env.user.company_id + res = super(AccountInvoice, self)._onchange_partner_id() + if self.partner_id: + if self.type == 'in_invoice': + pay_mode = self.with_context( + force_company=company.id + ).partner_id.supplier_payment_mode_id + self.payment_mode_id = pay_mode + if ( + pay_mode and + pay_mode.payment_type == 'outbound' and + pay_mode.payment_method_id.bank_account_required and + self.commercial_partner_id.bank_ids + ): + self.partner_bank_id = \ + self.commercial_partner_id.bank_ids.filtered( + lambda b: b.company_id == company or not + b.company_id)[:1] + else: + self.partner_bank_id = False + + elif self.type == 'out_invoice': + # No bank account assignation is done here as this is only + # needed for printing purposes and it can conflict with + # SEPA direct debit payments. Current report prints it. + self.payment_mode_id = self.with_context( + force_company=company.id, + ).partner_id.customer_payment_mode_id + else: + self.payment_mode_id = False + if self.type == 'in_invoice': + self.partner_bank_id = False + return res + + @api.onchange('payment_mode_id') + def _onchange_payment_mode_id(self): + pay_mode = self.payment_mode_id + if ( + pay_mode and + pay_mode.payment_type == 'outbound' and not + pay_mode.payment_method_id.bank_account_required + ): + self.partner_bank_id = False + elif not self.payment_mode_id: + self.partner_bank_id = False + + @api.model + def create(self, vals): + """Fill the payment_mode_id from the partner if none is provided on + creation, using same method as upstream.""" + + onchanges = { + '_onchange_partner_id': ['payment_mode_id'], + } + for onchange_method, changed_fields in onchanges.items(): + if any(f not in vals for f in changed_fields): + invoice = self.new(vals) + getattr(invoice, onchange_method)() + for field in changed_fields: + if field not in vals and invoice[field]: + vals[field] = invoice._fields[field].convert_to_write( + invoice[field], invoice, + ) + return super(AccountInvoice, self).create(vals) + + @api.model + def line_get_convert(self, line, part): + """Copy payment mode 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']) + res['payment_mode_id'] = invoice.payment_mode_id.id or False + return res + + # I think copying payment mode from invoice to refund by default + # is a good idea because the most common way of "paying" a refund is to + # deduct it on the payment of the next invoice (and OCA/bank-payment + # allows to have negative payment lines since March 2016) + @api.model + def _prepare_refund( + self, invoice, date_invoice=None, date=None, description=None, + journal_id=None): + vals = super(AccountInvoice, self)._prepare_refund( + invoice, date_invoice=date_invoice, date=date, + description=description, journal_id=journal_id) + vals['payment_mode_id'] = invoice.payment_mode_id.id + if invoice.type == 'in_invoice': + vals['partner_bank_id'] = invoice.partner_bank_id.id + return vals + + @api.constrains('company_id', 'payment_mode_id') + def _check_payment_mode_company_constrains(self): + for rec in self.sudo(): + if (rec.payment_mode_id and rec.company_id != + rec.payment_mode_id.company_id): + raise ValidationError( + _("The company of the invoice %s does not match " + "with that of the payment mode") % rec.name) + + def partner_banks_to_show(self): + self.ensure_one() + if self.partner_bank_id: + return self.partner_bank_id + if self.payment_mode_id.show_bank_account_from_journal: + if self.payment_mode_id.bank_account_link == 'fixed': + return self.payment_mode_id.fixed_journal_id.bank_account_id + else: + return self.payment_mode_id.variable_journal_ids.mapped( + 'bank_account_id') + if self.payment_mode_id.payment_method_id.code == \ + 'sepa_direct_debit': # pragma: no cover + return (self.mandate_id.partner_bank_id or + self.partner_id.valid_mandate_id.partner_bank_id) + # Return this as empty recordset + return self.partner_bank_id diff --git a/ext/custom-addons/account_payment_partner/models/account_move_line.py b/ext/custom-addons/account_payment_partner/models/account_move_line.py new file mode 100644 index 00000000..1a8e78bd --- /dev/null +++ b/ext/custom-addons/account_payment_partner/models/account_move_line.py @@ -0,0 +1,16 @@ +# Copyright 2016 Akretion (http://www.akretion.com/) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class AccountMoveLine(models.Model): + _inherit = 'account.move.line' + + payment_mode_id = fields.Many2one( + 'account.payment.mode', + string='Payment Mode', + domain="[('company_id', '=', company_id)]", + ondelete='restrict', + index=True, + ) diff --git a/ext/custom-addons/account_payment_partner/models/account_payment_mode.py b/ext/custom-addons/account_payment_partner/models/account_payment_mode.py new file mode 100644 index 00000000..861b749f --- /dev/null +++ b/ext/custom-addons/account_payment_partner/models/account_payment_mode.py @@ -0,0 +1,49 @@ +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2018 Carlos Dauden - Tecnativa +# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class AccountPaymentMode(models.Model): + _inherit = "account.payment.mode" + + show_bank_account = fields.Selection( + selection=[ + ('full', 'Full'), + ('first', 'First n chars'), + ('last', 'Last n chars'), + ('no', 'No'), + ], + string='Show bank account', + default='full', + help="Show in invoices partial or full bank account number") + show_bank_account_from_journal = fields.Boolean( + string='Bank account from journals' + ) + show_bank_account_chars = fields.Integer( + string="# of digits for customer bank account", + ) + + @api.constrains('company_id') + def account_invoice_company_constrains(self): + for mode in self: + if self.env['account.invoice'].sudo().search( + [('payment_mode_id', '=', mode.id), + ('company_id', '!=', mode.company_id.id)], limit=1): + raise ValidationError(_( + "You cannot change the Company. There exists " + "at least one Invoice with this Payment Mode, " + "already assigned to another Company.")) + + @api.constrains('company_id') + def account_move_line_company_constrains(self): + for mode in self: + if self.env['account.move.line'].sudo().search( + [('payment_mode_id', '=', mode.id), + ('company_id', '!=', mode.company_id.id)], limit=1): + raise ValidationError(_( + "You cannot change the Company. There exists " + "at least one Journal Item with this Payment Mode, " + "already assigned to another Company.")) diff --git a/ext/custom-addons/account_payment_partner/models/res_partner.py b/ext/custom-addons/account_payment_partner/models/res_partner.py new file mode 100644 index 00000000..aa60a42f --- /dev/null +++ b/ext/custom-addons/account_payment_partner/models/res_partner.py @@ -0,0 +1,27 @@ +# Copyright 2014 Akretion - Alexis de Lattre +# Copyright 2014 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import api, fields, models + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + # v8 fields : same without the _id suffix + supplier_payment_mode_id = fields.Many2one( + 'account.payment.mode', string='Supplier Payment Mode', + company_dependent=True, + domain="[('payment_type', '=', 'outbound')]", + help="Select the default payment mode for this supplier.") + customer_payment_mode_id = fields.Many2one( + 'account.payment.mode', string='Customer Payment Mode', + company_dependent=True, + domain="[('payment_type', '=', 'inbound')]", + help="Select the default payment mode for this customer.") + + @api.model + def _commercial_fields(self): + res = super(ResPartner, self)._commercial_fields() + res += ['supplier_payment_mode_id', 'customer_payment_mode_id'] + return res diff --git a/ext/custom-addons/account_payment_partner/readme/CONTRIBUTORS.rst b/ext/custom-addons/account_payment_partner/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..df652cc3 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/readme/CONTRIBUTORS.rst @@ -0,0 +1,11 @@ +* Alexis de Lattre +* Raphaël Valyi +* Stefan Rijnhart (Therp) +* Alexandre Fayolle +* Stéphane Bidoul +* Danimar Ribeiro +* Angel Moya +* `Tecnativa `_: + + * Pedro M. Baeza + * Carlos Dauden diff --git a/ext/custom-addons/account_payment_partner/readme/DESCRIPTION.rst b/ext/custom-addons/account_payment_partner/readme/DESCRIPTION.rst new file mode 100644 index 00000000..8ad4f4f6 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/readme/DESCRIPTION.rst @@ -0,0 +1,20 @@ +This module adds severals fields: + +* the *Supplier Payment Mode* and *Customer Payment Mode* on Partners, + +* the *Payment Mode* on Invoices. + +* the *Show bank account* on Payment Mode. + +* the *# of digits for customer bank account* on Payment Mode. + +* the *Bank account from journals* on Payment Mode. + +On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices will +be filtered per Payment Mode. + +Allows to print in the invoice to which account number the payment +(via SEPA direct debit) is going to be charged so the customer knows that +information, but there are some customers that don't want that everyone +looking at the invoice sees the full account number (and even GDPR can say a +word about that), so that's the reason behind the several options. diff --git a/ext/custom-addons/account_payment_partner/readme/HISTORY.rst b/ext/custom-addons/account_payment_partner/readme/HISTORY.rst new file mode 100644 index 00000000..8424df5d --- /dev/null +++ b/ext/custom-addons/account_payment_partner/readme/HISTORY.rst @@ -0,0 +1,5 @@ +10.0.1.2.0 (2018-05-24) +~~~~~~~~~~~~~~~~~~~~~~~ + +* [IMP] Add options to show partner bank account in invoice report + (`#458 `_) diff --git a/ext/custom-addons/account_payment_partner/readme/USAGE.rst b/ext/custom-addons/account_payment_partner/readme/USAGE.rst new file mode 100644 index 00000000..09ef2757 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/readme/USAGE.rst @@ -0,0 +1,9 @@ +You are able to add a payment mode directly on a partner. + +This payment mode is automatically associated to the invoice related to the +partner. This default value could be changed in a draft invoice. + +When you create a payment order, only invoices related to chosen payment mode +are displayed. + +Invoices without any payment mode are displayed too. diff --git a/ext/custom-addons/account_payment_partner/static/description/icon.png b/ext/custom-addons/account_payment_partner/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU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>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/ext/custom-addons/account_payment_partner/static/description/index.html b/ext/custom-addons/account_payment_partner/static/description/index.html new file mode 100644 index 00000000..8e606b1d --- /dev/null +++ b/ext/custom-addons/account_payment_partner/static/description/index.html @@ -0,0 +1,471 @@ + + + + + + +Account Payment Partner + + + +
+

Account Payment Partner

+ + +

Beta License: AGPL-3 OCA/bank-payment Translate me on Weblate Try me on Runboat

+

This module adds severals fields:

+
    +
  • the Supplier Payment Mode and Customer Payment Mode on Partners,
  • +
  • the Payment Mode on Invoices.
  • +
  • the Show bank account on Payment Mode.
  • +
  • the # of digits for customer bank account on Payment Mode.
  • +
  • the Bank account from journals on Payment Mode.
  • +
+

On a Payment Order, in the wizard Select Invoices to Pay, the invoices will +be filtered per Payment Mode.

+

Allows to print in the invoice to which account number the payment +(via SEPA direct debit) is going to be charged so the customer knows that +information, but there are some customers that don’t want that everyone +looking at the invoice sees the full account number (and even GDPR can say a +word about that), so that’s the reason behind the several options.

+

Table of contents

+ +
+

Usage

+

You are able to add a payment mode directly on a partner.

+

This payment mode is automatically associated to the invoice related to the +partner. This default value could be changed in a draft invoice.

+

When you create a payment order, only invoices related to chosen payment mode +are displayed.

+

Invoices without any payment mode are displayed too.

+
+
+

Changelog

+
+

10.0.1.2.0 (2018-05-24)

+
    +
  • [IMP] Add options to show partner bank account in invoice report +(#458)
  • +
+
+
+
+

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 to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

This module is part of the OCA/bank-payment project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/ext/custom-addons/account_payment_partner/tests/__init__.py b/ext/custom-addons/account_payment_partner/tests/__init__.py new file mode 100644 index 00000000..3449d9e9 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/tests/__init__.py @@ -0,0 +1 @@ +from . import test_account_payment_partner diff --git a/ext/custom-addons/account_payment_partner/tests/test_account_payment_partner.py b/ext/custom-addons/account_payment_partner/tests/test_account_payment_partner.py new file mode 100644 index 00000000..3bdb459a --- /dev/null +++ b/ext/custom-addons/account_payment_partner/tests/test_account_payment_partner.py @@ -0,0 +1,382 @@ +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import fields, _ +from odoo.tests import common +from odoo.exceptions import ValidationError + + +class TestAccountPaymentPartner(common.SavepointCase): + + @classmethod + def setUpClass(cls): + super(TestAccountPaymentPartner, cls).setUpClass() + + cls.res_users_model = cls.env['res.users'] + cls.journal_model = cls.env['account.journal'] + cls.payment_mode_model = cls.env['account.payment.mode'] + cls.partner_bank_model = cls.env['res.partner.bank'] + + # Refs + cls.company = cls.env.ref('base.main_company') + cls.acct_type_payable = cls.env.ref( + 'account.data_account_type_payable') + cls.acct_type_expenses = cls.env.ref( + 'account.data_account_type_expenses') + + cls.company_2 = cls.env['res.company'].create( + {'name': 'Company 2'}, + ) + charts = cls.env['account.chart.template'].search([]) + if charts: + cls.chart = charts[0] + else: + raise ValidationError( + _("No Chart of Account Template has been defined !")) + cls.wizard = cls.env['wizard.multi.charts.accounts'].create({ + 'company_id': cls.company_2.id, + 'chart_template_id': cls.chart.id, + 'sale_tax_id': False, + 'purchase_tax_id': False, + 'code_digits': 6, + 'currency_id': cls.env.ref('base.EUR').id, + 'transfer_account_id': cls.chart.transfer_account_id.id, + }) + cls.wizard.execute() + + # refs + cls.manual_out = cls.env.ref( + 'account.account_payment_method_manual_out') + cls.manual_out.bank_account_required = True + cls.manual_in = cls.env.ref( + 'account.account_payment_method_manual_in') + + cls.journal_sale = cls.env['account.journal'].create({ + 'name': 'Test Sales Journal', + 'code': 'tSAL', + 'type': 'sale', + 'company_id': cls.company.id, + }) + + cls.journal_c1 = cls.journal_model.create({ + 'name': 'J1', + 'code': 'J1', + 'type': 'bank', + 'company_id': cls.company.id, + 'bank_acc_number': '123456', + }) + + cls.journal_c2 = cls.journal_model.create({ + 'name': 'J2', + 'code': 'J2', + 'type': 'bank', + 'company_id': cls.company_2.id, + 'bank_acc_number': '552344', + }) + + cls.supplier_payment_mode = cls.payment_mode_model.create({ + 'name': 'Suppliers Bank 1', + 'bank_account_link': 'variable', + 'payment_method_id': cls.manual_out.id, + 'show_bank_account_from_journal': True, + 'company_id': cls.company.id, + 'fixed_journal_id': cls.journal_c1.id, + 'variable_journal_ids': [(6, 0, [cls.journal_c1.id])] + }) + + cls.supplier_payment_mode_c2 = cls.payment_mode_model.create({ + 'name': 'Suppliers Bank 2', + 'bank_account_link': 'variable', + 'payment_method_id': cls.manual_out.id, + 'company_id': cls.company_2.id, + 'fixed_journal_id': cls.journal_c2.id, + 'variable_journal_ids': [(6, 0, [cls.journal_c2.id])] + }) + + cls.customer_payment_mode = cls.payment_mode_model.create({ + 'name': 'Customers to Bank 1', + 'bank_account_link': 'fixed', + 'payment_method_id': cls.manual_in.id, + 'company_id': cls.company.id, + 'fixed_journal_id': cls.journal_c1.id, + 'variable_journal_ids': [(6, 0, [cls.journal_c1.id])] + }) + + cls.customer = cls.env['res.partner'].with_context( + force_company=cls.company.id).create({ + 'name': 'Test customer', + 'customer_payment_mode_id': cls.customer_payment_mode, + }) + + cls.supplier = cls.env['res.partner'].with_context( + force_company=cls.company.id).create({ + 'name': 'Test supplier', + 'supplier_payment_mode_id': cls.supplier_payment_mode, + }) + cls.supplier_bank = cls.env['res.partner.bank'].create({ + 'acc_number': '5345345', + 'partner_id': cls.supplier.id, + 'company_id': cls.company.id, + }) + cls.supplier_bank_2 = cls.env['res.partner.bank'].create({ + 'acc_number': '3452342', + 'partner_id': cls.supplier.id, + 'company_id': cls.company_2.id, + }) + cls.supplier.with_context( + force_company=cls.company_2.id).supplier_payment_mode_id = \ + cls.supplier_payment_mode_c2 + + cls.invoice_account = cls.env['account.account'].search( + [('user_type_id', '=', cls.acct_type_payable.id), + ('company_id', '=', cls.company.id)], + limit=1) + cls.invoice_line_account = cls.env['account.account'].search( + [('user_type_id', '=', cls.acct_type_expenses.id), + ('company_id', '=', cls.company.id)], + limit=1) + cls.journal_bank = cls.env['res.partner.bank'].create({ + 'acc_number': 'GB95LOYD87430237296288', + 'partner_id': cls.env.user.company_id.id, + }) + cls.journal = cls.env['account.journal'].create({ + 'name': 'BANK TEST', + 'code': 'TEST', + 'type': 'bank', + 'bank_account_id': cls.journal_bank.id, + }) + cls.supplier_invoice = cls.env['account.invoice'].create({ + 'partner_id': cls.supplier.id, + 'type': 'in_invoice', + 'journal_id': cls.journal_c1.id, + }) + + def _create_invoice(self): + + invoice = self.env['account.invoice'].create({ + 'partner_id': self.supplier.id, + 'journal_id': self.journal_sale.id, + 'account_id': self.invoice_account.id, + 'type': 'in_invoice', + 'company_id': self.company.id, + 'payment_mode_id': self.env.ref( + 'account_payment_mode.payment_mode_outbound_ct1').id + }) + + self.env['account.invoice.line'].create({ + 'product_id': self.env.ref('product.product_product_4').id, + 'quantity': 1.0, + 'price_unit': 100.0, + 'invoice_id': invoice.id, + 'name': 'product that cost 100', + 'account_id': self.invoice_line_account.id, + }) + return invoice + + def test_create_partner(self): + customer = self.env['res.partner'].with_context( + force_company=self.company.id).create({ + 'name': 'Test customer', + 'customer_payment_mode_id': self.customer_payment_mode, + }) + + self.assertEquals(customer.with_context( + force_company=self.company.id).customer_payment_mode_id, + self.customer_payment_mode) + self.assertEquals(customer.with_context( + force_company=self.company_2.id).customer_payment_mode_id, + self.payment_mode_model) + + def test_out_invoice_onchange(self): + # Test the onchange methods in invoice + invoice = self.env['account.invoice'].new({ + 'partner_id': self.customer.id, + 'type': 'out_invoice', + 'company_id': self.company.id, + }) + + invoice._onchange_partner_id() + + self.assertEquals(invoice.payment_mode_id, self.customer_payment_mode) + + invoice.company_id = self.company_2 + invoice._onchange_partner_id() + self.assertEquals(invoice.payment_mode_id, self.payment_mode_model) + + invoice.payment_mode_id = False + invoice._onchange_payment_mode_id() + self.assertFalse(invoice.partner_bank_id) + + def test_in_invoice_onchange(self): + # Test the onchange methods in invoice + self.manual_out.bank_account_required = True + invoice = self.env['account.invoice'].new({ + 'partner_id': self.supplier.id, + 'type': 'in_invoice', + 'company_id': self.company.id, + }) + + invoice._onchange_partner_id() + + self.assertEquals(invoice.payment_mode_id, self.supplier_payment_mode) + self.assertEquals(invoice.partner_bank_id, self.supplier_bank) + + invoice.company_id = self.company_2 + invoice._onchange_partner_id() + self.assertEquals(invoice.payment_mode_id, + self.supplier_payment_mode_c2) + self.assertEquals(invoice.partner_bank_id, self.supplier_bank_2) + + invoice.payment_mode_id = self.supplier_payment_mode + invoice._onchange_payment_mode_id() + self.assertTrue(invoice.partner_bank_id) + + self.manual_out.bank_account_required = False + + invoice.payment_mode_id = self.supplier_payment_mode_c2 + invoice._onchange_payment_mode_id() + self.assertFalse(invoice.partner_bank_id) + + invoice.partner_id = False + invoice._onchange_partner_id() + self.assertEquals(invoice.payment_mode_id, + self.payment_mode_model) + self.assertEquals(invoice.partner_bank_id, + self.partner_bank_model) + + def test_invoice_create(self): + invoice = self._create_invoice() + invoice.action_invoice_open() + aml = invoice.move_id.line_ids.filtered( + lambda l: l.account_id.user_type_id == self.acct_type_payable) + self.assertEquals(invoice.payment_mode_id, + aml[0].payment_mode_id) + + def test_invoice_constrains(self): + with self.assertRaises(ValidationError): + self.env['account.invoice'].create({ + 'partner_id': self.supplier.id, + 'type': 'in_invoice', + 'company_id': self.company.id, + 'payment_mode_id': self.supplier_payment_mode_c2.id + }) + + def test_payment_mode_constrains_01(self): + self.env['account.invoice'].create({ + 'partner_id': self.supplier.id, + 'type': 'in_invoice', + 'company_id': self.company.id, + }) + with self.assertRaises(ValidationError): + self.supplier_payment_mode.company_id = self.company_2 + + def test_payment_mode_constrains_02(self): + self.env['account.move'].create({ + 'date': fields.Date.today(), + 'journal_id': self.journal_sale.id, + 'name': '/', + 'ref': 'reference', + 'state': 'draft', + 'line_ids': [(0, 0, { + 'account_id': self.invoice_account.id, + 'credit': 1000, + 'debit': 0, + 'name': 'Test', + 'ref': 'reference', + }), (0, 0, { + 'account_id': self.invoice_line_account.id, + 'credit': 0, + 'debit': 1000, + 'name': 'Test', + 'ref': 'reference', + })]}) + with self.assertRaises(ValidationError): + self.supplier_payment_mode.company_id = self.company_2 + + def test_invoice_refund(self): + invoice = self._create_invoice() + invoice.action_invoice_open() + # Lets create a refund invoice for invoice_1. + # I refund the invoice Using Refund Button. + context = {"active_model": 'account.invoice', + "active_ids": [invoice.id], "active_id": invoice.id} + account_invoice_refund = self.env[ + 'account.invoice.refund'].with_context(context).create(dict( + description='Refund for Invoice', + filter_refund='refund', + )) + # I clicked on refund button. + account_invoice_refund.with_context(context).invoice_refund() + invoice_refund = invoice.refund_invoice_ids[0] + + self.assertEquals(invoice_refund.payment_mode_id, + invoice.payment_mode_id) + self.assertEquals(invoice_refund.partner_bank_id, + invoice.partner_bank_id) + + def test_partner(self): + self.customer.write({ + 'customer_payment_mode_id': self.customer_payment_mode.id + }) + self.assertEqual( + self.customer.customer_payment_mode_id, + self.customer_payment_mode + ) + + def test_partner_onchange(self): + customer_invoice = self.env['account.invoice'].create({ + 'partner_id': self.customer.id, + 'type': 'out_invoice', + }) + customer_invoice._onchange_partner_id() + self.assertEqual(customer_invoice.payment_mode_id, + self.customer_payment_mode) + + self.supplier_invoice._onchange_partner_id() + self.assertEqual(self.supplier_invoice.partner_bank_id, + self.supplier_bank) + vals = {'partner_id': False, 'type': 'out_invoice'} + invoice = self.env['account.invoice'].new(vals) + invoice._onchange_partner_id() + self.assertFalse(invoice.payment_mode_id) + vals = {'partner_id': False, 'type': 'in_invoice'} + invoice = self.env['account.invoice'].new(vals) + invoice._onchange_partner_id() + self.assertFalse(invoice.partner_bank_id) + + def test_onchange_payment_mode_id(self): + mode = self.supplier_payment_mode + mode.payment_method_id.bank_account_required = True + self.supplier_invoice.partner_bank_id = self.supplier_bank.id + self.supplier_invoice.payment_mode_id = mode.id + self.supplier_invoice._onchange_payment_mode_id() + self.assertEqual(self.supplier_invoice.partner_bank_id, + self.supplier_bank) + mode.payment_method_id.bank_account_required = False + self.supplier_invoice._onchange_payment_mode_id() + self.assertFalse(self.supplier_invoice.partner_bank_id) + self.supplier_invoice.payment_mode_id = False + self.supplier_invoice._onchange_payment_mode_id() + self.assertFalse(self.supplier_invoice.partner_bank_id) + + def test_print_report(self): + self.supplier_invoice.partner_bank_id = self.supplier_bank.id + report = self.env.ref('account.account_invoices') + res = str(report.render_qweb_html( + self.supplier_invoice.ids, report.report_name, + )[0]) + self.assertIn(self.supplier_bank.acc_number, res) + payment_mode = self.supplier_payment_mode + payment_mode.show_bank_account_from_journal = True + self.supplier_invoice.payment_mode_id = payment_mode.id + self.supplier_invoice.partner_bank_id = False + res = str(report.render_qweb_html( + self.supplier_invoice.ids, report.report_name, + )[0]) + self.assertIn(self.journal_c1.bank_acc_number, res) + payment_mode.bank_account_link = 'variable' + payment_mode.variable_journal_ids = [(6, 0, self.journal.ids)] + res = str(report.render_qweb_html( + self.supplier_invoice.ids, report.report_name, + )[0]) + self.assertIn(self.journal_bank.acc_number, res) diff --git a/ext/custom-addons/account_payment_partner/views/account_invoice_view.xml b/ext/custom-addons/account_payment_partner/views/account_invoice_view.xml new file mode 100644 index 00000000..024aacb3 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/views/account_invoice_view.xml @@ -0,0 +1,85 @@ + + + + + + + account_payment_partner.account_invoice_search + account.invoice + + + + + + + + + + + account_payment_partner.invoice_form + account.invoice + + + + + + + + 0 + + + + + + + account_payment_partner.invoice_supplier_form + account.invoice + + + + + + + + + [('partner_id', '=', commercial_partner_id), + '|',('company_id', '=', company_id),('company_id', '=', False)] + 0 + {'invisible': [('bank_account_required', '=', False)], 'required': [('bank_account_required', '=', True)]} + {'default_partner_id':commercial_partner_id} + + + + + + account_payment_partner.customer_invoice_tree + account.invoice + + + + + + + + + + account_payment_partner.supplier_invoice_tree + account.invoice + + + + + + + + + + diff --git a/ext/custom-addons/account_payment_partner/views/account_move_line.xml b/ext/custom-addons/account_payment_partner/views/account_move_line.xml new file mode 100644 index 00000000..60101811 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/views/account_move_line.xml @@ -0,0 +1,25 @@ + + + + + + + + + account_payment_partner.move_line_form + account.move.line + + + + + + + + + + + + diff --git a/ext/custom-addons/account_payment_partner/views/account_payment_mode.xml b/ext/custom-addons/account_payment_partner/views/account_payment_mode.xml new file mode 100644 index 00000000..da62bf40 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/views/account_payment_mode.xml @@ -0,0 +1,24 @@ + + + + + + account.payment.mode + + + + + + + + + + + + + + + diff --git a/ext/custom-addons/account_payment_partner/views/report_invoice.xml b/ext/custom-addons/account_payment_partner/views/report_invoice.xml new file mode 100644 index 00000000..b2276768 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/views/report_invoice.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/ext/custom-addons/account_payment_partner/views/res_partner_view.xml b/ext/custom-addons/account_payment_partner/views/res_partner_view.xml new file mode 100644 index 00000000..1c766223 --- /dev/null +++ b/ext/custom-addons/account_payment_partner/views/res_partner_view.xml @@ -0,0 +1,25 @@ + + + + + + + + account_partner_payment.partner_form + res.partner + + + + + + + + + + + + +