Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions account_journal_display_type/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
10 changes: 5 additions & 5 deletions account_journal_display_type/models/readme/DESCSRIPTION.rst
Original file line number Diff line number Diff line change
@@ -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.
12 changes: 12 additions & 0 deletions account_journal_display_type/views/account_check_deposit_view.xml
Original file line number Diff line number Diff line change
@@ -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>
20 changes: 20 additions & 0 deletions account_journal_display_type/views/account_journal_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>