commit
830e15866f
|
@ -11,7 +11,18 @@ class AccountBankStatement(models.Model):
|
||||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||||
"account_statement_base.account_bank_statement_line_action"
|
"account_statement_base.account_bank_statement_line_action"
|
||||||
)
|
)
|
||||||
action.update({"domain": [("statement_id", "=", self.id)]})
|
action.update(
|
||||||
|
{
|
||||||
|
"domain": [("statement_id", "=", self.id)],
|
||||||
|
"context": {
|
||||||
|
"default_journal_id": self._context.get("active_id")
|
||||||
|
if self._context.get("active_model") == "account.journal"
|
||||||
|
else None,
|
||||||
|
"account_bank_statement_line_main_view": True,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
return action
|
return action
|
||||||
|
|
||||||
def open_entries(self):
|
def open_entries(self):
|
||||||
|
|
|
@ -96,4 +96,23 @@
|
||||||
<field name="view_mode">tree,form,pivot,graph</field>
|
<field name="view_mode">tree,form,pivot,graph</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="view_bank_statement_tree" model="ir.ui.view">
|
||||||
|
<field name="name">account.bank.statement.tree</field>
|
||||||
|
<field name="model">account.bank.statement</field>
|
||||||
|
<field name="inherit_id" ref="account.view_bank_statement_tree" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree position="attributes">
|
||||||
|
<attribute name="create">true</attribute>
|
||||||
|
</tree>
|
||||||
|
<field name="balance_end_real" position="after">
|
||||||
|
<button
|
||||||
|
name="action_open_statement_lines"
|
||||||
|
type="object"
|
||||||
|
title="Open Statement Lines"
|
||||||
|
icon="fa-folder-open-o"
|
||||||
|
/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
Loading…
Reference in New Issue