hide the reconciled bank lines
This commit is contained in:
parent
302f15fa98
commit
147419cf5a
Binary file not shown.
@ -5,6 +5,14 @@ from odoo.exceptions import UserError
|
|||||||
class AccountBankStatementLine(models.Model):
|
class AccountBankStatementLine(models.Model):
|
||||||
_inherit = 'account.bank.statement.line'
|
_inherit = 'account.bank.statement.line'
|
||||||
|
|
||||||
|
is_reconciled = fields.Boolean(string='Is Reconciled', compute='_compute_is_reconciled', store=True)
|
||||||
|
|
||||||
|
@api.depends('move_id')
|
||||||
|
def _compute_is_reconciled(self):
|
||||||
|
"""Compute whether the bank line has been reconciled"""
|
||||||
|
for line in self:
|
||||||
|
line.is_reconciled = bool(line.move_id and 'Reconciliation:' in line.move_id.name)
|
||||||
|
|
||||||
def action_reconcile_selected_lines(self):
|
def action_reconcile_selected_lines(self):
|
||||||
"""Open the reconciliation wizard for selected lines"""
|
"""Open the reconciliation wizard for selected lines"""
|
||||||
# Get the selected records from the context
|
# Get the selected records from the context
|
||||||
|
|||||||
@ -37,14 +37,14 @@
|
|||||||
<field name="name">account.bank.statement.line.tree</field>
|
<field name="name">account.bank.statement.line.tree</field>
|
||||||
<field name="model">account.bank.statement.line</field>
|
<field name="model">account.bank.statement.line</field>
|
||||||
<field name="arch" type="xml">
|
<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">
|
<tree string="Bank Statement Lines" create="0" delete="0" decoration-danger="amount < 0">
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="partner_id"/>
|
<field name="partner_id"/>
|
||||||
<field name="amount"/>
|
<field name="amount"/>
|
||||||
<field name="journal_id"/>
|
<field name="journal_id"/>
|
||||||
<field name="statement_id"/>
|
<field name="statement_id"/>
|
||||||
<field name="move_id"/>
|
<field name="move_id" invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@ -60,7 +60,6 @@
|
|||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="ref"/>
|
<field name="ref"/>
|
||||||
@ -70,7 +69,6 @@
|
|||||||
<field name="partner_id"/>
|
<field name="partner_id"/>
|
||||||
<field name="journal_id" readonly="1"/>
|
<field name="journal_id" readonly="1"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
|
||||||
<group>
|
<group>
|
||||||
<field name="statement_id"/>
|
<field name="statement_id"/>
|
||||||
<field name="move_id"/>
|
<field name="move_id"/>
|
||||||
@ -93,6 +91,8 @@
|
|||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
<filter name="positive_amount" string="Income" domain="[('amount', '>', 0)]"/>
|
<filter name="positive_amount" string="Income" domain="[('amount', '>', 0)]"/>
|
||||||
<filter name="negative_amount" string="Expense" domain="[('amount', '<', 0)]"/>
|
<filter name="negative_amount" string="Expense" domain="[('amount', '<', 0)]"/>
|
||||||
|
<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">
|
<group expand="0" string="Group By">
|
||||||
<filter name="group_by_journal" string="Journal" context="{'group_by': 'journal_id'}"/>
|
<filter name="group_by_journal" string="Journal" context="{'group_by': 'journal_id'}"/>
|
||||||
<filter name="group_by_date" string="Date" context="{'group_by': 'date'}"/>
|
<filter name="group_by_date" string="Date" context="{'group_by': 'date'}"/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user