From f74229181b247e22842328cc750543f562ec9884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Sainl=C3=A9ger?= Date: Tue, 17 Mar 2026 23:04:52 +0100 Subject: [PATCH] [MIG] account_usability_misc: Migration to 18.0 --- account_usability_misc/README.rst | 12 ++- account_usability_misc/__init__.py | 2 +- account_usability_misc/__manifest__.py | 43 +++++----- .../models/account_bank_statement_line.py | 12 ++- .../views/account_search.xml | 78 ++++++++++--------- .../views/account_tree_view.xml | 26 +++---- .../views/bank_statement_line_views.xml | 66 +++++++++------- .../views/bank_statement_views.xml | 13 ---- 8 files changed, 130 insertions(+), 122 deletions(-) delete mode 100644 account_usability_misc/views/bank_statement_views.xml diff --git a/account_usability_misc/README.rst b/account_usability_misc/README.rst index 02b8169..d403bc8 100644 --- a/account_usability_misc/README.rst +++ b/account_usability_misc/README.rst @@ -2,7 +2,7 @@ account_usability_misc ====================== -Various chantes to improve the usability of Account application +Various changes to improve the usability of Account application Installation ============ @@ -10,13 +10,19 @@ Installation Use Odoo normal module installation procedure to install ``account_usability_misc``. +This module depends on: + +* ``account`` +* ``base`` +* ``account_reconcile_oca`` (available in OCA/account-reconcile repository) +* ``account_statement_base`` (available in OCA/account-reconcile repository) + Description =========== - Removes the right to unlink bank statements and bank statement lines for all users - Changes some french translation - On reconcile view : filter account move lines by defaut with journal type -- Hide Create button in Bank Statement tree view - Create a technical group with unlink righ on bank statements and bank statement lines Known issues / Roadmap @@ -27,7 +33,7 @@ None yet. Bug Tracker =========== -Bugs are tracked on `our issues website `_. In case of +Bugs are tracked on `our issues website `_. 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. diff --git a/account_usability_misc/__init__.py b/account_usability_misc/__init__.py index 9a7e03e..0650744 100644 --- a/account_usability_misc/__init__.py +++ b/account_usability_misc/__init__.py @@ -1 +1 @@ -from . import models \ No newline at end of file +from . import models diff --git a/account_usability_misc/__manifest__.py b/account_usability_misc/__manifest__.py index daa99ac..939ccc0 100644 --- a/account_usability_misc/__manifest__.py +++ b/account_usability_misc/__manifest__.py @@ -1,26 +1,25 @@ +# Copyright 2025 Elabore +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + { - 'name': 'Account Usability Misc', - 'version': '16.0.2.0.0', - 'description': 'account usability misc : improve account usability in v16', - 'summary': 'Various chantes to improve the usability of Account application', - 'author': 'Elabore', - 'website': 'https://git.elabore.coop/elabore/account-tools', - 'license': 'AGPL-3', - 'category': 'Accounting', - 'depends': [ - 'account', - 'base', - 'account_reconcile_oca', - 'account_statement_base', + "name": "Account Usability Misc", + "version": "18.0.1.0.0", + "summary": "Various changes to improve the usability of Account application", + "author": "Elabore", + "website": "https://git.elabore.coop/elabore/account-tools", + "license": "AGPL-3", + "category": "Accounting", + "depends": [ + "account", + "account_reconcile_oca", + "account_statement_base", ], - 'data': [ - 'views/account_search.xml', - 'views/account_tree_view.xml', - 'views/bank_statement_line_views.xml', - 'views/bank_statement_views.xml', + "data": [ + "views/account_search.xml", + "views/account_tree_view.xml", + "views/bank_statement_line_views.xml", ], - 'installable': True, - 'auto_install': False, - 'application': False, - 'assets': {}, + "installable": True, + "auto_install": False, + "application": False, } diff --git a/account_usability_misc/models/account_bank_statement_line.py b/account_usability_misc/models/account_bank_statement_line.py index 78360e8..c7456a3 100644 --- a/account_usability_misc/models/account_bank_statement_line.py +++ b/account_usability_misc/models/account_bank_statement_line.py @@ -4,11 +4,17 @@ from odoo import fields, models class AccountBankStatementLine(models.Model): _inherit = "account.bank.statement.line" - move_line_journal_type = fields.Char(string="Journal Type", compute="_compute_move_line_journal_type") + move_line_journal_type = fields.Char( + string="Journal Type", compute="_compute_move_line_journal_type" + ) def _compute_move_line_journal_type(self): for rec in self: - if self._context.get('default_journal_id'): - rec.move_line_journal_type = self.env["account.journal"].browse(self._context.get('default_journal_id')).type + if self._context.get("default_journal_id"): + rec.move_line_journal_type = ( + self.env["account.journal"] + .browse(self._context.get("default_journal_id")) + .type + ) else: rec.move_line_journal_type = None diff --git a/account_usability_misc/views/account_search.xml b/account_usability_misc/views/account_search.xml index 9a98de3..d0ecf78 100644 --- a/account_usability_misc/views/account_search.xml +++ b/account_usability_misc/views/account_search.xml @@ -1,39 +1,45 @@ - + - - - Account move line search reconcile view inherit - account.move.line - - - - - ['|', '|', '|', ('name', 'ilike', self), ('amount_residual', 'ilike', self), ('ref', 'ilike', self), ('partner_id', 'ilike', self)] - Amount/Name/Partner - - + + Account move line search reconcile view inherit + account.move.line + + + + ['|', '|', '|', ('name', 'ilike', self), ('amount_residual', 'ilike', self), ('ref', 'ilike', self), ('partner_id', 'ilike', self)] + Amount/Name/Partner - - - account.bank.statement.line.reconcile.inherit - account.bank.statement.line - - - - - - - { - 'search_default_cash': move_line_journal_type == 'cash', - 'search_default_purchases': move_line_journal_type == 'purchases', - 'search_default_sales': move_line_journal_type == 'sales', - 'search_default_general': move_line_journal_type == 'general', - 'search_default_partner_id': partner_id, - 'tree_view_ref': 'account_reconcile_oca.account_move_line_tree_reconcile_view', - 'search_view_ref': 'account_reconcile_oca.account_move_line_search_reconcile_view'} - - - - - + + + + account.bank.statement.line.reconcile.inherit + account.bank.statement.line + + + + + + + { + 'search_default_cash': move_line_journal_type == 'cash', + 'search_default_purchases': move_line_journal_type == 'purchases', + 'search_default_sales': move_line_journal_type == 'sales', + 'search_default_general': move_line_journal_type == 'general', + 'search_default_partner_id': partner_id, + 'list_view_ref': 'account_reconcile_oca.account_move_line_tree_reconcile_view', + 'search_view_ref': 'account_reconcile_oca.account_move_line_search_reconcile_view'} + + + diff --git a/account_usability_misc/views/account_tree_view.xml b/account_usability_misc/views/account_tree_view.xml index 7da5088..9a8d7e7 100644 --- a/account_usability_misc/views/account_tree_view.xml +++ b/account_usability_misc/views/account_tree_view.xml @@ -1,17 +1,13 @@ - + - - - account view tree inherit message attachment - account.move - - - - - - - + + account view tree inherit message attachment + account.move + + + + - - - \ No newline at end of file + + + diff --git a/account_usability_misc/views/bank_statement_line_views.xml b/account_usability_misc/views/bank_statement_line_views.xml index 5400d71..8d275f8 100644 --- a/account_usability_misc/views/bank_statement_line_views.xml +++ b/account_usability_misc/views/bank_statement_line_views.xml @@ -1,32 +1,40 @@ - + - + + + account.bank.statement.line.tree.inherit.hide.create + account.bank.statement.line + + + + false + + + - - - - account.bank.statement.line.tree.inherit.hide.create - account.bank.statement.line - - - - false - - - - - - - - account.bank.statement.line.kanban.inherit.hide.create - account.bank.statement.line - - - - false - - - - - + + + account.bank.statement.line.kanban.inherit.hide.create + account.bank.statement.line + + + + false + + + diff --git a/account_usability_misc/views/bank_statement_views.xml b/account_usability_misc/views/bank_statement_views.xml deleted file mode 100644 index 5349dea..0000000 --- a/account_usability_misc/views/bank_statement_views.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - account.bank.statement.tree - account.bank.statement - - - - false - - - - \ No newline at end of file