mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[MIG] account_mass_reconcile_ref_deep_search: Migration to 13.0
This commit is contained in:
committed by
Diep Huu Hoang
parent
4e66e28d89
commit
b558b542f0
@@ -14,13 +14,13 @@ Mass Reconcile Ref Deep Search
|
|||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
:alt: License: AGPL-3
|
:alt: License: AGPL-3
|
||||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github
|
||||||
:target: https://github.com/OCA/account-reconcile/tree/12.0/account_mass_reconcile_ref_deep_search
|
:target: https://github.com/OCA/account-reconcile/tree/13.0/account_mass_reconcile_ref_deep_search
|
||||||
:alt: OCA/account-reconcile
|
:alt: OCA/account-reconcile
|
||||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
:target: https://translation.odoo-community.org/projects/account-reconcile-12-0/account-reconcile-12-0-account_mass_reconcile_ref_deep_search
|
:target: https://translation.odoo-community.org/projects/account-reconcile-13-0/account-reconcile-13-0-account_mass_reconcile_ref_deep_search
|
||||||
:alt: Translate me on Weblate
|
:alt: Translate me on Weblate
|
||||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||||
:target: https://runbot.odoo-community.org/runbot/98/12.0
|
:target: https://runbot.odoo-community.org/runbot/98/13.0
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
@@ -40,7 +40,7 @@ Bug Tracker
|
|||||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-reconcile/issues>`_.
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-reconcile/issues>`_.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
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
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
`feedback <https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_mass_reconcile_ref_deep_search%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
`feedback <https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_mass_reconcile_ref_deep_search%0Aversion:%2013.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.
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
@@ -71,6 +71,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.
|
promote its widespread use.
|
||||||
|
|
||||||
This module is part of the `OCA/account-reconcile <https://github.com/OCA/account-reconcile/tree/12.0/account_mass_reconcile_ref_deep_search>`_ project on GitHub.
|
This module is part of the `OCA/account-reconcile <https://github.com/OCA/account-reconcile/tree/13.0/account_mass_reconcile_ref_deep_search>`_ project on GitHub.
|
||||||
|
|
||||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 12.0\n"
|
"Project-Id-Version: Odoo Server 13.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class MassReconciledAdvancedRefDeepSearch(models.TransientModel):
|
|||||||
|
|
||||||
_name = "mass.reconcile.advanced.ref.deep.search"
|
_name = "mass.reconcile.advanced.ref.deep.search"
|
||||||
_inherit = "mass.reconcile.advanced.ref"
|
_inherit = "mass.reconcile.advanced.ref"
|
||||||
|
_description = "Advanced. Partner and Ref. Deep Search"
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _compare_values(key, value, opposite_value):
|
def _compare_values(key, value, opposite_value):
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
|||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" 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" href="https://github.com/OCA/account-reconcile/tree/12.0/account_mass_reconcile_ref_deep_search"><img alt="OCA/account-reconcile" src="https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-reconcile-12-0/account-reconcile-12-0-account_mass_reconcile_ref_deep_search"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/98/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" 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" href="https://github.com/OCA/account-reconcile/tree/13.0/account_mass_reconcile_ref_deep_search"><img alt="OCA/account-reconcile" src="https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-reconcile-13-0/account-reconcile-13-0-account_mass_reconcile_ref_deep_search"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/98/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||||
<p>This module extends the functionality of account_mass_reconcile and adds a new
|
<p>This module extends the functionality of account_mass_reconcile and adds a new
|
||||||
reconciliation method which allows, for a partner, to search the credit entry
|
reconciliation method which allows, for a partner, to search the credit entry
|
||||||
ref in any debit entry ref.</p>
|
ref in any debit entry ref.</p>
|
||||||
@@ -388,7 +388,7 @@ ref in any debit entry ref.</p>
|
|||||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-reconcile/issues">GitHub Issues</a>.
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-reconcile/issues">GitHub Issues</a>.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
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
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
<a class="reference external" href="https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_mass_reconcile_ref_deep_search%0Aversion:%2012.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/account-reconcile/issues/new?body=module:%20account_mass_reconcile_ref_deep_search%0Aversion:%2013.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>
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="credits">
|
<div class="section" id="credits">
|
||||||
@@ -413,7 +413,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.</p>
|
promote its widespread use.</p>
|
||||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-reconcile/tree/12.0/account_mass_reconcile_ref_deep_search">OCA/account-reconcile</a> project on GitHub.</p>
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-reconcile/tree/13.0/account_mass_reconcile_ref_deep_search">OCA/account-reconcile</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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class TestAccountReconcileRefDeepSearch(SavepointCase):
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
limit=1,
|
limit=1,
|
||||||
|
order="id",
|
||||||
)
|
)
|
||||||
account_revenue = cls.env["account.account"].search(
|
account_revenue = cls.env["account.account"].search(
|
||||||
[
|
[
|
||||||
@@ -33,32 +34,40 @@ class TestAccountReconcileRefDeepSearch(SavepointCase):
|
|||||||
[("type", "=", "sale")], limit=1
|
[("type", "=", "sale")], limit=1
|
||||||
)
|
)
|
||||||
# Create invoice
|
# Create invoice
|
||||||
cls.cust_invoice = cls.env["account.invoice"].create(
|
cls.cust_invoice = (
|
||||||
{
|
cls.env["account.move"]
|
||||||
"partner_id": cls.partner.id,
|
.with_context(default_type="out_invoice")
|
||||||
"type": "out_invoice",
|
.create(
|
||||||
"account_id": cls.account_receivable.id,
|
{
|
||||||
"journal_id": sales_journal.id,
|
"partner_id": cls.partner.id,
|
||||||
"invoice_line_ids": [
|
"company_id": cls.env.ref("base.main_company"),
|
||||||
(
|
"type": "out_invoice",
|
||||||
0,
|
"journal_id": sales_journal.id,
|
||||||
0,
|
"invoice_line_ids": [
|
||||||
{
|
(
|
||||||
"name": "[CONS_DEL01] Server",
|
0,
|
||||||
"product_id": cls.env.ref("product.consu_delivery_01").id,
|
0,
|
||||||
"account_id": account_revenue.id,
|
{
|
||||||
"price_unit": 1000.0,
|
"name": "[CONS_DEL01] Server",
|
||||||
"quantity": 1.0,
|
"product_id": cls.env.ref(
|
||||||
},
|
"product.consu_delivery_01"
|
||||||
)
|
).id,
|
||||||
],
|
"account_id": account_revenue.id,
|
||||||
"name": "test_deep_search",
|
"price_unit": 1000.0,
|
||||||
}
|
"quantity": 1.0,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
"name": "test_deep_search",
|
||||||
|
"ref": "test_deep_search",
|
||||||
|
}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
cls.cust_invoice.action_invoice_open()
|
cls.cust_invoice.action_post()
|
||||||
|
|
||||||
def test_account_reconcile_ref_deep_search(self):
|
def test_account_reconcile_ref_deep_search(self):
|
||||||
self.assertEqual(self.cust_invoice.state, "open")
|
self.assertEqual(self.cust_invoice.state, "posted")
|
||||||
|
self.assertEqual(self.cust_invoice.invoice_payment_state, "not_paid")
|
||||||
bank_journal = self.env["account.journal"].search(
|
bank_journal = self.env["account.journal"].search(
|
||||||
[("type", "=", "bank")], limit=1
|
[("type", "=", "bank")], limit=1
|
||||||
)
|
)
|
||||||
@@ -99,5 +108,6 @@ class TestAccountReconcileRefDeepSearch(SavepointCase):
|
|||||||
)
|
)
|
||||||
count = reconcile.unreconciled_count
|
count = reconcile.unreconciled_count
|
||||||
reconcile.run_reconcile()
|
reconcile.run_reconcile()
|
||||||
self.assertEqual(self.cust_invoice.state, "paid")
|
self.cust_invoice.invalidate_cache()
|
||||||
|
self.assertEqual(self.cust_invoice.invoice_payment_state, "paid")
|
||||||
self.assertEqual(reconcile.unreconciled_count, count - 2)
|
self.assertEqual(reconcile.unreconciled_count, count - 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user