From 63c34f4b0493a5bcd78523804e9764b0977ebb1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Mon, 25 Nov 2024 10:41:47 +0100 Subject: [PATCH 1/2] [IMP] account_statement_base: Remove unnecessary code Unnecessary code when merging https://github.com/odoo/odoo/pull/182497 --- .../models/account_bank_statement.py | 19 ------------------- .../models/account_bank_statement_line.py | 7 ------- 2 files changed, 26 deletions(-) diff --git a/account_statement_base/models/account_bank_statement.py b/account_statement_base/models/account_bank_statement.py index f41e90f167..1b292f8b53 100644 --- a/account_statement_base/models/account_bank_statement.py +++ b/account_statement_base/models/account_bank_statement.py @@ -4,25 +4,6 @@ class AccountBankStatement(models.Model): _inherit = "account.bank.statement" - # TODO: Delete if merged https://github.com/odoo/odoo/pull/182497 - def _compute_date_index(self): - """The super() method does not take into account lines that do not have - internal_index set yet, and causes sorted() to fail, we need to re-define - the method in these cases to avoid the error. - """ - _self = self - for stmt in self: - if any(not line.internal_index for line in stmt.line_ids): - _self -= stmt - sorted_lines = stmt.line_ids.filtered("internal_index").sorted( - "internal_index" - ) - stmt.first_line_index = sorted_lines[:1].internal_index - stmt.date = sorted_lines.filtered(lambda line: line.state == "posted")[ - -1: - ].date - return super(AccountBankStatement, _self)._compute_date_index() - def action_open_statement_lines(self): self.ensure_one() if not self: diff --git a/account_statement_base/models/account_bank_statement_line.py b/account_statement_base/models/account_bank_statement_line.py index 4199a73fd2..857619b91b 100644 --- a/account_statement_base/models/account_bank_statement_line.py +++ b/account_statement_base/models/account_bank_statement_line.py @@ -7,13 +7,6 @@ class AccountBankStatementLine(models.Model): _inherit = "account.bank.statement.line" - # TODO: Delete if merged https://github.com/odoo/odoo/pull/182497 - def _compute_running_balance(self): - # We need to set value to all records because super() does not do it using sql. - for item in self: - item.running_balance = item.running_balance - return super()._compute_running_balance() - def action_open_journal_entry(self): self.ensure_one() if not self: From c35333d9c50f9fa2810662fa59f7476f0e16290d Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 26 Nov 2024 07:19:59 +0000 Subject: [PATCH 2/2] [BOT] post-merge updates --- README.md | 2 +- account_statement_base/README.rst | 16 ++++++++-------- account_statement_base/__manifest__.py | 2 +- .../static/description/index.html | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index fb330ad956..d202dd9c58 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ addon | version | maintainers | summary [account_mass_reconcile](account_mass_reconcile/) | 17.0.1.0.1 | | Account Mass Reconcile [account_reconcile_model_oca](account_reconcile_model_oca/) | 17.0.1.0.1 | | This includes the logic moved from Odoo Community to Odoo Enterprise [account_reconcile_oca](account_reconcile_oca/) | 17.0.1.3.5 | [![etobella](https://github.com/etobella.png?size=30px)](https://github.com/etobella) | Reconcile addons for Odoo CE accounting -[account_statement_base](account_statement_base/) | 17.0.1.4.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Base module for Bank Statements +[account_statement_base](account_statement_base/) | 17.0.1.4.1 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Base module for Bank Statements [//]: # (end addons) diff --git a/account_statement_base/README.rst b/account_statement_base/README.rst index 4b9b0354cd..b70bcc01fa 100644 --- a/account_statement_base/README.rst +++ b/account_statement_base/README.rst @@ -7,7 +7,7 @@ Bank Statement Base !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:b28cc8436e78d6e68d64f641d0edaafd28156fa93323635d72e98b03d52c29bf + !! source digest: sha256:d60e10ba742d1451f396681ed9a3b0adb0943800c293cdca508b719df09d6405 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png @@ -58,18 +58,18 @@ Authors Contributors ------------ -- `Akretion `__: +- `Akretion `__: - - Alexis de Lattre + - Alexis de Lattre -- `Tecnativa `__: +- `Tecnativa `__: - - Carlos Dauden - - Sergio Teruel + - Carlos Dauden + - Sergio Teruel -- `ForgeFlow `__: +- `ForgeFlow `__: - - Jordi Ballester + - Jordi Ballester Maintainers ----------- diff --git a/account_statement_base/__manifest__.py b/account_statement_base/__manifest__.py index 17c7bc6cc2..229232edbc 100644 --- a/account_statement_base/__manifest__.py +++ b/account_statement_base/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Bank Statement Base", - "version": "17.0.1.4.0", + "version": "17.0.1.4.1", "category": "Accounting", "license": "LGPL-3", "summary": "Base module for Bank Statements", diff --git a/account_statement_base/static/description/index.html b/account_statement_base/static/description/index.html index 6859e56c59..10ccf93073 100644 --- a/account_statement_base/static/description/index.html +++ b/account_statement_base/static/description/index.html @@ -367,7 +367,7 @@

Bank Statement Base

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:b28cc8436e78d6e68d64f641d0edaafd28156fa93323635d72e98b03d52c29bf +!! source digest: sha256:d60e10ba742d1451f396681ed9a3b0adb0943800c293cdca508b719df09d6405 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Mature License: LGPL-3 OCA/account-reconcile Translate me on Weblate Try me on Runboat

This is a technical module that adds the views of the Bank Statement