-
-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] account_statement_base: add possibility to navigate from statem…
…ent lines to the associated journal entry through a button. Adds also the journal entry number as an optional field
- Loading branch information
1 parent
ce99a73
commit ce3600d
Showing
6 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from . import account_journal_dashboard | ||
from . import account_bank_statement_line |
21 changes: 21 additions & 0 deletions
21
account_statement_base/models/account_bank_statement_line.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,7 @@ | |
|
||
* Carlos Dauden | ||
* Sergio Teruel | ||
|
||
* `ForgeFlow <https://www.forgeflow.com>`_: | ||
|
||
* Jordi Ballester |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters