update views

This commit is contained in:
matthieu.saison
2025-09-10 15:13:29 +02:00
parent a5b2f746aa
commit 8f91e6b494
4 changed files with 47 additions and 7 deletions

View File

@@ -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",
}

View File

@@ -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.

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="account_check_deposit_view_form" model="ir.ui.view">
<field name="model">account.check.deposit</field>
<field name="inherit_id" ref="account_check_deposit.account_check_deposit_view_form"/>
<field name="arch" type="xml">
<field name="journal_id" position="attributes">
<attribute name="domain">[('display_type', '=', 'payment')]</attribute>
</field>
</field>
</record>
</odoo>

View File

@@ -70,5 +70,25 @@
</field>
</record>
<record id="view_account_journal_tree" model="ir.ui.view">
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_tree" />
<field name="arch" type="xml">
<field name="type" position="replace">
<field name="display_type" string="Type"/>
</field>
</field>
</record>
<record id="view_account_journal_search" model="ir.ui.view">
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_search"/>
<field name="arch" type="xml">
<filter name="type_groupby" position="replace">
<filter name="type_groupby" string="Type" context="{'group_by': 'display_type'}"/>
</filter>
</field>
</record>
</data>
</odoo>