[MIG] account_reconcile_restrict_partner_mismatch: Migration to 14.0
parent
c2aa4662c2
commit
955e6990ba
|
@ -14,13 +14,13 @@ Reconcile restrict partner mismatch
|
|||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/account-reconcile/tree/13.0/account_reconcile_restrict_partner_mismatch
|
||||
:target: https://github.com/OCA/account-reconcile/tree/14.0/account_reconcile_restrict_partner_mismatch
|
||||
:alt: OCA/account-reconcile
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/account-reconcile-13-0/account-reconcile-13-0-account_reconcile_restrict_partner_mismatch
|
||||
:target: https://translation.odoo-community.org/projects/account-reconcile-14-0/account-reconcile-14-0-account_reconcile_restrict_partner_mismatch
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/98/13.0
|
||||
:target: https://runbot.odoo-community.org/runbot/98/14.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
@ -47,7 +47,7 @@ Bug Tracker
|
|||
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.
|
||||
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_reconcile_restrict_partner_mismatch%0Aversion:%2013.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_reconcile_restrict_partner_mismatch%0Aversion:%2014.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.
|
||||
|
||||
|
@ -63,8 +63,15 @@ Contributors
|
|||
~~~~~~~~~~~~
|
||||
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* Ernesto Tejeda
|
||||
* `Trobz <https://trobz.com>`_:
|
||||
* Nguyen Ho <nguyenhk@trobz.com>
|
||||
|
||||
Other credits
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
The migration of this module from 13.0 to 14.0 was financially supported by Camptocamp
|
||||
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
@ -79,6 +86,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/account-reconcile <https://github.com/OCA/account-reconcile/tree/13.0/account_reconcile_restrict_partner_mismatch>`_ project on GitHub.
|
||||
This module is part of the `OCA/account-reconcile <https://github.com/OCA/account-reconcile/tree/14.0/account_reconcile_restrict_partner_mismatch>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"name": "Reconcile restrict partner mismatch",
|
||||
"summary": "Restrict reconciliation on receivable "
|
||||
"and payable accounts to the same partner",
|
||||
"version": "13.0.1.0.0",
|
||||
"version": "14.0.1.0.0",
|
||||
"depends": ["account"],
|
||||
"author": "Camptocamp, Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/account-reconcile",
|
||||
|
|
|
@ -9,9 +9,9 @@ from odoo.tools import config
|
|||
class AccountMoveLine(models.Model):
|
||||
_inherit = "account.move.line"
|
||||
|
||||
def reconcile(self, writeoff_acc_id=False, writeoff_journal_id=False):
|
||||
def reconcile(self):
|
||||
if config["test_enable"] and not self.env.context.get("test_partner_mismatch"):
|
||||
return super().reconcile(writeoff_acc_id, writeoff_journal_id)
|
||||
return super().reconcile()
|
||||
|
||||
# to be consistent with parent method
|
||||
if not self:
|
||||
|
@ -27,4 +27,4 @@ class AccountMoveLine(models.Model):
|
|||
" lines for receivable and payable accounts!"
|
||||
)
|
||||
)
|
||||
return super().reconcile(writeoff_acc_id, writeoff_journal_id)
|
||||
return super().reconcile()
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* Ernesto Tejeda
|
||||
* `Trobz <https://trobz.com>`_:
|
||||
* Nguyen Ho <nguyenhk@trobz.com>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
The migration of this module from 13.0 to 14.0 was financially supported by Camptocamp
|
|
@ -3,7 +3,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
|
||||
<title>Reconcile restrict partner mismatch</title>
|
||||
<style type="text/css">
|
||||
|
||||
|
@ -367,7 +367,7 @@ ul.auto-toc {
|
|||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! 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/13.0/account_reconcile_restrict_partner_mismatch"><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_reconcile_restrict_partner_mismatch"><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><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/14.0/account_reconcile_restrict_partner_mismatch"><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-14-0/account-reconcile-14-0-account_reconcile_restrict_partner_mismatch"><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/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module restricts reconciliation between journal items when:</p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
|
@ -386,7 +386,8 @@ Reconciled items with partner mismatch.</p>
|
|||
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
|
||||
<li><a class="reference internal" href="#other-credits" id="id5">Other credits</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -396,7 +397,7 @@ Reconciled items with partner mismatch.</p>
|
|||
<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.
|
||||
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_reconcile_restrict_partner_mismatch%0Aversion:%2013.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_reconcile_restrict_partner_mismatch%0Aversion:%2014.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">
|
||||
|
@ -410,20 +411,24 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
||||
<li>Ernesto Tejeda</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:
|
||||
* Ernesto Tejeda</li>
|
||||
<li><a class="reference external" href="https://trobz.com">Trobz</a>:
|
||||
* Nguyen Ho <<a class="reference external" href="mailto:nguyenhk@trobz.com">nguyenhk@trobz.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="other-credits">
|
||||
<h2><a class="toc-backref" href="#id5">Other credits</a></h2>
|
||||
<p>The migration of this module from 13.0 to 14.0 was financially supported by Camptocamp</p>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
|
||||
<h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<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/account-reconcile/tree/13.0/account_reconcile_restrict_partner_mismatch">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/14.0/account_reconcile_restrict_partner_mismatch">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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -79,6 +79,7 @@ class TestReconciliation(SavepointCase):
|
|||
return aml_recs
|
||||
|
||||
def test_reconcile_no_partner(self):
|
||||
self.aml.move_id.action_post()
|
||||
self.aml.reconcile()
|
||||
self.assertTrue(all(self.aml.mapped("reconciled")))
|
||||
|
||||
|
@ -88,6 +89,7 @@ class TestReconciliation(SavepointCase):
|
|||
self.aml.reconcile()
|
||||
# all lines with same partner allowed
|
||||
self.aml.write({"partner_id": self.partner.id})
|
||||
self.aml.move_id.action_post()
|
||||
self.aml.reconcile()
|
||||
self.assertTrue(all(self.aml.mapped("reconciled")))
|
||||
|
||||
|
@ -112,5 +114,6 @@ class TestReconciliation(SavepointCase):
|
|||
# reconciliation for different partners allowed
|
||||
# for not forbidden types
|
||||
self.aml.write({"account_id": account.id})
|
||||
self.aml.move_id.action_post()
|
||||
self.aml.reconcile()
|
||||
self.assertTrue(all(self.aml.mapped("reconciled")))
|
||||
|
|
Loading…
Reference in New Issue