mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
5
account_reconciliation_widget_limit_aml/__init__.py
Normal file
5
account_reconciliation_widget_limit_aml/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# Copyright 2023 Valentin Vinagre <valentin.vinagre@sygel.es>
|
||||
# Copyright 2023 Manuel Regidor <manuel.regidor@sygel.es>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import models
|
||||
16
account_reconciliation_widget_limit_aml/__manifest__.py
Normal file
16
account_reconciliation_widget_limit_aml/__manifest__.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Copyright 2023 Valentin Vinagre <valentin.vinagre@sygel.es>
|
||||
# Copyright 2023 Manuel Regidor <manuel.regidor@sygel.es>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
{
|
||||
"name": "Account Reconciliation Widget Limit AML",
|
||||
"version": "14.0.1.0.0",
|
||||
"category": "Accounting",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Filter all account move lines in reconciliation view",
|
||||
"author": "Sygel, Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/account-reconcile",
|
||||
"depends": ["account_reconciliation_widget"],
|
||||
"data": ["views/res_config_settings_views.xml"],
|
||||
"installable": True,
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# Copyright 2023 Valentin Vinagre <valentin.vinagre@sygel.es>
|
||||
# Copyright 2023 Manuel Regidor <manuel.regidor@sygel.es>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import res_company
|
||||
from . import res_config_settings
|
||||
from . import reconciliation_widget
|
||||
@@ -0,0 +1,41 @@
|
||||
# Copyright 2023 Valentin Vinagre <valentin.vinagre@sygel.es>
|
||||
# Copyright 2023 Manuel Regidor <manuel.regidor@sygel.es>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import api, models
|
||||
from odoo.osv import expression
|
||||
|
||||
|
||||
class AccountReconciliation(models.AbstractModel):
|
||||
_inherit = "account.reconciliation.widget"
|
||||
|
||||
@api.model
|
||||
def _domain_move_lines_for_reconciliation(
|
||||
self,
|
||||
st_line,
|
||||
aml_accounts,
|
||||
partner_id,
|
||||
excluded_ids=None,
|
||||
search_str=False,
|
||||
mode="rp",
|
||||
):
|
||||
domain = super()._domain_move_lines_for_reconciliation(
|
||||
st_line, aml_accounts, partner_id, excluded_ids, search_str, mode
|
||||
)
|
||||
if (
|
||||
st_line.company_id.account_bank_reconciliation_start_all_aml
|
||||
and st_line.company_id.account_bank_reconciliation_start
|
||||
):
|
||||
domain = expression.AND(
|
||||
[
|
||||
domain,
|
||||
[
|
||||
(
|
||||
"date",
|
||||
">=",
|
||||
st_line.company_id.account_bank_reconciliation_start,
|
||||
)
|
||||
],
|
||||
]
|
||||
)
|
||||
return domain
|
||||
@@ -0,0 +1,13 @@
|
||||
# Copyright 2023 Valentin Vinagre <valentin.vinagre@sygel.es>
|
||||
# Copyright 2023 Manuel Regidor <manuel.regidor@sygel.es>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
_inherit = "res.company"
|
||||
|
||||
account_bank_reconciliation_start_all_aml = fields.Boolean(
|
||||
string="Filter all account move lines"
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
# Copyright 2023 Valentin Vinagre <valentin.vinagre@sygel.es>
|
||||
# Copyright 2023 Manuel Regidor <manuel.regidor@sygel.es>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = "res.config.settings"
|
||||
|
||||
account_bank_reconciliation_start_all_aml = fields.Boolean(
|
||||
related="company_id.account_bank_reconciliation_start_all_aml", readonly=False
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
* Valentin Vinagre <valentin.vinagre@sygel.es>
|
||||
* Manuel Regidor <manuel.regidor@sygel.es>
|
||||
@@ -0,0 +1 @@
|
||||
This module adds the option to filter all the account move lines by date in the reconciliation view, not only those coming from payments.
|
||||
2
account_reconciliation_widget_limit_aml/readme/USAGE.rst
Normal file
2
account_reconciliation_widget_limit_aml/readme/USAGE.rst
Normal file
@@ -0,0 +1,2 @@
|
||||
Go to Invoicing --> Configuration --> Settings
|
||||
Check the "Filter all account move lines" checkbox. When checked, all the account move lines will be filtered by the selected date.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2023 Manuel Regidor <manuel.regidor@sygel.es>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
-->
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="model">res.config.settings</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="account_reconciliation_widget.res_config_settings_view_form"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//field[@name='account_bank_reconciliation_start']"
|
||||
position="after"
|
||||
>
|
||||
<br />
|
||||
<field name="account_bank_reconciliation_start_all_aml" />
|
||||
<label for="account_bank_reconciliation_start_all_aml" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -0,0 +1 @@
|
||||
../../../../account_reconciliation_widget_limit_aml
|
||||
6
setup/account_reconciliation_widget_limit_aml/setup.py
Normal file
6
setup/account_reconciliation_widget_limit_aml/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
Reference in New Issue
Block a user