feat: Update module to Odoo 19, migrating tree views to list views, and refining bank statement reconciliation filters and search view grouping.
This commit is contained in:
parent
d75a96007e
commit
7917d4fc06
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
# Python
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Editor
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
# Odoo
|
||||
*.pot
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
'name': 'Bank Statement Reconciliation',
|
||||
'version': '17.0.1.0.0',
|
||||
'version': '19.0.1.0.0',
|
||||
'category': 'Accounting',
|
||||
'summary': 'Reconcile bank statement lines with journal entries',
|
||||
'description': """
|
||||
@ -26,7 +26,7 @@
|
||||
'wizards/bank_reconcile_wizard_views.xml',
|
||||
'views/menu.xml',
|
||||
],
|
||||
# Tree view includes sum="Total Amount" footer for displaying totals
|
||||
# List view includes sum="Total Amount" footer for displaying totals
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
}
|
||||
@ -16,13 +16,13 @@ class BankStatementSelector(models.TransientModel):
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': 'Bank Statement Lines',
|
||||
'res_model': 'account.bank.statement.line',
|
||||
'view_mode': 'tree,form',
|
||||
'view_mode': 'list,form',
|
||||
'domain': [('journal_id', '=', self.journal_id.id)],
|
||||
'context': {
|
||||
'search_default_journal_id': self.journal_id.id,
|
||||
},
|
||||
'views': [
|
||||
(self.env.ref('bank_statement_reconciliation.view_account_bank_statement_line_tree').id, 'tree'),
|
||||
(self.env.ref('bank_statement_reconciliation.view_account_bank_statement_line_tree').id, 'list'),
|
||||
(self.env.ref('bank_statement_reconciliation.view_account_bank_statement_line_form').id, 'form')
|
||||
]
|
||||
}
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
<record id="action_bank_statement_lines" model="ir.actions.act_window">
|
||||
<field name="name">Bank Statement Lines</field>
|
||||
<field name="res_model">account.bank.statement.line</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{'tree_view_ref': 'bank_statement_reconciliation.view_account_bank_statement_line_tree'}</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="context">{'list_view_ref': 'bank_statement_reconciliation.view_account_bank_statement_line_tree'}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Select a bank journal to view its statement lines
|
||||
@ -33,12 +33,12 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view for bank statement lines -->
|
||||
<!-- List view for bank statement lines -->
|
||||
<record id="view_account_bank_statement_line_tree" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.tree</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Bank Statement Lines" create="0" delete="0" decoration-danger="amount < 0" decoration-muted="move_id and 'Reconciliation:' in move_id.name" multi_edit="1">
|
||||
<list string="Bank Statement Lines" create="0" delete="0" decoration-danger="amount < 0" decoration-muted="move_id and 'Reconciliation:' in move_id.name" multi_edit="1">
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="suitable_journal_ids" column_invisible="True"/>
|
||||
@ -49,7 +49,7 @@
|
||||
<field name="journal_id"/>
|
||||
<field name="statement_id"/>
|
||||
<field name="move_id"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@ -97,12 +97,10 @@
|
||||
<field name="date"/>
|
||||
<filter name="positive_amount" string="Income" domain="[('amount', '>', 0)]"/>
|
||||
<filter name="negative_amount" string="Expense" domain="[('amount', '<', 0)]"/>
|
||||
<filter name="hide_reconciled" string="Hide Reconciled" domain="[('move_id', 'not ilike', '%Reconciliation:%')]" help="Hide lines that have been reconciled"/>
|
||||
<filter name="hide_reconciled" string="Hide Reconciled" domain="[('is_reconciled', '=', False)]" help="Hide lines that have been reconciled"/>
|
||||
<filter name="show_all" string="Show All" domain="[]" help="Show all lines including reconciled"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter name="group_by_journal" string="Journal" context="{'group_by': 'journal_id'}"/>
|
||||
<filter name="group_by_date" string="Date" context="{'group_by': 'date'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user