Skip to content

Commit

Permalink
Merge pull request #561 from OCA/16.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/account-reconcile (16.0)
  • Loading branch information
bt-admin authored Mar 26, 2024
2 parents 769b81b + a9a4976 commit d4176d3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ addon | version | maintainers | summary
[account_move_base_import](account_move_base_import/) | 16.0.1.0.1 | | Journal Entry base import
[account_move_line_reconcile_manual](account_move_line_reconcile_manual/) | 16.0.2.0.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Manually reconcile Journal Items
[account_move_reconcile_forbid_cancel](account_move_reconcile_forbid_cancel/) | 16.0.1.0.1 | | Account Move Reconcile Forbid Cancel
[account_reconcile_oca](account_reconcile_oca/) | 16.0.1.2.10 | [![etobella](https://github.com/etobella.png?size=30px)](https://github.com/etobella) | Reconcile addons for Odoo CE accounting
[account_reconcile_oca](account_reconcile_oca/) | 16.0.1.2.11 | [![etobella](https://github.com/etobella.png?size=30px)](https://github.com/etobella) | Reconcile addons for Odoo CE accounting
[account_statement_base](account_statement_base/) | 16.0.1.3.1 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Base module for Bank Statements
[base_transaction_id](base_transaction_id/) | 16.0.1.0.0 | | Base transaction ID for financial institutes

Expand Down
2 changes: 1 addition & 1 deletion account_reconcile_oca/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Account Reconcile Oca
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d9953a0cdfb581fb43423f15451cf6022c99a95ed64b3b8458a497166ebaa6d3
!! source digest: sha256:180ca7f094b2b786fdc289ad3daf0dc0169a4d31386248059abd6cfa5cd26cb9
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion account_reconcile_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Account Reconcile Oca",
"summary": """
Reconcile addons for Odoo CE accounting""",
"version": "16.0.1.2.10",
"version": "16.0.1.2.11",
"license": "AGPL-3",
"author": "CreuBlanca,Dixmit,Odoo Community Association (OCA)",
"maintainers": ["etobella"],
Expand Down
16 changes: 9 additions & 7 deletions account_reconcile_oca/models/account_bank_statement_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ def _onchange_add_account_move_line_id(self):
for line in data:
if line["kind"] != "suspense":
pending_amount += line["amount"]
if line.get("counterpart_line_id") == self.add_account_move_line_id.id:
if self.add_account_move_line_id.id in line.get(
"counterpart_line_ids", []
):
is_new_line = False
else:
new_data.append(line)
Expand Down Expand Up @@ -161,8 +163,8 @@ def _recompute_suspense_line(
suspense_line = False
counterparts = []
for line in data:
if line.get("counterpart_line_id"):
counterparts.append(line["counterpart_line_id"])
if line.get("counterpart_line_ids"):
counterparts += line["counterpart_line_ids"]
if (
line["account_id"][0] == self.journal_id.suspense_account_id.id
or not line["account_id"][0]
Expand Down Expand Up @@ -524,10 +526,10 @@ def _reconcile_bank_line_edit(self, data):
)
.create(self._reconcile_move_line_vals(line_vals))
)
if line_vals.get("counterpart_line_id"):
if line_vals.get("counterpart_line_ids"):
to_reconcile.append(
self.env["account.move.line"].browse(
line_vals.get("counterpart_line_id")
line_vals.get("counterpart_line_ids")
)
+ line
)
Expand Down Expand Up @@ -590,10 +592,10 @@ def _reconcile_bank_line_keep(self, data):
.with_context(check_move_validity=False, skip_invoice_sync=True)
.create(self._reconcile_move_line_vals(line_vals, move.id))
)
if line_vals.get("counterpart_line_id") and line.account_id.reconcile:
if line_vals.get("counterpart_line_ids") and line.account_id.reconcile:
to_reconcile[line.account_id.id] |= (
self.env["account.move.line"].browse(
line_vals.get("counterpart_line_id")
line_vals.get("counterpart_line_ids")
)
| line
)
Expand Down
6 changes: 3 additions & 3 deletions account_reconcile_oca/models/account_reconcile_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ def _get_reconcile_line(
vals.update(
{
"id": False,
"counterpart_line_id": (
"counterpart_line_ids": (
line.matched_debit_ids.mapped("debit_move_id")
| line.matched_credit_ids.mapped("credit_move_id")
).id,
).ids,
}
)
if not float_is_zero(
Expand All @@ -98,5 +98,5 @@ def _get_reconcile_line(
vals["original_amount"] = abs(original_amount)
vals["original_amount_unsigned"] = original_amount
if is_counterpart:
vals["counterpart_line_id"] = line.id
vals["counterpart_line_ids"] = line.ids
return vals
2 changes: 1 addition & 1 deletion account_reconcile_oca/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ <h1 class="title">Account Reconcile Oca</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d9953a0cdfb581fb43423f15451cf6022c99a95ed64b3b8458a497166ebaa6d3
!! source digest: sha256:180ca7f094b2b786fdc289ad3daf0dc0169a4d31386248059abd6cfa5cd26cb9
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" 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 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/account-reconcile/tree/16.0/account_reconcile_oca"><img alt="OCA/account-reconcile" src="https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_reconcile_oca"><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/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>
<p>This addon allows to reconcile bank statements and account marked as <cite>reconcile</cite>.</p>
Expand Down

0 comments on commit d4176d3

Please sign in to comment.