mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[13.0][MIG] account_move_reconcile_helper
This commit is contained in:
@@ -17,7 +17,6 @@ class AccountMoveLine(models.Model):
|
||||
string="Reconciled lines",
|
||||
)
|
||||
|
||||
@api.multi
|
||||
@api.depends("matched_debit_ids", "matched_credit_ids")
|
||||
def _compute_partial_reconciliation_in_progress(self):
|
||||
for rec in self:
|
||||
@@ -25,12 +24,10 @@ class AccountMoveLine(models.Model):
|
||||
rec.matched_debit_ids
|
||||
) or bool(rec.matched_credit_ids)
|
||||
|
||||
@api.multi
|
||||
def _compute_reconciled_lines(self):
|
||||
for rec in self:
|
||||
rec.reconcile_line_ids = rec._get_reconciled_lines()
|
||||
|
||||
@api.multi
|
||||
def _get_reconciled_lines(self, move_lines=None):
|
||||
"""
|
||||
Returns lines which were reconciled directly or indirectly with
|
||||
@@ -64,7 +61,6 @@ class AccountMoveLine(models.Model):
|
||||
|
||||
return move_lines
|
||||
|
||||
@api.multi
|
||||
def open_full_reconcile_view(self):
|
||||
action = self.env.ref("account.action_account_moves_all_a").read()[0]
|
||||
action["domain"] = [("id", "in", self.mapped("reconcile_line_ids").ids)]
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
|
||||
Provides tools to facilitate reconciliation.
|
||||
|
||||
* Display a button on Journal entries list to show reconciled lines.
|
||||
* Added Balance field in Journal entries list (this feature
|
||||
* Display a button on Journal Items to show reconciled lines.
|
||||
* Added Balance field in Journal Items (this feature
|
||||
is provided by account_balance_line).
|
||||
|
||||
.. image:: ./static/docs/journal_entries_1.png
|
||||
:alt: Journal entries
|
||||
:scale: 50 %
|
||||
|
||||
.. image:: ./static/docs/journal_entries_2.png
|
||||
:alt: Reconciled lines view
|
||||
.. image:: ./static/docs/journal_items.png
|
||||
:alt: Journal items
|
||||
:scale: 50 %
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 69 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB |
BIN
account_move_reconcile_helper/static/docs/journal_items.png
Normal file
BIN
account_move_reconcile_helper/static/docs/journal_items.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 119 KiB |
@@ -84,6 +84,8 @@ class TestAccountMoveReconcileHelper(TransactionCase):
|
||||
)
|
||||
|
||||
lines.reconcile()
|
||||
# For v13, need to force compute
|
||||
lines._compute_reconciled_lines()
|
||||
|
||||
for line in lines:
|
||||
self.assertEquals(line.reconcile_line_ids, lines)
|
||||
@@ -102,6 +104,8 @@ class TestAccountMoveReconcileHelper(TransactionCase):
|
||||
)
|
||||
|
||||
lines.reconcile()
|
||||
# For v13, need to force compute
|
||||
lines._compute_reconciled_lines()
|
||||
|
||||
for line in lines:
|
||||
self.assertEquals(line.reconcile_line_ids, lines)
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2017 ACSONE SA/NV
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="account_move_line_tree_view" model="ir.ui.view">
|
||||
<field name="name">account.move.line.tree (in account_move_reconcile_helper)</field>
|
||||
<field
|
||||
name="name"
|
||||
>account.move.line.tree (in account_move_reconcile_helper)</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_tree"/>
|
||||
<field name="inherit_id" ref="account.view_move_line_tree" />
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<field name="full_reconcile_id" position="after">
|
||||
<field name="partial_reconciliation_in_progress" invisible="1"/>
|
||||
<button name="open_full_reconcile_view" type="object"
|
||||
string="Reconciled lines" icon="fa-list"
|
||||
attrs="{'invisible': [('full_reconcile_id', '=', False), ('partial_reconciliation_in_progress', '=', False)]}"/>
|
||||
<field name="partial_reconciliation_in_progress" invisible="1" />
|
||||
<button
|
||||
name="open_full_reconcile_view"
|
||||
type="object"
|
||||
string="Reconciled lines"
|
||||
icon="fa-list"
|
||||
attrs="{'invisible': [('full_reconcile_id', '=', False), ('partial_reconciliation_in_progress', '=', False)]}"
|
||||
/>
|
||||
</field>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user