Skip to content

Commit d79fd0d

Browse files
committed
[16.0][MIG] account_reconcile_restrict_partner_mismatch
1 parent 337f898 commit d79fd0d

File tree

13 files changed

+51
-32
lines changed

13 files changed

+51
-32
lines changed

account_reconcile_restrict_partner_mismatch/README.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
Reconcile restrict partner mismatch
33
===================================
44

5-
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
67
!! This file is generated by oca-gen-addon-readme !!
78
!! changes will be overwritten. !!
89
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:e643e776a13ac74578f05aa23fc0328120234f43ff74182e837e0d18e2f357ae
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
912
1013
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1114
:target: https://odoo-community.org/page/development-status
@@ -14,16 +17,16 @@ Reconcile restrict partner mismatch
1417
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1518
:alt: License: AGPL-3
1619
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github
17-
:target: https://github.com/OCA/account-reconcile/tree/14.0/account_reconcile_restrict_partner_mismatch
20+
:target: https://github.com/OCA/account-reconcile/tree/16.0/account_reconcile_restrict_partner_mismatch
1821
:alt: OCA/account-reconcile
1922
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20-
:target: https://translation.odoo-community.org/projects/account-reconcile-14-0/account-reconcile-14-0-account_reconcile_restrict_partner_mismatch
23+
:target: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_reconcile_restrict_partner_mismatch
2124
:alt: Translate me on Weblate
22-
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/98/14.0
24-
:alt: Try me on Runbot
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-reconcile&target_branch=16.0
27+
:alt: Try me on Runboat
2528

26-
|badge1| |badge2| |badge3| |badge4| |badge5|
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
2730

2831
This module restricts reconciliation between journal items when:
2932

@@ -46,8 +49,8 @@ Bug Tracker
4649

4750
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-reconcile/issues>`_.
4851
In case of trouble, please check there if your issue has already been reported.
49-
If you spotted it first, help us smashing it by providing a detailed and welcomed
50-
`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**>`_.
52+
If you spotted it first, help us to smash it by providing a detailed and welcomed
53+
`feedback <https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_reconcile_restrict_partner_mismatch%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5154

5255
Do not contact contributors directly about support or help with technical issues.
5356

@@ -66,6 +69,8 @@ Contributors
6669
* Ernesto Tejeda
6770
* `Trobz <https://trobz.com>`_:
6871
* Nguyen Ho <nguyenhk@trobz.com>
72+
* `ACSONE SA <https://acsone.eu>`_:
73+
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>
6974

7075
Other credits
7176
~~~~~~~~~~~~~
@@ -85,6 +90,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
8590
mission is to support the collaborative development of Odoo features and
8691
promote its widespread use.
8792

88-
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.
93+
This module is part of the `OCA/account-reconcile <https://github.com/OCA/account-reconcile/tree/16.0/account_reconcile_restrict_partner_mismatch>`_ project on GitHub.
8994

9095
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

account_reconcile_restrict_partner_mismatch/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Reconcile restrict partner mismatch",
66
"summary": "Restrict reconciliation on receivable "
77
"and payable accounts to the same partner",
8-
"version": "15.0.1.0.0",
8+
"version": "16.0.1.0.0",
99
"depends": ["account"],
1010
"author": "Camptocamp, Odoo Community Association (OCA)",
1111
"website": "https://github.com/OCA/account-reconcile",

account_reconcile_restrict_partner_mismatch/i18n/account_reconcile_restrict_partner_mismatch.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ msgid "Account Reconcile Partner Mismatch Report"
2424
msgstr ""
2525

2626
#. module: account_reconcile_restrict_partner_mismatch
27-
#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__account_type_id
27+
#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__account_type
2828
msgid "Account type"
2929
msgstr ""
3030

account_reconcile_restrict_partner_mismatch/i18n/es.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ msgstr ""
2828
"Informe sobre la falta de coincidencia de cuentas conciliadas de los socios"
2929

3030
#. module: account_reconcile_restrict_partner_mismatch
31-
#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__account_type_id
31+
#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__account_type
3232
msgid "Account type"
3333
msgstr "Tipo de cuenta"
3434

account_reconcile_restrict_partner_mismatch/i18n/es_AR.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ msgid "Account Reconcile Partner Mismatch Report"
2727
msgstr "Informe de Discrepancias de Contactos en la Conciliación de Cuentas"
2828

2929
#. module: account_reconcile_restrict_partner_mismatch
30-
#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__account_type_id
30+
#: model:ir.model.fields,field_description:account_reconcile_restrict_partner_mismatch.field_account_reconcile_partner_mismatch_report__account_type
3131
msgid "Account type"
3232
msgstr "Tipo de Cuenta"
3333

