-
-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[14.0][ADD]account_reconciliation_widget_limit_aml: Filter all accoun…
…t move lines in reconciliation view
- Loading branch information
1 parent
dd4d11a
commit af13c22
Showing
13 changed files
with
133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright 2023 Valentin Vinagre <[email protected]> | ||
# Copyright 2023 Manuel Regidor <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import models |
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,16 @@ | ||
# Copyright 2023 Valentin Vinagre <[email protected]> | ||
# Copyright 2023 Manuel Regidor <[email protected]> | ||
# 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, | ||
} |
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,7 @@ | ||
# Copyright 2023 Valentin Vinagre <[email protected]> | ||
# Copyright 2023 Manuel Regidor <[email protected]> | ||
# 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 |
41 changes: 41 additions & 0 deletions
41
account_reconciliation_widget_limit_aml/models/reconciliation_widget.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,41 @@ | ||
# Copyright 2023 Valentin Vinagre <[email protected]> | ||
# Copyright 2023 Manuel Regidor <[email protected]> | ||
# 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 |
13 changes: 13 additions & 0 deletions
13
account_reconciliation_widget_limit_aml/models/res_company.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,13 @@ | ||
# Copyright 2023 Valentin Vinagre <[email protected]> | ||
# Copyright 2023 Manuel Regidor <[email protected]> | ||
# 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" | ||
) |
13 changes: 13 additions & 0 deletions
13
account_reconciliation_widget_limit_aml/models/res_config_settings.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,13 @@ | ||
# Copyright 2023 Valentin Vinagre <[email protected]> | ||
# Copyright 2023 Manuel Regidor <[email protected]> | ||
# 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 | ||
) |
2 changes: 2 additions & 0 deletions
2
account_reconciliation_widget_limit_aml/readme/CONTRIBUTORS.rst
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,2 @@ | ||
* Valentin Vinagre <[email protected]> | ||
* Manuel Regidor <[email protected]> |
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 @@ | ||
This module adds the option to filter all the account move lines by date in the reconciliation view, not only those coming from payments. |
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,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. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions
26
account_reconciliation_widget_limit_aml/views/res_config_settings_views.xml
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,26 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
Copyright 2023 Manuel Regidor <[email protected]> | ||
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> |
1 change: 1 addition & 0 deletions
1
...count_reconciliation_widget_limit_aml/odoo/addons/account_reconciliation_widget_limit_aml
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 @@ | ||
../../../../account_reconciliation_widget_limit_aml |
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,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |