From 8f91e6b494f902a127b95545a12b7dba40f49422 Mon Sep 17 00:00:00 2001 From: "matthieu.saison" Date: Wed, 10 Sep 2025 15:13:29 +0200 Subject: [PATCH] update views --- account_journal_display_type/__manifest__.py | 12 +++++++++-- .../models/readme/DESCSRIPTION.rst | 10 +++++----- .../views/account_check_deposit_view.xml | 12 +++++++++++ .../views/account_journal_view.xml | 20 +++++++++++++++++++ 4 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 account_journal_display_type/views/account_check_deposit_view.xml diff --git a/account_journal_display_type/__manifest__.py b/account_journal_display_type/__manifest__.py index 05b6630..4c937fd 100644 --- a/account_journal_display_type/__manifest__.py +++ b/account_journal_display_type/__manifest__.py @@ -11,7 +11,15 @@ "author": "Akretion, " "Odoo Community Association (OCA)", "maintainers": ["matthieu_saison"], "license": "AGPL-3", - "depends": ["account", "account_statement_completion_label_simple"], - "data": ["views/account_journal_view.xml"], + "depends": [ + "account", + "account_statement_completion_label_simple", + "account_usability", + "account_check_deposit" + ], + "data": [ + "views/account_journal_view.xml", + "views/account_check_deposit_view.xml" + ], "post_init_hook": "post_init_hook", } diff --git a/account_journal_display_type/models/readme/DESCSRIPTION.rst b/account_journal_display_type/models/readme/DESCSRIPTION.rst index 521e44e..b48cfe8 100644 --- a/account_journal_display_type/models/readme/DESCSRIPTION.rst +++ b/account_journal_display_type/models/readme/DESCSRIPTION.rst @@ -1,8 +1,8 @@ -This module introduce improvement on journal type to simplify configuration of Payment and Cash Journal. +This module introduces improvements to the journal type, simplifying the configuration of payment and cash journals. -The payment journal does not exist in odoo, it's associate to a bank journal but in payment case, -the default_account_id will have the same value as payment_debit_account_id. -This module introduce a new field type called display_type who hide the default type from UI, and make possible to had new journal type. Payment display_type is hadded here, and the associated legacy journal type is bank. The default_account_id is hided and will have the same value as payment_debit_account_id +The payment journal does not exist in Odoo; it is associated with a bank journal, but in the case of payments, +Tthe default_account_id will have the same value as payment_debit_account_id. +This module introduces a new field type called 'display_type' which hides the default type from the UI and makes it possible to add new journal types. The payment display type has been added here, and the associated legacy journal type is bank. The 'default_account_id' field is hidden and will have the same value as 'payment_debit_account_id'. -For Cash type, the only field we kept is default_account_id. The payment config tab is useless for a cash journal and was remove from UI. (in this case payment_debit_account_id and payment_credit_account_id are set with value of default_account_id) +For the cash type, the only field that has been kept is the default_account_id. The Payment Configuration tab is no longer useful for a cash journal, so it has been removed from the user interface. In this case, payment_debit_account_id and payment_credit_account_id are set to the value of default_account_id. \ No newline at end of file diff --git a/account_journal_display_type/views/account_check_deposit_view.xml b/account_journal_display_type/views/account_check_deposit_view.xml new file mode 100644 index 0000000..d6939f6 --- /dev/null +++ b/account_journal_display_type/views/account_check_deposit_view.xml @@ -0,0 +1,12 @@ + + + + account.check.deposit + + + + [('display_type', '=', 'payment')] + + + + diff --git a/account_journal_display_type/views/account_journal_view.xml b/account_journal_display_type/views/account_journal_view.xml index 8f45f65..94528f0 100644 --- a/account_journal_display_type/views/account_journal_view.xml +++ b/account_journal_display_type/views/account_journal_view.xml @@ -70,5 +70,25 @@ + + + account.journal + + + + + + + + + + account.journal + + + + + + +