diff --git a/account_banking_mandate_contact/README.rst b/account_banking_mandate_contact/README.rst index b858bc439..54374437b 100644 --- a/account_banking_mandate_contact/README.rst +++ b/account_banking_mandate_contact/README.rst @@ -7,25 +7,27 @@ Account Banking Mandate Contact !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status - :alt: Production/Stable + :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_contact + :target: https://github.com/OCA/bank-payment/tree/14.0/account_banking_mandate_contact :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_contact + :target: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_banking_mandate_contact :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/173/12.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/bank-payment&target_branch=14.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| -Manage specific banking mandate in contact level +This module allows to select a specific banking mandate +(and thus, a specific bank account) at contact level, so that when doing +a debit order, such mandate is used for the invoices issued to that contact. **Table of contents** @@ -35,7 +37,20 @@ Manage specific banking mandate in contact level Usage ===== -To use this module you need to: +For selecting the mandate at contact level: + +#. Go to *Invoicing > Customers > Customers*. +#. Open or create one contact that has a parent. +#. On the "..." page, fill *Contact Mandate*. +#. That mandate will be populated in the debit order. + +Then the normal flow will be: + +#. Go to Invoicing > Customers > Customer invoices. +#. Create a new invoice for that contact. +#. Post the invoice. +#. Add it to a payment order, by any of the options that you can check on the *account_payment_order* module. +#. The populated mandate will be the one on the contact. Bug Tracker =========== @@ -43,7 +58,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -58,7 +73,11 @@ Authors Contributors ~~~~~~~~~~~~ -* Carlos Dauden +* `Tecnativa `_: + + * Carlos Dauden + * Ernesto Tejeda + * Pedro M. Baeza Maintainers ~~~~~~~~~~~ @@ -73,6 +92,6 @@ 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. +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_contact/__manifest__.py b/account_banking_mandate_contact/__manifest__.py index b87ba80f8..e724e77aa 100644 --- a/account_banking_mandate_contact/__manifest__.py +++ b/account_banking_mandate_contact/__manifest__.py @@ -3,8 +3,8 @@ { "name": "Account Banking Mandate Contact", "summary": "Assign specific banking mandates in contact level", - "version": "13.0.1.0.0", - "development_status": "Production/Stable", + "version": "14.0.1.0.0", + "development_status": "Beta", "category": "Banking addons", "website": "https://github.com/OCA/bank-payment", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/account_banking_mandate_contact/models/account_move_line.py b/account_banking_mandate_contact/models/account_move_line.py index cf979797e..3ff0fd57a 100644 --- a/account_banking_mandate_contact/models/account_move_line.py +++ b/account_banking_mandate_contact/models/account_move_line.py @@ -11,7 +11,7 @@ class AccountMoveLine(models.Model): # Extended to use partner_shipping_id mandate if it have set def _prepare_payment_line_vals(self, payment_order): vals = super(AccountMoveLine, self)._prepare_payment_line_vals(payment_order) - if payment_order.payment_type != "inbound" or self.mandate_id: + if payment_order.payment_type != "inbound" or self.move_id.mandate_id: return vals mandate = ( self.move_id.partner_shipping_id.valid_mandate_id diff --git a/account_banking_mandate_contact/models/res_partner.py b/account_banking_mandate_contact/models/res_partner.py index d8906e70b..4a397d3a3 100644 --- a/account_banking_mandate_contact/models/res_partner.py +++ b/account_banking_mandate_contact/models/res_partner.py @@ -18,4 +18,4 @@ class ResPartner(models.Model): if partner.contact_mandate_id.state == "valid": partner.valid_mandate_id = partner.contact_mandate_id procesed_partners |= partner - super(ResPartner, self - procesed_partners)._compute_valid_mandate_id() + return super(ResPartner, self - procesed_partners)._compute_valid_mandate_id() diff --git a/account_banking_mandate_contact/readme/CONTRIBUTORS.rst b/account_banking_mandate_contact/readme/CONTRIBUTORS.rst index d4af61ff6..35b76b8b0 100644 --- a/account_banking_mandate_contact/readme/CONTRIBUTORS.rst +++ b/account_banking_mandate_contact/readme/CONTRIBUTORS.rst @@ -1 +1,5 @@ -* Carlos Dauden +* `Tecnativa `_: + + * Carlos Dauden + * Ernesto Tejeda + * Pedro M. Baeza diff --git a/account_banking_mandate_contact/readme/DESCRIPTION.rst b/account_banking_mandate_contact/readme/DESCRIPTION.rst index f53813c8c..24fdda832 100644 --- a/account_banking_mandate_contact/readme/DESCRIPTION.rst +++ b/account_banking_mandate_contact/readme/DESCRIPTION.rst @@ -1 +1,3 @@ -Manage specific banking mandate in contact level +This module allows to select a specific banking mandate +(and thus, a specific bank account) at contact level, so that when doing +a debit order, such mandate is used for the invoices issued to that contact. diff --git a/account_banking_mandate_contact/readme/USAGE.rst b/account_banking_mandate_contact/readme/USAGE.rst index 334d594cb..4a571f4fc 100644 --- a/account_banking_mandate_contact/readme/USAGE.rst +++ b/account_banking_mandate_contact/readme/USAGE.rst @@ -1 +1,14 @@ -To use this module you need to: +For selecting the mandate at contact level: + +#. Go to *Invoicing > Customers > Customers*. +#. Open or create one contact that has a parent. +#. On the "..." page, fill *Contact Mandate*. +#. That mandate will be populated in the debit order. + +Then the normal flow will be: + +#. Go to Invoicing > Customers > Customer invoices. +#. Create a new invoice for that contact. +#. Post the invoice. +#. Add it to a payment order, by any of the options that you can check on the *account_payment_order* module. +#. The populated mandate will be the one on the contact. diff --git a/account_banking_mandate_contact/static/description/index.html b/account_banking_mandate_contact/static/description/index.html new file mode 100644 index 000000000..49b58bb7f --- /dev/null +++ b/account_banking_mandate_contact/static/description/index.html @@ -0,0 +1,445 @@ + + + + + + +Account Banking Mandate Contact + + + +
+

