mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[ADD] account_skip_bank_reconciliation
This commit is contained in:
66
account_skip_bank_reconciliation/README.rst
Normal file
66
account_skip_bank_reconciliation/README.rst
Normal 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.
|
||||
3
account_skip_bank_reconciliation/__init__.py
Executable file
3
account_skip_bank_reconciliation/__init__.py
Executable file
@@ -0,0 +1,3 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import models
|
||||
18
account_skip_bank_reconciliation/__manifest__.py
Normal file
18
account_skip_bank_reconciliation/__manifest__.py
Normal 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,
|
||||
}
|
||||
4
account_skip_bank_reconciliation/models/__init__.py
Executable file
4
account_skip_bank_reconciliation/models/__init__.py
Executable 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
|
||||
15
account_skip_bank_reconciliation/models/account_account.py
Normal file
15
account_skip_bank_reconciliation/models/account_account.py
Normal 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.")
|
||||
@@ -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)
|
||||
1
account_skip_bank_reconciliation/readme/CONTRIBUTORS.rst
Normal file
1
account_skip_bank_reconciliation/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1 @@
|
||||
* Miquel Raïch <miquel.raich@eficent.com>
|
||||
7
account_skip_bank_reconciliation/readme/DESCRIPTION.rst
Normal file
7
account_skip_bank_reconciliation/readme/DESCRIPTION.rst
Normal 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.
|
||||
5
account_skip_bank_reconciliation/readme/USAGE.rst
Normal file
5
account_skip_bank_reconciliation/readme/USAGE.rst
Normal 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.
|
||||
BIN
account_skip_bank_reconciliation/static/description/icon.png
Normal file
BIN
account_skip_bank_reconciliation/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
13
account_skip_bank_reconciliation/views/account_view.xml
Normal file
13
account_skip_bank_reconciliation/views/account_view.xml
Normal 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>
|
||||
Reference in New Issue
Block a user