mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[MIG] account_banking_mandate_contact: Migration to 16.0
This commit is contained in:
@@ -7,7 +7,7 @@ Account Banking Mandate Contact
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:c037b632e64403ec6e4d61e7275eece4b909b3cdfe5199867e18ae8e362381bb
|
||||
!! source digest: sha256:e64a6ce44499395afe175300e7c9551d1ea8bdd1263b8fc251600675ee2e07c9
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
||||
@@ -17,13 +17,13 @@ Account Banking Mandate Contact
|
||||
: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/15.0/account_banking_mandate_contact
|
||||
:target: https://github.com/OCA/bank-payment/tree/16.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-15-0/bank-payment-15-0-account_banking_mandate_contact
|
||||
:target: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_mandate_contact
|
||||
: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=15.0
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/bank-payment&target_branch=16.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -61,7 +61,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-payment/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 <https://github.com/OCA/bank-payment/issues/new?body=module:%20account_banking_mandate_contact%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/bank-payment/issues/new?body=module:%20account_banking_mandate_contact%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
@@ -82,6 +82,10 @@ Contributors
|
||||
* Ernesto Tejeda
|
||||
* Pedro M. Baeza
|
||||
|
||||
* `Sygel <https://www.sygel.es>`__:
|
||||
|
||||
* Alberto Martínez
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
||||
@@ -95,6 +99,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 <https://github.com/OCA/bank-payment/tree/15.0/account_banking_mandate_contact>`_ project on GitHub.
|
||||
This module is part of the `OCA/bank-payment <https://github.com/OCA/bank-payment/tree/16.0/account_banking_mandate_contact>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Account Banking Mandate Contact",
|
||||
"summary": "Assign specific banking mandates in contact level",
|
||||
"version": "15.0.1.0.1",
|
||||
"version": "16.0.1.0.1",
|
||||
"development_status": "Production/Stable",
|
||||
"category": "Banking addons",
|
||||
"website": "https://github.com/OCA/bank-payment",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 15.0\n"
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
|
||||
@@ -13,9 +13,9 @@ class ResPartner(models.Model):
|
||||
)
|
||||
|
||||
def _compute_valid_mandate_id(self):
|
||||
procesed_partners = self.browse()
|
||||
for partner in self:
|
||||
if partner.contact_mandate_id.state == "valid":
|
||||
partner.valid_mandate_id = partner.contact_mandate_id
|
||||
procesed_partners |= partner
|
||||
return super(ResPartner, self - procesed_partners)._compute_valid_mandate_id()
|
||||
partners_to_process = self.filtered(
|
||||
lambda x: x.contact_mandate_id.state == "valid"
|
||||
)
|
||||
for partner in partners_to_process:
|
||||
partner.valid_mandate_id = partner.contact_mandate_id
|
||||
return super(ResPartner, self - partners_to_process)._compute_valid_mandate_id()
|
||||
|
||||
@@ -3,3 +3,7 @@
|
||||
* Carlos Dauden
|
||||
* Ernesto Tejeda
|
||||
* Pedro M. Baeza
|
||||
|
||||
* `Sygel <https://www.sygel.es>`__:
|
||||
|
||||
* Alberto Martínez
|
||||
@@ -367,9 +367,9 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:c037b632e64403ec6e4d61e7275eece4b909b3cdfe5199867e18ae8e362381bb
|
||||
!! source digest: sha256:e64a6ce44499395afe175300e7c9551d1ea8bdd1263b8fc251600675ee2e07c9
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/bank-payment/tree/15.0/account_banking_mandate_contact"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/bank-payment-15-0/bank-payment-15-0-account_banking_mandate_contact"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/bank-payment&target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/bank-payment/tree/16.0/account_banking_mandate_contact"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_mandate_contact"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/bank-payment&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>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.</p>
|
||||
@@ -409,7 +409,7 @@ a debit order, such mandate is used for the invoices issued to that contact.</p>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/bank-payment/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/bank-payment/issues/new?body=module:%20account_banking_mandate_contact%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/bank-payment/issues/new?body=module:%20account_banking_mandate_contact%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -429,6 +429,10 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<li>Pedro M. Baeza</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference external" href="https://www.sygel.es">Sygel</a>:<ul>
|
||||
<li>Alberto Martínez</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
@@ -438,7 +442,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-payment/tree/15.0/account_banking_mandate_contact">OCA/bank-payment</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-payment/tree/16.0/account_banking_mandate_contact">OCA/bank-payment</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -111,14 +111,13 @@ class TestAccountPaymentOrder(TransactionCase):
|
||||
line_form.tax_ids.clear()
|
||||
invoice = invoice_form.save()
|
||||
invoice.action_post()
|
||||
|
||||
return invoice
|
||||
|
||||
def test_invoice_payment_mode(self):
|
||||
self.assertEqual(self.invoice.state, "posted")
|
||||
self.assertEqual(self.invoice.payment_mode_id, self.payment_core)
|
||||
self.assertEqual(
|
||||
self.invoice.invoice_date_due, fields.Date.from_string("2021-01-01")
|
||||
)
|
||||
self.assertEqual(self.invoice.invoice_date_due, fields.Date.today())
|
||||
|
||||
def test_account_payment_order_core(self):
|
||||
line_create_form = Form(
|
||||
@@ -127,7 +126,7 @@ class TestAccountPaymentOrder(TransactionCase):
|
||||
)
|
||||
)
|
||||
line_create_form.date_type = "due"
|
||||
line_create_form.due_date = fields.Date.from_string("2021-01-01")
|
||||
line_create_form.due_date = fields.Date.today()
|
||||
line_create = line_create_form.save()
|
||||
line_create.populate()
|
||||
line_create.create_payment_lines()
|
||||
@@ -145,7 +144,7 @@ class TestAccountPaymentOrder(TransactionCase):
|
||||
)
|
||||
)
|
||||
line_create_form.date_type = "due"
|
||||
line_create_form.due_date = fields.Date.from_string("2021-01-01")
|
||||
line_create_form.due_date = fields.Date.today()
|
||||
line_create = line_create_form.save()
|
||||
line_create.populate()
|
||||
line_create.create_payment_lines()
|
||||
@@ -153,4 +152,5 @@ class TestAccountPaymentOrder(TransactionCase):
|
||||
payment_line = self.payment_order.payment_line_ids.filtered(
|
||||
lambda x: x.partner_id == self.partner
|
||||
)
|
||||
self.assertEqual(payment_line.mandate_id, self.mandate_b2b)
|
||||
self.assertEqual(payment_line.partner_bank_id, self.partner_bank_b2b)
|
||||
|
||||
Reference in New Issue
Block a user