diff --git a/account_banking_mandate_sale/README.rst b/account_banking_mandate_sale/README.rst new file mode 100644 index 00000000000..24ba1fdab43 --- /dev/null +++ b/account_banking_mandate_sale/README.rst @@ -0,0 +1,97 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +============================ +Account Banking Mandate Sale +============================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:72be4ba0a8d3c6486a37467aa62b6396d156ef52ff1c8428875829fa6edc7b75 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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/19.0/account_banking_mandate_sale + :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-19-0/bank-payment-19-0-account_banking_mandate_sale + :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=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This modules adds the field *Direct Debit Mandate* on sale orders. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +When you select a payment mode that requires mandate on a sale order, +Odoo will select by default the first valid mandate of this customer. + +The mandate will be copied from the sale order to the invoice. + +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 + +Contributors +------------ + +- Alexis de Lattre +- Thomas Binsfeld + +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. + +.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px + :target: https://github.com/alexis-via + :alt: alexis-via + +Current `maintainer `__: + +|maintainer-alexis-via| + +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/account_banking_mandate_sale/__init__.py b/account_banking_mandate_sale/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/account_banking_mandate_sale/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/account_banking_mandate_sale/__manifest__.py b/account_banking_mandate_sale/__manifest__.py new file mode 100644 index 00000000000..e6b91d1fc88 --- /dev/null +++ b/account_banking_mandate_sale/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2016-2022 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Account Banking Mandate Sale", + "version": "19.0.1.0.0", + "category": "Banking addons", + "license": "AGPL-3", + "summary": "Adds mandates on sale orders", + "author": "Odoo Community Association (OCA), Akretion", + "maintainers": ["alexis-via"], + "website": "https://github.com/OCA/bank-payment", + "depends": [ + "account_payment_sale", + "account_banking_mandate", + ], + "data": ["views/sale_order.xml"], + "installable": True, +} diff --git a/account_banking_mandate_sale/i18n/account_banking_mandate_sale.pot b/account_banking_mandate_sale/i18n/account_banking_mandate_sale.pot new file mode 100644 index 00000000000..28ede4c08ce --- /dev/null +++ b/account_banking_mandate_sale/i18n/account_banking_mandate_sale.pot @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.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_banking_mandate_sale +#: model:ir.model.fields,help:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "" +"Activate this option if this payment method requires your customer to sign a" +" direct debit mandate with your company." +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_id +msgid "Direct Debit Mandate" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__commercial_invoice_partner_id +msgid "Invoicing Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "Mandate Required" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "" diff --git a/account_banking_mandate_sale/i18n/ca.po b/account_banking_mandate_sale/i18n/ca.po new file mode 100644 index 00000000000..2d274ffaa39 --- /dev/null +++ b/account_banking_mandate_sale/i18n/ca.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-11-08 10:35+0000\n" +"Last-Translator: jabelchi \n" +"Language-Team: none\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 4.3.2\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,help:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "" +"Activate this option if this payment method requires your customer to sign a " +"direct debit mandate with your company." +msgstr "" +"Activeu aquesta opció si aquest mètode de pagament requereix que el client " +"signi un mandat amb la vostra empresa." + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_id +msgid "Direct Debit Mandate" +msgstr "Mandat de càrrec directe" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__commercial_invoice_partner_id +msgid "Invoicing Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "Mandate Required" +msgstr "Es requereix mandat" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "Comanda de venda" + +#~ msgid "Display Name" +#~ msgstr "Nom a mostrar" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Darrera modificació el" diff --git a/account_banking_mandate_sale/i18n/ca_ES.po b/account_banking_mandate_sale/i18n/ca_ES.po new file mode 100644 index 00000000000..7d303e74602 --- /dev/null +++ b/account_banking_mandate_sale/i18n/ca_ES.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ca_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" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,help:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "" +"Activate this option if this payment method requires your customer to sign a " +"direct debit mandate with your company." +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_id +msgid "Direct Debit Mandate" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__commercial_invoice_partner_id +msgid "Invoicing Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "Mandate Required" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "" diff --git a/account_banking_mandate_sale/i18n/de.po b/account_banking_mandate_sale/i18n/de.po new file mode 100644 index 00000000000..017389c6c8d --- /dev/null +++ b/account_banking_mandate_sale/i18n/de.po @@ -0,0 +1,59 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +# Niki Waibel, 2016 +msgid "" +msgstr "" +"Project-Id-Version: bank-payment (10.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-21 10:17+0000\n" +"PO-Revision-Date: 2020-08-20 10:00+0000\n" +"Last-Translator: André Volksdorf \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-bank-payment-10-0/" +"language/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.10\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,help:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "" +"Activate this option if this payment method requires your customer to sign a " +"direct debit mandate with your company." +msgstr "" +"Aktivieren Sie diese Option, wenn diese Zahlungsmethode erfordert, dass Ihr " +"Kunde eine Einzugsermächtigung mit Ihrem Unternehmen unterzeichnet." + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_id +msgid "Direct Debit Mandate" +msgstr "Lastschrift Mandat" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__commercial_invoice_partner_id +msgid "Invoicing Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "Mandate Required" +msgstr "Mandat erforderlich" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "" + +#~ msgid "Sales Advance Payment Invoice" +#~ msgstr "Verkaufsanzahlungsrechnung" + +#~ msgid "Commercial Entity" +#~ msgstr "Gewerbliche Instanz" + +#~ msgid "Sale Order" +#~ msgstr "Kundenauftrag" diff --git a/account_banking_mandate_sale/i18n/es.po b/account_banking_mandate_sale/i18n/es.po new file mode 100644 index 00000000000..826f34f9d7e --- /dev/null +++ b/account_banking_mandate_sale/i18n/es.po @@ -0,0 +1,61 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +# OCA Transbot , 2016 +# Pedro M. Baeza , 2016 +msgid "" +msgstr "" +"Project-Id-Version: bank-payment (10.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 00:21+0000\n" +"PO-Revision-Date: 2023-09-02 18:08+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-bank-payment-10-0/" +"language/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 4.17\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,help:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "" +"Activate this option if this payment method requires your customer to sign a " +"direct debit mandate with your company." +msgstr "" +"Active esta opción si este método de pago requiere que su cliente firme un " +"mandato de domiciliación bancaria con su compañía." + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_id +msgid "Direct Debit Mandate" +msgstr "Mandato de adeudo directo" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__commercial_invoice_partner_id +msgid "Invoicing Commercial Entity" +msgstr "Facturación de la entidad comercial" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "Mandate Required" +msgstr "Mandato requerido" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "Órdenes de venta" + +#~ msgid "Sales Advance Payment Invoice" +#~ msgstr "Ventas. Anticipo pago factura" + +#~ msgid "Commercial Entity" +#~ msgstr "Entidad comercial" + +#, fuzzy +#~ msgid "Sale Order" +#~ msgstr "Pedido de venta" diff --git a/account_banking_mandate_sale/i18n/hr.po b/account_banking_mandate_sale/i18n/hr.po new file mode 100644 index 00000000000..ec4ceec8d44 --- /dev/null +++ b/account_banking_mandate_sale/i18n/hr.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: bank-payment (10.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-20 01:40+0000\n" +"PO-Revision-Date: 2016-10-19 23:45+0000\n" +"Last-Translator: <>\n" +"Language-Team: Croatian (http://www.transifex.com/oca/OCA-bank-payment-10-0/" +"language/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_banking_mandate_sale +#: model:ir.model.fields,help:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "" +"Activate this option if this payment method requires your customer to sign a " +"direct debit mandate with your company." +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_id +msgid "Direct Debit Mandate" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__commercial_invoice_partner_id +msgid "Invoicing Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "Mandate Required" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~ msgid "Sale Order" +#~ msgstr "Ponuda" diff --git a/account_banking_mandate_sale/i18n/it.po b/account_banking_mandate_sale/i18n/it.po new file mode 100644 index 00000000000..80ae6f279c9 --- /dev/null +++ b/account_banking_mandate_sale/i18n/it.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-05-13 09:36+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\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 4.17\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,help:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "" +"Activate this option if this payment method requires your customer to sign a" +" direct debit mandate with your company." +msgstr "" +"Attivare questa opzione se questo metodo di pagamento richiede che il " +"cliente firmi un mandato di addebito diretto (SDD) con la vostra azienda." + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_id +msgid "Direct Debit Mandate" +msgstr "Mandato addebito diretto" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__commercial_invoice_partner_id +msgid "Invoicing Commercial Entity" +msgstr "Entità commerciale fatturazione" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "Mandate Required" +msgstr "Mandato richiesto" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "Ordine di vendita" diff --git a/account_banking_mandate_sale/i18n/nl.po b/account_banking_mandate_sale/i18n/nl.po new file mode 100644 index 00000000000..a08fc3fc6de --- /dev/null +++ b/account_banking_mandate_sale/i18n/nl.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +# Erwin van der Ploeg , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-22 23:52+0000\n" +"PO-Revision-Date: 2016-07-22 23:52+0000\n" +"Last-Translator: Erwin van der Ploeg , 2016\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_banking_mandate_sale +#: model:ir.model.fields,help:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "" +"Activate this option if this payment method requires your customer to sign a " +"direct debit mandate with your company." +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_id +msgid "Direct Debit Mandate" +msgstr "Incasso mandaat" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__commercial_invoice_partner_id +msgid "Invoicing Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "Mandate Required" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "" + +#~ msgid "Sales Advance Payment Invoice" +#~ msgstr "Verkoop Incassofactuur" + +#~ msgid "Commercial Entity" +#~ msgstr "Commerciële Entiteit" + +#, fuzzy +#~ msgid "Sale Order" +#~ msgstr "Verkooporder" diff --git a/account_banking_mandate_sale/i18n/nl_NL.po b/account_banking_mandate_sale/i18n/nl_NL.po new file mode 100644 index 00000000000..b717a680e93 --- /dev/null +++ b/account_banking_mandate_sale/i18n/nl_NL.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: bank-payment (10.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-08-18 00:42+0000\n" +"PO-Revision-Date: 2016-10-19 23:45+0000\n" +"Last-Translator: <>\n" +"Language-Team: Dutch (Netherlands) (http://www.transifex.com/oca/OCA-bank-" +"payment-10-0/language/nl_NL/)\n" +"Language: nl_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_banking_mandate_sale +#: model:ir.model.fields,help:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "" +"Activate this option if this payment method requires your customer to sign a " +"direct debit mandate with your company." +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_id +msgid "Direct Debit Mandate" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__commercial_invoice_partner_id +msgid "Invoicing Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "Mandate Required" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "" + +#, fuzzy +#~ msgid "Sale Order" +#~ msgstr "Verkooporder" diff --git a/account_banking_mandate_sale/i18n/pt_BR.po b/account_banking_mandate_sale/i18n/pt_BR.po new file mode 100644 index 00000000000..d07b1af574d --- /dev/null +++ b/account_banking_mandate_sale/i18n/pt_BR.po @@ -0,0 +1,58 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-01 19:28+0000\n" +"PO-Revision-Date: 2019-09-03 03:24+0000\n" +"Last-Translator: Rodrigo Macedo \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" +"X-Generator: Weblate 3.8\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,help:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "" +"Activate this option if this payment method requires your customer to sign a " +"direct debit mandate with your company." +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_id +msgid "Direct Debit Mandate" +msgstr "Mandato de débito direto" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__commercial_invoice_partner_id +msgid "Invoicing Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "Mandate Required" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "" + +#~ msgid "Commercial Entity" +#~ msgstr "Entidade Comercial" + +#, fuzzy +#~ msgid "Sale Order" +#~ msgstr "Pedido de Venda" + +#~ msgid "Sales Advance Payment Invoice" +#~ msgstr "Fatura de pagamento antecipado de vendas" diff --git a/account_banking_mandate_sale/i18n/sl.po b/account_banking_mandate_sale/i18n/sl.po new file mode 100644 index 00000000000..ba354d11af5 --- /dev/null +++ b/account_banking_mandate_sale/i18n/sl.po @@ -0,0 +1,59 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-01 19:28+0000\n" +"PO-Revision-Date: 2020-03-21 14:13+0000\n" +"Last-Translator: Matjaz Mozetic \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" +"X-Generator: Weblate 3.10\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,help:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "" +"Activate this option if this payment method requires your customer to sign a " +"direct debit mandate with your company." +msgstr "" +"Aktivirajte to opcijo, če ta plačilna metoda zahteva strankin podpis za " +"direkten debetni mandat vaši družbi." + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_id +msgid "Direct Debit Mandate" +msgstr "Mandat za direktne obremenitve" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__commercial_invoice_partner_id +msgid "Invoicing Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order__mandate_required +msgid "Mandate Required" +msgstr "Zahteva se mandat" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "" + +#~ msgid "Commercial Entity" +#~ msgstr "Gospodarski subjekt" + +#~ msgid "Sale Order" +#~ msgstr "Prodajni nalog" + +#~ msgid "Sales Advance Payment Invoice" +#~ msgstr "Prodajni račun za plačilo avansa" diff --git a/account_banking_mandate_sale/models/__init__.py b/account_banking_mandate_sale/models/__init__.py new file mode 100644 index 00000000000..6aacb753131 --- /dev/null +++ b/account_banking_mandate_sale/models/__init__.py @@ -0,0 +1 @@ +from . import sale_order diff --git a/account_banking_mandate_sale/models/sale_order.py b/account_banking_mandate_sale/models/sale_order.py new file mode 100644 index 00000000000..6c85d9b72ae --- /dev/null +++ b/account_banking_mandate_sale/models/sale_order.py @@ -0,0 +1,61 @@ +# Copyright 2014-2022 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class SaleOrder(models.Model): + _inherit = "sale.order" + + commercial_invoice_partner_id = fields.Many2one( + related="partner_invoice_id.commercial_partner_id", + string="Invoicing Commercial Entity", + store=True, + ) + mandate_id = fields.Many2one( + "account.banking.mandate", + compute="_compute_mandate_id", + string="Direct Debit Mandate", + ondelete="restrict", + check_company=True, + readonly=False, + store=True, + tracking=True, + domain="[('partner_id', '=', commercial_invoice_partner_id), " + "('state', 'in', ('draft', 'valid')), " + "('company_id', '=', company_id)]", + ) + mandate_required = fields.Boolean( + related="payment_mode_id.payment_method_id.mandate_required", + ) + + def _prepare_invoice(self): + """Copy mandate from sale order to invoice""" + vals = super()._prepare_invoice() + if self.mandate_id: + vals["mandate_id"] = self.mandate_id.id + return vals + + @api.depends("partner_invoice_id", "payment_mode_id") + def _compute_mandate_id(self): + for order in self: + if ( + order.partner_invoice_id + and order.payment_mode_id + and order.payment_mode_id.payment_method_id.mandate_required + ): + mandate = self.env["account.banking.mandate"].search( + [ + ("state", "=", "valid"), + ( + "partner_id", + "=", + order.partner_invoice_id.commercial_partner_id.id, + ), + ("company_id", "=", order.company_id.id), + ], + limit=1, + ) + order.mandate_id = mandate or False + else: + order.mandate_id = False diff --git a/account_banking_mandate_sale/pyproject.toml b/account_banking_mandate_sale/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/account_banking_mandate_sale/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/account_banking_mandate_sale/readme/CONTRIBUTORS.md b/account_banking_mandate_sale/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..ceebae0cacd --- /dev/null +++ b/account_banking_mandate_sale/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Alexis de Lattre \<\> +- Thomas Binsfeld \<\> diff --git a/account_banking_mandate_sale/readme/DESCRIPTION.md b/account_banking_mandate_sale/readme/DESCRIPTION.md new file mode 100644 index 00000000000..d7a2a459689 --- /dev/null +++ b/account_banking_mandate_sale/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This modules adds the field *Direct Debit Mandate* on sale orders. diff --git a/account_banking_mandate_sale/readme/USAGE.md b/account_banking_mandate_sale/readme/USAGE.md new file mode 100644 index 00000000000..a273b4ef543 --- /dev/null +++ b/account_banking_mandate_sale/readme/USAGE.md @@ -0,0 +1,4 @@ +When you select a payment mode that requires mandate on a sale order, +Odoo will select by default the first valid mandate of this customer. + +The mandate will be copied from the sale order to the invoice. diff --git a/account_banking_mandate_sale/static/description/icon.png b/account_banking_mandate_sale/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/account_banking_mandate_sale/static/description/icon.png differ diff --git a/account_banking_mandate_sale/static/description/index.html b/account_banking_mandate_sale/static/description/index.html new file mode 100644 index 00000000000..8e2513b398b --- /dev/null +++ b/account_banking_mandate_sale/static/description/index.html @@ -0,0 +1,439 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Account Banking Mandate Sale