Account Banking Mandate Contact

+ + +

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

+

This module allows to select a specific banking mandate +(and thus, a specific bank account) at contact level, so that when doing +a debit order, such mandate is used for the invoices issued to that contact.

+

Table of contents

+ +
+

Usage

+

For selecting the mandate at contact level:

+
    +
  1. Go to Invoicing > Customers > Customers.
  2. +
  3. Open or create one contact that has a parent.
  4. +
  5. On the “…” page, fill Contact Mandate.
  6. +
  7. That mandate will be populated in the debit order.
  8. +
+

Then the normal flow will be:

+
    +
  1. Go to Invoicing > Customers > Customer invoices.
  2. +
  3. Create a new invoice for that contact.
  4. +
  5. Post the invoice.
  6. +
  7. Add it to a payment order, by any of the options that you can check on the account_payment_order module.
  8. +
  9. The populated mandate will be the one on the contact.
  10. +
+
+
+

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

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • Tecnativa:
      +
    • Carlos Dauden
    • +
    • Ernesto Tejeda
    • +
    • Pedro M. Baeza
    • +
    +
  • +
+
+
+

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_contact/tests/test_account_payment_order.py b/account_banking_mandate_contact/tests/test_account_payment_order.py index 79da668f7..ea7f93a2b 100644 --- a/account_banking_mandate_contact/tests/test_account_payment_order.py +++ b/account_banking_mandate_contact/tests/test_account_payment_order.py @@ -61,7 +61,7 @@ class TestAccountPaymentOrder(TransactionCase): def _create_invoice(self): invoice_form = Form( - self.env["account.move"].with_context(default_type="out_invoice") + self.env["account.move"].with_context(default_move_type="out_invoice") ) invoice_form.partner_id = self.partner invoice_form.invoice_date = fields.Date.from_string("2021-01-01") diff --git a/setup/account_banking_mandate_contact/odoo/addons/account_banking_mandate_contact b/setup/account_banking_mandate_contact/odoo/addons/account_banking_mandate_contact new file mode 120000 index 000000000..ab51f636e --- /dev/null +++ b/setup/account_banking_mandate_contact/odoo/addons/account_banking_mandate_contact @@ -0,0 +1 @@ +../../../../account_banking_mandate_contact \ No newline at end of file diff --git a/setup/account_banking_mandate_contact/setup.py b/setup/account_banking_mandate_contact/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/account_banking_mandate_contact/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)