From c9a49db3e6d7a39b24b0a5d6e65a5b29ee1d36d2 Mon Sep 17 00:00:00 2001 From: Thomas Binsfeld Date: Fri, 21 Dec 2018 12:14:42 +0100 Subject: [PATCH] [MIG] Account Banking Mandate Sale --- account_banking_mandate_sale/README.rst | 81 ++-- account_banking_mandate_sale/__init__.py | 2 - account_banking_mandate_sale/__manifest__.py | 7 +- .../models/__init__.py | 2 - .../models/sale_order.py | 3 +- .../readme/CONFIGURATION.rst | 1 + .../readme/CONTRIBUTORS.rst | 1 + .../readme/DESCRIPTION.rst | 1 + account_banking_mandate_sale/readme/USAGE.rst | 4 + .../static/description/index.html | 426 ++++++++++++++++++ .../wizard/__init__.py | 2 - .../wizard/sale_make_invoice_advance.py | 1 - 12 files changed, 485 insertions(+), 46 deletions(-) create mode 100644 account_banking_mandate_sale/readme/CONFIGURATION.rst create mode 100644 account_banking_mandate_sale/readme/CONTRIBUTORS.rst create mode 100644 account_banking_mandate_sale/readme/DESCRIPTION.rst create mode 100644 account_banking_mandate_sale/readme/USAGE.rst create mode 100644 account_banking_mandate_sale/static/description/index.html diff --git a/account_banking_mandate_sale/README.rst b/account_banking_mandate_sale/README.rst index 2d897d45c..cbfe631c8 100644 --- a/account_banking_mandate_sale/README.rst +++ b/account_banking_mandate_sale/README.rst @@ -1,16 +1,36 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 - ============================ Account Banking Mandate Sale ============================ +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/12.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-12-0/bank-payment-12-0-account_banking_mandate_sale + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/97/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + This modules adds the field *Direct Debit Mandate* on sale orders. -Configuration -============= +**Table of contents** -There is nothing to configure. +.. contents:: + :local: Usage ===== @@ -20,47 +40,42 @@ select by default the first valid mandate of this customer. The mandate will be copied from the sale order to the invoice. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/173/10.0 - -Known issues / Roadmap -====================== - - * No known issues. - Bug Tracker =========== -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Akretion Contributors ------------- +~~~~~~~~~~~~ * Alexis de Lattre -Maintainer ----------- - -.. image:: http://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: http://odoo-community.org +Maintainers +~~~~~~~~~~~ This module is maintained by the OCA. -OCA, or the Odoo Community Association, is a nonprofit organization -whose mission is to support the collaborative development of Odoo -features and promote its widespread use. +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org -To contribute to this module, please visit http://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/account_banking_mandate_sale/__init__.py b/account_banking_mandate_sale/__init__.py index 35e7c9600..9b4296142 100644 --- a/account_banking_mandate_sale/__init__.py +++ b/account_banking_mandate_sale/__init__.py @@ -1,4 +1,2 @@ -# -*- coding: utf-8 -*- - from . import models from . import wizard diff --git a/account_banking_mandate_sale/__manifest__.py b/account_banking_mandate_sale/__manifest__.py index a2ce59f80..581f380c3 100644 --- a/account_banking_mandate_sale/__manifest__.py +++ b/account_banking_mandate_sale/__manifest__.py @@ -1,15 +1,14 @@ -# -*- coding: utf-8 -*- # © 2016 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Account Banking Mandate Sale', - 'version': '10.0.1.0.1', + 'version': '12.0.1.0.1', 'category': 'Banking addons', 'license': 'AGPL-3', 'summary': "Adds mandates on sale orders", - 'author': "Akretion, " - "Odoo Community Association (OCA)", + 'author': "Odoo Community Association (OCA), " + "Akretion", 'website': 'https://github.com/OCA/bank-payment', 'depends': [ 'account_payment_sale', diff --git a/account_banking_mandate_sale/models/__init__.py b/account_banking_mandate_sale/models/__init__.py index 6064afee1..6aacb7531 100644 --- a/account_banking_mandate_sale/models/__init__.py +++ b/account_banking_mandate_sale/models/__init__.py @@ -1,3 +1 @@ -# -*- coding: utf-8 -*- - from . import sale_order diff --git a/account_banking_mandate_sale/models/sale_order.py b/account_banking_mandate_sale/models/sale_order.py index 93afaf989..7089c0e97 100644 --- a/account_banking_mandate_sale/models/sale_order.py +++ b/account_banking_mandate_sale/models/sale_order.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2014-2016 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -34,5 +33,5 @@ class SaleOrder(models.Model): mandates = self.env['account.banking.mandate'].search([ ('state', '=', 'valid'), ('partner_id', '=', self.commercial_partner_id.id), - ]) + ]) self.mandate_id = mandates[:1] diff --git a/account_banking_mandate_sale/readme/CONFIGURATION.rst b/account_banking_mandate_sale/readme/CONFIGURATION.rst new file mode 100644 index 000000000..10f006c4a --- /dev/null +++ b/account_banking_mandate_sale/readme/CONFIGURATION.rst @@ -0,0 +1 @@ +There is nothing to configure. diff --git a/account_banking_mandate_sale/readme/CONTRIBUTORS.rst b/account_banking_mandate_sale/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..ff65d68ce --- /dev/null +++ b/account_banking_mandate_sale/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Alexis de Lattre diff --git a/account_banking_mandate_sale/readme/DESCRIPTION.rst b/account_banking_mandate_sale/readme/DESCRIPTION.rst new file mode 100644 index 000000000..d7a2a4596 --- /dev/null +++ b/account_banking_mandate_sale/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This modules adds the field *Direct Debit Mandate* on sale orders. diff --git a/account_banking_mandate_sale/readme/USAGE.rst b/account_banking_mandate_sale/readme/USAGE.rst new file mode 100644 index 000000000..bacc436e1 --- /dev/null +++ b/account_banking_mandate_sale/readme/USAGE.rst @@ -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/index.html b/account_banking_mandate_sale/static/description/index.html new file mode 100644 index 000000000..ef0ad5914 --- /dev/null +++ b/account_banking_mandate_sale/static/description/index.html @@ -0,0 +1,426 @@ + + + + + + +Account Banking Mandate Sale + + + +
+

Account Banking Mandate Sale

+ + +

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

+

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 smashing 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.

+

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/wizard/__init__.py b/account_banking_mandate_sale/wizard/__init__.py index 1eb17ffa1..fca48c3d0 100644 --- a/account_banking_mandate_sale/wizard/__init__.py +++ b/account_banking_mandate_sale/wizard/__init__.py @@ -1,3 +1 @@ -# -*- coding: utf-8 -*- - from . import sale_make_invoice_advance diff --git a/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py b/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py index c8dba428e..f8df5479b 100644 --- a/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py +++ b/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).