[ADD] account_skip_bank_reconciliation

This commit is contained in:
mreficent
2018-10-02 17:29:59 +02:00
committed by Lois Rilo
parent a17fd4bfc7
commit e25896a4b7
11 changed files with 151 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3
================================
Account Skip Bank Reconciliation
================================
This module allows to exclude from bank statement reconciliation
all journal items of a specific reconcilable account.
Usually, you would want to that in accounts like the
`Goods Received Not Invoiced`, which are required to be reconcilable
to be able to have proper traceability in stock received but
their reconciliation is done using the `account_mass_reconcile` module.
Usage
=====
To use this module, you need to:
#. Go to `Invoicing / Configuration / Accounting / Charts of Accounts`
and open a reconcilable account.
#. In that account, select or not the `Exclude from Bank Reconciliation` option.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/98/11.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/account-reconcile/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.
Credits
=======
Images
------
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
Contributors
------------
* Miquel Raïch <miquel.raich@eficent.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.

View File

@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import models

View File

@@ -0,0 +1,18 @@
# Copyright 2018 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Account Skip Bank Reconciliation",
"summary": "Allows to exclude from bank statement reconciliation "
"all journal items of a reconcilable account",
"version": "11.0.1.0.0",
"depends": ["account"],
"author": "Eficent, Odoo Community Association (OCA)",
"website": "http://www.github.com/OCA/account-reconcile",
"category": "Finance",
"data": [
"views/account_view.xml",
],
'license': 'AGPL-3',
'installable': True,
}

View File

@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import account_account
from . import account_bank_statement

View File

@@ -0,0 +1,15 @@
# © 20118 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountAccount(models.Model):
_inherit = "account.account"
exclude_bank_reconcile = fields.Boolean(
string='Exclude from Bank Reconciliation',
default=False,
help="Check this box if the journal items of this account "
"should not appear in the list of journal items to match "
"a statement line.")

View File

@@ -0,0 +1,19 @@
# © 20118 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models
class AccountBankStatementLine(models.Model):
_inherit = "account.bank.statement.line"
def get_move_lines_for_reconciliation(
self, partner_id=None, excluded_ids=None, str=False, offset=0,
limit=None, additional_domain=None, overlook_partner=False):
am_lines = super(AccountBankStatementLine, self).\
get_move_lines_for_reconciliation(
partner_id=partner_id, excluded_ids=excluded_ids, str=str,
offset=offset, limit=limit, additional_domain=additional_domain,
overlook_partner=overlook_partner)
return am_lines.filtered(
lambda line: not line.account_id.exclude_bank_reconcile)

View File

@@ -0,0 +1 @@
* Miquel Raïch <miquel.raich@eficent.com>

View File

@@ -0,0 +1,7 @@
This module allows to exclude from bank statement reconciliation
all journal items of a specific reconcilable account.
Usually, you would want to that in accounts like the
`Goods Received Not Invoiced`, which are required to be reconcilable
to be able to have proper traceability in stock received but
their reconciliation is done using the `account_mass_reconcile` module.

View File

@@ -0,0 +1,5 @@
To use this module, you need to:
#. Go to `Invoicing / Configuration / Accounting / Charts of Accounts`
and open a reconcilable account.
#. In that account, select or not the `Exclude from Bank Reconciliation` option.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_account_form" model="ir.ui.view">
<field name="name">account.account.form</field>
<field name="model">account.account</field>
<field name="inherit_id" ref="account.view_account_form"/>
<field name="arch" type="xml">
<xpath expr="//div/field[@name='reconcile']/.." position="after">
<field name="exclude_bank_reconcile" attrs="{'invisible': [('reconcile', '=', False)]}" domain="[('reconcile', '=', True)]"/>
</xpath>
</field>
</record>
</odoo>