+ +

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

+

This modules adds the field Direct Debit Mandate on sale orders.

+

Table of contents

+ +
+

Usage

+

When you select a payment mode that requires mandate on a sale order, +Odoo will select by default the first valid mandate of this customer.

+

The mandate will be copied from the sale order to the invoice.

+
+
+

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
  • +
+
+
+

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.

+

Current maintainer:

+

alexis-via

+

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/account_banking_mandate_sale/tests/__init__.py b/account_banking_mandate_sale/tests/__init__.py new file mode 100644 index 00000000000..6f699d0d8ba --- /dev/null +++ b/account_banking_mandate_sale/tests/__init__.py @@ -0,0 +1 @@ +from . import test_sale_order diff --git a/account_banking_mandate_sale/tests/test_sale_order.py b/account_banking_mandate_sale/tests/test_sale_order.py new file mode 100644 index 00000000000..9448719ca6d --- /dev/null +++ b/account_banking_mandate_sale/tests/test_sale_order.py @@ -0,0 +1,105 @@ +# Copyright 2025 Studio73 - Eugenio Micó +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields +from odoo.tests.common import TransactionCase + + +class TestSaleOrder(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.partner = cls.env["res.partner"].create({"name": "Test Partner"}) + cls.company = cls.env.user.company_id + cls.bank = cls.env["res.bank"].create( + { + "name": "Test Bank", + "bic": "TESTBICX", + } + ) + cls.partner_bank = cls.env["res.partner.bank"].create( + { + "acc_number": "ES9121000418450200051332", + "partner_id": cls.partner.id, + "bank_id": cls.bank.id, + "company_id": cls.company.id, + } + ) + cls.payment_method = cls.env["account.payment.method"].create( + { + "name": "SEPA Direct Debit", + "mandate_required": True, + "payment_type": "inbound", + "code": "sepa_direct_debit", + } + ) + cls.journal = cls.env["account.journal"].create( + { + "name": "Test Bank Journal", + "type": "bank", + "code": "TBNK", + "company_id": cls.company.id, + } + ) + cls.env["account.payment.method.line"].create( + { + "name": "SEPA Direct Debit", + "payment_method_id": cls.payment_method.id, + "journal_id": cls.journal.id, + } + ) + cls.payment_mode = cls.env["account.payment.mode"].create( + { + "name": "Direct Debit", + "payment_method_id": cls.payment_method.id, + "bank_account_link": "fixed", + "fixed_journal_id": cls.journal.id, + "company_id": cls.company.id, + } + ) + cls.mandate = cls.env["account.banking.mandate"].create( + { + "partner_id": cls.partner.id, + "partner_bank_id": cls.partner_bank.id, + "signature_date": fields.Date.today(), + "company_id": cls.company.id, + "state": "valid", + } + ) + cls.sale_order = cls.env["sale.order"].create( + { + "partner_id": cls.partner.id, + "partner_invoice_id": cls.partner.id, + "company_id": cls.company.id, + "payment_mode_id": cls.payment_mode.id, + } + ) + + def test_01_mandate_required_related(self): + self.assertTrue(self.sale_order.mandate_required) + + def test_02_compute_mandate_id(self): + self.sale_order._compute_mandate_id() + self.assertEqual(self.sale_order.mandate_id, self.mandate) + + def test_03_prepare_invoice_copies_mandate(self): + self.sale_order.mandate_id = self.mandate + vals = self.sale_order._prepare_invoice() + self.assertEqual(vals.get("mandate_id"), self.mandate.id) + + def test_04_no_mandate_for_other_partner(self): + other_partner = self.env["res.partner"].create({"name": "Other Partner"}) + self.sale_order.partner_invoice_id = other_partner + self.sale_order._compute_mandate_id() + self.assertFalse(self.sale_order.mandate_id) + + def test_05_no_mandate_without_payment_mode(self): + self.sale_order.payment_mode_id = False + self.sale_order._compute_mandate_id() + self.assertFalse(self.sale_order.mandate_id) + + def test_06_onchange_partner_invoice(self): + self.sale_order.mandate_id = False + self.sale_order.partner_invoice_id = self.partner + self.sale_order._compute_mandate_id() + self.assertEqual(self.sale_order.mandate_id, self.mandate) diff --git a/account_banking_mandate_sale/views/sale_order.xml b/account_banking_mandate_sale/views/sale_order.xml new file mode 100644 index 00000000000..6ec01209927 --- /dev/null +++ b/account_banking_mandate_sale/views/sale_order.xml @@ -0,0 +1,20 @@ + + + + + account_banking_mandate_sale.sale_order.form + sale.order + + + + + + + + diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000000..1f235a6dbe0 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,4 @@ +odoo-addon-account_payment_mode @ git+https://github.com/OCA/bank-payment.git@refs/pull/1504/head#subdirectory=account_payment_mode +odoo-addon-account_payment_sale @ git+https://github.com/OCA/bank-payment.git@refs/pull/1509/head#subdirectory=account_payment_sale +odoo-addon-account_payment_order @ git+https://github.com/OCA/bank-payment.git@refs/pull/1510/head#subdirectory=account_payment_order +odoo-addon-account_banking_mandate @ git+https://github.com/OCA/bank-payment.git@refs/pull/1511/head#subdirectory=account_banking_mandate