[IMP] account_statement_base: add possibility to navigate from statement lines to the
associated journal entry through a button. Adds also the journal entry number as an optional fieldpull/678/head
parent
ce99a73946
commit
ce3600dc6c
|
@ -69,6 +69,10 @@ Contributors
|
|||
* Carlos Dauden
|
||||
* Sergio Teruel
|
||||
|
||||
* `ForgeFlow <https://www.forgeflow.com>`_:
|
||||
|
||||
* Jordi Ballester
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
from . import account_journal_dashboard
|
||||
from . import account_bank_statement_line
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# Copyright 2024 ForgeFlow
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class AccountBankStatementLine(models.Model):
|
||||
|
||||
_inherit = "account.bank.statement.line"
|
||||
|
||||
def action_open_journal_entry(self):
|
||||
self.ensure_one()
|
||||
if not self:
|
||||
return {}
|
||||
result = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"account.action_move_line_form"
|
||||
)
|
||||
res = self.env.ref("account.view_move_form", False)
|
||||
result["views"] = [(res and res.id or False, "form")]
|
||||
result["res_id"] = self.move_id.id
|
||||
return result
|
|
@ -6,3 +6,7 @@
|
|||
|
||||
* Carlos Dauden
|
||||
* Sergio Teruel
|
||||
|
||||
* `ForgeFlow <https://www.forgeflow.com>`_:
|
||||
|
||||
* Jordi Ballester
|
||||
|
|
|
@ -418,6 +418,10 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|||
<li>Sergio Teruel</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference external" href="https://www.forgeflow.com">ForgeFlow</a>:<ul>
|
||||
<li>Jordi Ballester</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
<tree editable="top" multi_edit="1" decoration-muted="is_reconciled">
|
||||
<field name="sequence" />
|
||||
<field name="date" attrs="{'readonly': [('is_reconciled', '=', True)]}" />
|
||||
<field name="move_id" optional="hide" />
|
||||
<field
|
||||
name="payment_ref"
|
||||
attrs="{'readonly': [('is_reconciled', '=', True)]}"
|
||||
|
@ -112,6 +113,12 @@
|
|||
icon="fa-undo"
|
||||
attrs="{'invisible': [('is_reconciled', '=', False)]}"
|
||||
/>
|
||||
<button
|
||||
name="action_open_journal_entry"
|
||||
type="object"
|
||||
title="Open Journal Entry"
|
||||
icon="fa-folder-open-o"
|
||||
/>
|
||||
<field name="company_id" invisible="1" />
|
||||
<field name="is_reconciled" invisible="1" />
|
||||
<field name="currency_id" invisible="1" />
|
||||
|
|
Loading…
Reference in New Issue