account_reconcile_restrict_partner_mismatch/models/account_move_line.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ def reconcile(self):
1818
return True
1919
partners = set()
2020
for line in self:
21-
if line.account_id.internal_type in ("receivable", "payable"):
21+
if line.account_id.account_type in (
22+
"asset_receivable",
23+
"liability_payable",
24+
):
2225
partners.add(line.partner_id.id)
2326
if len(partners) > 1:
2427
raise UserError(

account_reconcile_restrict_partner_mismatch/readme/CONTRIBUTORS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
* Ernesto Tejeda
33
* `Trobz <https://trobz.com>`_:
44
* Nguyen Ho <nguyenhk@trobz.com>
5+
* `ACSONE SA <https://acsone.eu>`_:
6+
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>

account_reconcile_restrict_partner_mismatch/report/account_move_lines_report.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<field name="credit_move_id" />
1616
<field name="credit_amount" />
1717
<field name="credit_partner_id" />
18-
<field name="account_type_id" />
18+
<field name="account_type" />
1919
<field name="account_id" />
2020
</tree>
2121
</field>
@@ -42,7 +42,7 @@
4242
</group>
4343
<group>
4444
<field name="account_id" />
45-
<field name="account_type_id" />
45+
<field name="account_type" />
4646
<field name="debit_move_id" />
4747
<field name="credit_move_id" />
4848
</group>

account_reconcile_restrict_partner_mismatch/report/report_reconciled_lines.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ class AccountReconcilePartnerMismatchReport(models.Model):
1515
)
1616
full_reconcile_id = fields.Many2one("account.full.reconcile")
1717
account_id = fields.Many2one("account.account", string="Account")
18-
account_type_id = fields.Many2one("account.account.type", string="Account type")
18+
account_type = fields.Selection(
19+
selection=[("asset_receivable", "Receivable"), ("liability_payable", "Payable")]
20+
)
1921
debit_move_id = fields.Many2one("account.move.line", string="Debit move")
2022
debit_amount = fields.Float("Debit amount")
2123
debit_partner_id = fields.Many2one("res.partner", string="Debit partner")
@@ -33,7 +35,7 @@ def init(self):
3335
, pr.full_reconcile_id
3436
, pr.debit_move_id
3537
, daml.debit debit_amount
36-
, aat.id account_type_id
38+
, aa.account_type
3739
, daml.partner_id debit_partner_id
3840
, daml.account_id account_id
3941
, pr.credit_move_id
@@ -46,9 +48,7 @@ def init(self):
4648
ON caml.id = pr.credit_move_id
4749
LEFT JOIN account_account aa
4850
ON daml.account_id = aa.id
49-
LEFT JOIN account_account_type aat
50-
ON aa.user_type_id = aat.id
51-
WHERE aat.type in ('receivable', 'payable')
51+
WHERE aa.account_type IN ('asset_receivable', 'liability_payable')
5252
AND (daml.partner_id <> caml.partner_id
5353
OR (daml.partner_id IS NULL
5454
AND caml.partner_id IS NOT NULL)

account_reconcile_restrict_partner_mismatch/static/description/index.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6-
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
6+
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
77
<title>Reconcile restrict partner mismatch</title>
88
<style type="text/css">
99

@@ -366,8 +366,10 @@ <h1 class="title">Reconcile restrict partner mismatch</h1>
366366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370+
!! source digest: sha256:e643e776a13ac74578f05aa23fc0328120234f43ff74182e837e0d18e2f357ae
369371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370-
<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>
372+
<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/16.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-16-0/account-reconcile-16-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://runboat.odoo-community.org/builds?repo=OCA/account-reconcile&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
371373
<p>This module restricts reconciliation between journal items when:</p>
372374
<blockquote>
373375
<ul class="simple">
@@ -396,8 +398,8 @@ <h1 class="title">Reconcile restrict partner mismatch</h1>
396398
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
397399
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-reconcile/issues">GitHub Issues</a>.
398400
In case of trouble, please check there if your issue has already been reported.
399-
If you spotted it first, help us smashing it by providing a detailed and welcomed
400-
<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>
401+
If you spotted it first, help us to smash it by providing a detailed and welcomed
402+
<a class="reference external" href="https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_reconcile_restrict_partner_mismatch%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
401403
<p>Do not contact contributors directly about support or help with technical issues.</p>
402404
</div>
403405
<div class="section" id="credits">
@@ -415,6 +417,8 @@ <h2><a class="toc-backref" href="#id4">Contributors</a></h2>
415417
* Ernesto Tejeda</li>
416418
<li><a class="reference external" href="https://trobz.com">Trobz</a>:
417419
* Nguyen Ho &lt;<a class="reference external" href="mailto:nguyenhk&#64;trobz.com">nguyenhk&#64;trobz.com</a>&gt;</li>
420+
<li><a class="reference external" href="https://acsone.eu">ACSONE SA</a>:
421+
* Souheil Bejaoui &lt;<a class="reference external" href="mailto:souheil.bejaoui&#64;acsone.eu">souheil.bejaoui&#64;acsone.eu</a>&gt;</li>
418422
</ul>
419423
</div>
420424
<div class="section" id="other-credits">
@@ -428,7 +432,7 @@ <h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
428432
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
429433
mission is to support the collaborative development of Odoo features and
430434
promote its widespread use.</p>
431-
<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>
435+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-reconcile/tree/16.0/account_reconcile_restrict_partner_mismatch">OCA/account-reconcile</a> project on GitHub.</p>
432436
<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>
433437
</div>
434438
</div>

0 commit comments

Comments
 (0)