odoo-addon-account-financial-report 16.0.1.5.4.3__py3-none-any.whl → 16.0.1.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of odoo-addon-account-financial-report might be problematic. Click here for more details.
- odoo/addons/account_financial_report/README.rst +36 -1
- odoo/addons/account_financial_report/__manifest__.py +4 -1
- odoo/addons/account_financial_report/i18n/account_financial_report.pot +105 -5
- odoo/addons/account_financial_report/i18n/es.po +103 -0
- odoo/addons/account_financial_report/i18n/it.po +13 -13
- odoo/addons/account_financial_report/models/__init__.py +2 -0
- odoo/addons/account_financial_report/models/account_age_report_configuration.py +47 -0
- odoo/addons/account_financial_report/models/res_config_settings.py +14 -0
- odoo/addons/account_financial_report/readme/CONFIGURE.rst +26 -0
- odoo/addons/account_financial_report/readme/CONTRIBUTORS.rst +1 -0
- odoo/addons/account_financial_report/readme/DESCRIPTION.rst +4 -0
- odoo/addons/account_financial_report/report/aged_partner_balance.py +69 -8
- odoo/addons/account_financial_report/report/aged_partner_balance_xlsx.py +145 -104
- odoo/addons/account_financial_report/report/templates/aged_partner_balance.xml +428 -333
- odoo/addons/account_financial_report/security/ir.model.access.csv +2 -0
- odoo/addons/account_financial_report/security/security.xml +10 -0
- odoo/addons/account_financial_report/static/description/index.html +45 -21
- odoo/addons/account_financial_report/tests/__init__.py +1 -0
- odoo/addons/account_financial_report/tests/test_age_report_configuration.py +41 -0
- odoo/addons/account_financial_report/tests/test_aged_partner_balance.py +88 -7
- odoo/addons/account_financial_report/view/account_age_report_configuration_views.xml +41 -0
- odoo/addons/account_financial_report/view/res_config_settings_views.xml +56 -0
- odoo/addons/account_financial_report/wizard/aged_partner_balance_wizard.py +4 -0
- odoo/addons/account_financial_report/wizard/aged_partner_balance_wizard_view.xml +2 -3
- {odoo_addon_account_financial_report-16.0.1.5.4.3.dist-info → odoo_addon_account_financial_report-16.0.1.6.0.dist-info}/METADATA +37 -2
- {odoo_addon_account_financial_report-16.0.1.5.4.3.dist-info → odoo_addon_account_financial_report-16.0.1.6.0.dist-info}/RECORD +28 -21
- {odoo_addon_account_financial_report-16.0.1.5.4.3.dist-info → odoo_addon_account_financial_report-16.0.1.6.0.dist-info}/WHEEL +0 -0
- {odoo_addon_account_financial_report-16.0.1.5.4.3.dist-info → odoo_addon_account_financial_report-16.0.1.6.0.dist-info}/top_level.txt +0 -0
|
@@ -5,3 +5,5 @@ access_journal_ledger_report_wizard,access_journal_ledger_report_wizard,model_jo
|
|
|
5
5
|
access_open_items_report_wizard,access_open_items_report_wizard,model_open_items_report_wizard,base.group_user,1,1,1,1
|
|
6
6
|
access_trial_balance_report_wizard,access_trial_balance_report_wizard,model_trial_balance_report_wizard,base.group_user,1,1,1,1
|
|
7
7
|
access_vat_report_wizard,access_vat_report_wizard,model_vat_report_wizard,base.group_user,1,1,1,1
|
|
8
|
+
access_account_age_report_configuration,access_account_age_report_configuration,model_account_age_report_configuration,base.group_user,1,1,1,1
|
|
9
|
+
access_account_age_report_configuration_line,access_account_age_report_configuration_line,model_account_age_report_configuration_line,base.group_user,1,1,1,1
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<odoo>
|
|
3
|
+
<record model="ir.rule" id="account_age_report_configuration_rule">
|
|
4
|
+
<field name="name">Account age report configuration rule</field>
|
|
5
|
+
<field name="model_id" ref="model_account_age_report_configuration" />
|
|
6
|
+
<field
|
|
7
|
+
name="domain_force"
|
|
8
|
+
>['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
|
|
9
|
+
</record>
|
|
10
|
+
</odoo>
|
|
@@ -366,7 +366,7 @@ ul.auto-toc {
|
|
|
366
366
|
!! This file is generated by oca-gen-addon-readme !!
|
|
367
367
|
!! changes will be overwritten. !!
|
|
368
368
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
369
|
-
!! source digest: sha256:
|
|
369
|
+
!! source digest: sha256:34860a3d62e5ebcec741d2f2bdc5a0e4e209b545dba76e0f9649a0aabb5aafbe
|
|
370
370
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
371
371
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-reporting/tree/16.0/account_financial_report"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-16-0/account-financial-reporting-16-0-account_financial_report"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
372
372
|
<p>This module adds a set of financial reports. They are accessible under
|
|
@@ -384,27 +384,50 @@ currency set up in account in order to display balances. Moreover, any foreign
|
|
|
384
384
|
currency used in account move lines is properly shown.</p>
|
|
385
385
|
<p>In case that in an account has not been configured a second currency foreign
|
|
386
386
|
currency balances are not available.</p>
|
|
387
|
+
<p>Invoicing / Settings / Invoicing / OCA Aged Report Configuration you will be able to set
|
|
388
|
+
dynamic intervals that will appear on the Aged Partner Balance.
|
|
389
|
+
For further information, check CONFIGURE.rst</p>
|
|
387
390
|
<p><strong>Table of contents</strong></p>
|
|
388
391
|
<div class="contents local topic" id="contents">
|
|
389
392
|
<ul class="simple">
|
|
390
|
-
<li><a class="reference internal" href="#
|
|
391
|
-
<li><a class="reference internal" href="#
|
|
392
|
-
<li><a class="reference internal" href="#
|
|
393
|
-
<li><a class="reference internal" href="#section-
|
|
394
|
-
<li><a class="reference internal" href="#section-
|
|
393
|
+
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
|
|
394
|
+
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-2">Known issues / Roadmap</a></li>
|
|
395
|
+
<li><a class="reference internal" href="#changelog" id="toc-entry-3">Changelog</a><ul>
|
|
396
|
+
<li><a class="reference internal" href="#section-1" id="toc-entry-4">11.0.2.5.0 (2019-04-26)</a></li>
|
|
397
|
+
<li><a class="reference internal" href="#section-2" id="toc-entry-5">11.0.2.4.1 (2019-01-08)</a></li>
|
|
398
|
+
<li><a class="reference internal" href="#section-3" id="toc-entry-6">11.0.2.3.1 (2018-11-29)</a></li>
|
|
395
399
|
</ul>
|
|
396
400
|
</li>
|
|
397
|
-
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-
|
|
398
|
-
<li><a class="reference internal" href="#credits" id="toc-entry-
|
|
399
|
-
<li><a class="reference internal" href="#authors" id="toc-entry-
|
|
400
|
-
<li><a class="reference internal" href="#contributors" id="toc-entry-
|
|
401
|
-
<li><a class="reference internal" href="#maintainers" id="toc-entry-
|
|
401
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-7">Bug Tracker</a></li>
|
|
402
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-8">Credits</a><ul>
|
|
403
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-9">Authors</a></li>
|
|
404
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-10">Contributors</a></li>
|
|
405
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-11">Maintainers</a></li>
|
|
402
406
|
</ul>
|
|
403
407
|
</li>
|
|
404
408
|
</ul>
|
|
405
409
|
</div>
|
|
410
|
+
<div class="section" id="configuration">
|
|
411
|
+
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
|
412
|
+
<p>To configure dynamic intervals for Aged Partner Balance you need to:</p>
|
|
413
|
+
<p>Go on ‘Settings’ -> ‘Invoicing’ -> ‘OCA Aged Report Configuration’.</p>
|
|
414
|
+
<p>Click on option ‘Configurations’ and create new record.</p>
|
|
415
|
+
<p>Create new interval.
|
|
416
|
+
The name established on line will be the column to display in Aged Partner Balance.
|
|
417
|
+
Inferior limit established on line is the interval</p>
|
|
418
|
+
<p>Example of configuration inferior limit:</p>
|
|
419
|
+
<p>-> 15
|
|
420
|
+
-> 30
|
|
421
|
+
-> 60</p>
|
|
422
|
+
<p>It means the first interval is from 0 to 15, the second from 16 to 30, and the third is 61+.</p>
|
|
423
|
+
<p>Go on ‘Invoicing’ -> ‘Reports’ -> ‘OCA accounting reports’ -> ‘Aged Partner Balance’</p>
|
|
424
|
+
<p>When wizard is open, you need to select your interval configuration and print report.</p>
|
|
425
|
+
<p>If you want to get default interval configuration any time you wish to print Aged Partner Report,
|
|
426
|
+
you can set default interval configuration per company in:</p>
|
|
427
|
+
<p>‘Settings’ -> ‘Invoicing’ -> ‘OCA Aged Report Configuration’.</p>
|
|
428
|
+
</div>
|
|
406
429
|
<div class="section" id="known-issues-roadmap">
|
|
407
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
|
430
|
+
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
|
|
408
431
|
<ul class="simple">
|
|
409
432
|
<li>‘VAT Report’ is valid only for cases where it’s met that for each
|
|
410
433
|
Tax defined: all the “Account tags” of all the
|
|
@@ -416,15 +439,15 @@ in “Target Moves” field in a wizard</li>
|
|
|
416
439
|
</ul>
|
|
417
440
|
</div>
|
|
418
441
|
<div class="section" id="changelog">
|
|
419
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
|
442
|
+
<h1><a class="toc-backref" href="#toc-entry-3">Changelog</a></h1>
|
|
420
443
|
<div class="section" id="section-1">
|
|
421
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
444
|
+
<h2><a class="toc-backref" href="#toc-entry-4">11.0.2.5.0 (2019-04-26)</a></h2>
|
|
422
445
|
<ul class="simple">
|
|
423
446
|
<li>In the Trial Balance you have an option to hide parent hierarchy levels</li>
|
|
424
447
|
</ul>
|
|
425
448
|
</div>
|
|
426
449
|
<div class="section" id="section-2">
|
|
427
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
450
|
+
<h2><a class="toc-backref" href="#toc-entry-5">11.0.2.4.1 (2019-01-08)</a></h2>
|
|
428
451
|
<ul class="simple">
|
|
429
452
|
<li>Handle better multicompany behaviour</li>
|
|
430
453
|
<li>Improve how title appears in the reports</li>
|
|
@@ -432,7 +455,7 @@ in “Target Moves” field in a wizard</li>
|
|
|
432
455
|
</ul>
|
|
433
456
|
</div>
|
|
434
457
|
<div class="section" id="section-3">
|
|
435
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
458
|
+
<h2><a class="toc-backref" href="#toc-entry-6">11.0.2.3.1 (2018-11-29)</a></h2>
|
|
436
459
|
<ul class="simple">
|
|
437
460
|
<li>In the Trial Balance you can apply a filter by hierarchy levels</li>
|
|
438
461
|
<li>In the General Ledger you can apply a filter by Analytic Tag</li>
|
|
@@ -441,7 +464,7 @@ in “Target Moves” field in a wizard</li>
|
|
|
441
464
|
</div>
|
|
442
465
|
</div>
|
|
443
466
|
<div class="section" id="bug-tracker">
|
|
444
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
|
467
|
+
<h1><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h1>
|
|
445
468
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues">GitHub Issues</a>.
|
|
446
469
|
In case of trouble, please check there if your issue has already been reported.
|
|
447
470
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
@@ -449,9 +472,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
449
472
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
450
473
|
</div>
|
|
451
474
|
<div class="section" id="credits">
|
|
452
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
|
475
|
+
<h1><a class="toc-backref" href="#toc-entry-8">Credits</a></h1>
|
|
453
476
|
<div class="section" id="authors">
|
|
454
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
477
|
+
<h2><a class="toc-backref" href="#toc-entry-9">Authors</a></h2>
|
|
455
478
|
<ul class="simple">
|
|
456
479
|
<li>Camptocamp SA</li>
|
|
457
480
|
<li>initOS GmbH</li>
|
|
@@ -460,7 +483,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
460
483
|
</ul>
|
|
461
484
|
</div>
|
|
462
485
|
<div class="section" id="contributors">
|
|
463
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
486
|
+
<h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2>
|
|
464
487
|
<ul class="simple">
|
|
465
488
|
<li>Jordi Ballester <<a class="reference external" href="mailto:jordi.ballester@forgeflow.com">jordi.ballester@forgeflow.com</a>></li>
|
|
466
489
|
<li>Yannick Vaucher <<a class="reference external" href="mailto:yannick.vaucher@camptocamp.com">yannick.vaucher@camptocamp.com</a>></li>
|
|
@@ -487,6 +510,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
487
510
|
<li>João Marques</li>
|
|
488
511
|
<li>Alexandre D. Díaz</li>
|
|
489
512
|
<li>Víctor Martínez</li>
|
|
513
|
+
<li>Carolina Fernandez</li>
|
|
490
514
|
</ul>
|
|
491
515
|
</li>
|
|
492
516
|
<li><a class="reference external" href="https://www.sygel.es">Sygel</a>:<ul>
|
|
@@ -502,7 +526,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
502
526
|
April 2016.</p>
|
|
503
527
|
</div>
|
|
504
528
|
<div class="section" id="maintainers">
|
|
505
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
529
|
+
<h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
|
|
506
530
|
<p>This module is maintained by the OCA.</p>
|
|
507
531
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
|
508
532
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Copyright 2023 Tecnativa - Carolina Fernandez
|
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
3
|
+
|
|
4
|
+
from odoo.exceptions import ValidationError
|
|
5
|
+
from odoo.tests import common
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TestAccountAgeReportConfiguration(common.TransactionCase):
|
|
9
|
+
@classmethod
|
|
10
|
+
def setUpClass(cls):
|
|
11
|
+
super().setUpClass()
|
|
12
|
+
cls.account_age_report_config = cls.env[
|
|
13
|
+
"account.age.report.configuration"
|
|
14
|
+
].create(
|
|
15
|
+
{
|
|
16
|
+
"name": "Intervals configuration",
|
|
17
|
+
"line_ids": [
|
|
18
|
+
(
|
|
19
|
+
0,
|
|
20
|
+
0,
|
|
21
|
+
{
|
|
22
|
+
"name": "1-30",
|
|
23
|
+
"inferior_limit": 30,
|
|
24
|
+
},
|
|
25
|
+
),
|
|
26
|
+
],
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
def test_check_line_ids_constraint(self):
|
|
31
|
+
with self.assertRaises(ValidationError):
|
|
32
|
+
self.env["account.age.report.configuration"].create(
|
|
33
|
+
{"name": "Interval configuration", "line_ids": False}
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
def test_check_lower_inferior_limit_constraint(self):
|
|
37
|
+
with self.assertRaises(ValidationError):
|
|
38
|
+
self.account_age_report_config.line_ids.inferior_limit = 0
|
|
39
|
+
|
|
40
|
+
with self.assertRaises(ValidationError):
|
|
41
|
+
self.account_age_report_config.line_ids.inferior_limit = -1
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Copyright 2021 Simone Rubino - Agile Business Group
|
|
2
|
+
# Copyright 2023 Tecnativa - Carolina Fernandez
|
|
2
3
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
3
4
|
|
|
4
5
|
from odoo.tests import TransactionCase
|
|
@@ -20,6 +21,36 @@ class TestAgedPartnerBalance(TransactionCase):
|
|
|
20
21
|
)
|
|
21
22
|
)
|
|
22
23
|
cls.wizard_model = cls.env["aged.partner.balance.report.wizard"]
|
|
24
|
+
# Check that report is produced correctly
|
|
25
|
+
cls.wizard_with_line_details = cls.wizard_model.create(
|
|
26
|
+
{
|
|
27
|
+
"show_move_line_details": True,
|
|
28
|
+
"receivable_accounts_only": True,
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
cls.wizard_without_line_details = cls.wizard_model.create(
|
|
32
|
+
{
|
|
33
|
+
"show_move_line_details": False,
|
|
34
|
+
"receivable_accounts_only": True,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
cls.account_age_report_config = cls.env[
|
|
38
|
+
"account.age.report.configuration"
|
|
39
|
+
].create(
|
|
40
|
+
{
|
|
41
|
+
"name": "Intervals configuration",
|
|
42
|
+
"line_ids": [
|
|
43
|
+
(
|
|
44
|
+
0,
|
|
45
|
+
0,
|
|
46
|
+
{
|
|
47
|
+
"name": "1-30",
|
|
48
|
+
"inferior_limit": 30,
|
|
49
|
+
},
|
|
50
|
+
),
|
|
51
|
+
],
|
|
52
|
+
}
|
|
53
|
+
)
|
|
23
54
|
cls.account001 = cls.env["account.account"].create(
|
|
24
55
|
{
|
|
25
56
|
"code": "001",
|
|
@@ -29,14 +60,10 @@ class TestAgedPartnerBalance(TransactionCase):
|
|
|
29
60
|
}
|
|
30
61
|
)
|
|
31
62
|
|
|
32
|
-
def
|
|
63
|
+
def test_report_without_aged_report_configuration(self):
|
|
33
64
|
"""Check that report is produced correctly."""
|
|
34
|
-
wizard = self.
|
|
35
|
-
|
|
36
|
-
"show_move_line_details": True,
|
|
37
|
-
"receivable_accounts_only": True,
|
|
38
|
-
}
|
|
39
|
-
)
|
|
65
|
+
wizard = self.wizard_with_line_details
|
|
66
|
+
|
|
40
67
|
wizard.onchange_type_accounts_only()
|
|
41
68
|
data = wizard._prepare_report_aged_partner_balance()
|
|
42
69
|
|
|
@@ -52,6 +79,22 @@ class TestAgedPartnerBalance(TransactionCase):
|
|
|
52
79
|
)
|
|
53
80
|
self.assertTrue(result)
|
|
54
81
|
|
|
82
|
+
second_wizard = self.wizard_without_line_details
|
|
83
|
+
second_wizard.onchange_type_accounts_only()
|
|
84
|
+
data = second_wizard._prepare_report_aged_partner_balance()
|
|
85
|
+
|
|
86
|
+
# Simulate web client behavior:
|
|
87
|
+
# default value is a datetime.date but web client sends back strings
|
|
88
|
+
data.update({"date_at": data["date_at"].strftime(DEFAULT_SERVER_DATE_FORMAT)})
|
|
89
|
+
result = test_reports.try_report(
|
|
90
|
+
self.env.cr,
|
|
91
|
+
self.env.uid,
|
|
92
|
+
"account_financial_report.aged_partner_balance",
|
|
93
|
+
second_wizard.ids,
|
|
94
|
+
data=data,
|
|
95
|
+
)
|
|
96
|
+
self.assertTrue(result)
|
|
97
|
+
|
|
55
98
|
def test_all_accounts_loaded(self):
|
|
56
99
|
# Tests if all accounts are loaded when the account_code_ fields changed
|
|
57
100
|
all_accounts = self.env["account.account"].search(
|
|
@@ -73,3 +116,41 @@ class TestAgedPartnerBalance(TransactionCase):
|
|
|
73
116
|
]
|
|
74
117
|
self.assertEqual(len(aged_partner_balance_code_set), len(all_accounts_code_set))
|
|
75
118
|
self.assertTrue(aged_partner_balance_code_set == all_accounts_code_set)
|
|
119
|
+
|
|
120
|
+
def test_report_with_aged_report_configuration(self):
|
|
121
|
+
"""Check that report is produced correctly."""
|
|
122
|
+
wizard = self.wizard_with_line_details
|
|
123
|
+
wizard.age_partner_config_id = self.account_age_report_config.id
|
|
124
|
+
|
|
125
|
+
wizard.onchange_type_accounts_only()
|
|
126
|
+
data = wizard._prepare_report_aged_partner_balance()
|
|
127
|
+
|
|
128
|
+
# Simulate web client behavior:
|
|
129
|
+
# default value is a datetime.date but web client sends back strings
|
|
130
|
+
data.update({"date_at": data["date_at"].strftime(DEFAULT_SERVER_DATE_FORMAT)})
|
|
131
|
+
result = test_reports.try_report(
|
|
132
|
+
self.env.cr,
|
|
133
|
+
self.env.uid,
|
|
134
|
+
"account_financial_report.aged_partner_balance",
|
|
135
|
+
wizard.ids,
|
|
136
|
+
data=data,
|
|
137
|
+
)
|
|
138
|
+
self.assertTrue(result)
|
|
139
|
+
|
|
140
|
+
second_wizard = self.wizard_without_line_details
|
|
141
|
+
second_wizard.age_partner_config_id = self.account_age_report_config.id
|
|
142
|
+
|
|
143
|
+
second_wizard.onchange_type_accounts_only()
|
|
144
|
+
data = second_wizard._prepare_report_aged_partner_balance()
|
|
145
|
+
|
|
146
|
+
# Simulate web client behavior:
|
|
147
|
+
# default value is a datetime.date but web client sends back strings
|
|
148
|
+
data.update({"date_at": data["date_at"].strftime(DEFAULT_SERVER_DATE_FORMAT)})
|
|
149
|
+
result = test_reports.try_report(
|
|
150
|
+
self.env.cr,
|
|
151
|
+
self.env.uid,
|
|
152
|
+
"account_financial_report.aged_partner_balance",
|
|
153
|
+
second_wizard.ids,
|
|
154
|
+
data=data,
|
|
155
|
+
)
|
|
156
|
+
self.assertTrue(result)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<!-- Copyright 2023 Ernesto Garcia <ernesto.garcia@tecnativa.com>
|
|
3
|
+
Copyright 2023 Carolina Fernandez <carolina.fernandez@tecnativa.com>
|
|
4
|
+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
|
5
|
+
<odoo>
|
|
6
|
+
<record id="aged_partner_report_configuration_form" model="ir.ui.view">
|
|
7
|
+
<field name="name">Age partner report configuration form</field>
|
|
8
|
+
<field name="model">account.age.report.configuration</field>
|
|
9
|
+
<field name="arch" type="xml">
|
|
10
|
+
<form>
|
|
11
|
+
<sheet>
|
|
12
|
+
<group>
|
|
13
|
+
<field name="name" />
|
|
14
|
+
<field name="company_id" />
|
|
15
|
+
</group>
|
|
16
|
+
<field name="line_ids">
|
|
17
|
+
<tree editable="bottom">
|
|
18
|
+
<field name="name" />
|
|
19
|
+
<field name="inferior_limit" />
|
|
20
|
+
</tree>
|
|
21
|
+
</field>
|
|
22
|
+
</sheet>
|
|
23
|
+
</form>
|
|
24
|
+
</field>
|
|
25
|
+
</record>
|
|
26
|
+
<record id="aged_partner_report_configuration_tree" model="ir.ui.view">
|
|
27
|
+
<field name="name">Age partner report configuration tree</field>
|
|
28
|
+
<field name="model">account.age.report.configuration</field>
|
|
29
|
+
<field name="arch" type="xml">
|
|
30
|
+
<tree>
|
|
31
|
+
<field name="name" />
|
|
32
|
+
<field name="company_id" />
|
|
33
|
+
</tree>
|
|
34
|
+
</field>
|
|
35
|
+
</record>
|
|
36
|
+
<record id="action_aged_partner_report_configuration" model="ir.actions.act_window">
|
|
37
|
+
<field name="name">Age Partner Report Configuration</field>
|
|
38
|
+
<field name="res_model">account.age.report.configuration</field>
|
|
39
|
+
<field name="view_mode">tree,form</field>
|
|
40
|
+
</record>
|
|
41
|
+
</odoo>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
+
<!-- Copyright 2023 Tecnativa - Carolina Fernandez
|
|
3
|
+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
|
4
|
+
<odoo>
|
|
5
|
+
<record id="res_config_settings_view_form" model="ir.ui.view">
|
|
6
|
+
<field name="model">res.config.settings</field>
|
|
7
|
+
<field name="inherit_id" ref="account.res_config_settings_view_form" />
|
|
8
|
+
<field name="arch" type="xml">
|
|
9
|
+
<xpath expr="//div[@id='analytic']" position="after">
|
|
10
|
+
<div id="oca_aged_report_config">
|
|
11
|
+
<h2>OCA Aged Report Configuration</h2>
|
|
12
|
+
<div
|
|
13
|
+
class="row mt16 o_settings_container"
|
|
14
|
+
name="main_aged_report_setting_container"
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
17
|
+
class="col-12 col-lg-6 o_setting_box"
|
|
18
|
+
id="main_aged_report_config"
|
|
19
|
+
>
|
|
20
|
+
<div class="o_setting_left_pane" />
|
|
21
|
+
<div class="o_setting_right_pane">
|
|
22
|
+
<span
|
|
23
|
+
class="o_form_label"
|
|
24
|
+
>Intervals configuration</span>
|
|
25
|
+
<div class="text-muted">
|
|
26
|
+
Here you can set the intervals that will appear on the Aged Partner Balance.
|
|
27
|
+
</div>
|
|
28
|
+
<div class="content-group">
|
|
29
|
+
<div class="row mt16">
|
|
30
|
+
<label
|
|
31
|
+
for="default_age_partner_config_id"
|
|
32
|
+
class="col-lg-3 o_light_label"
|
|
33
|
+
/>
|
|
34
|
+
<field
|
|
35
|
+
name="default_age_partner_config_id"
|
|
36
|
+
options="{'no_create_edit': True, 'no_open': True}"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="mt8">
|
|
40
|
+
<button
|
|
41
|
+
type="action"
|
|
42
|
+
name="%(account_financial_report.action_aged_partner_report_configuration)d"
|
|
43
|
+
string="Configurations"
|
|
44
|
+
class="btn-link"
|
|
45
|
+
icon="fa-arrow-right"
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</xpath>
|
|
54
|
+
</field>
|
|
55
|
+
</record>
|
|
56
|
+
</odoo>
|
|
@@ -40,6 +40,9 @@ class AgedPartnerBalanceWizard(models.TransientModel):
|
|
|
40
40
|
comodel_name="account.account",
|
|
41
41
|
help="Ending account in a range",
|
|
42
42
|
)
|
|
43
|
+
age_partner_config_id = fields.Many2one(
|
|
44
|
+
"account.age.report.configuration", string="Intervals configuration"
|
|
45
|
+
)
|
|
43
46
|
|
|
44
47
|
@api.onchange("account_code_from", "account_code_to")
|
|
45
48
|
def on_change_account_range(self):
|
|
@@ -140,6 +143,7 @@ class AgedPartnerBalanceWizard(models.TransientModel):
|
|
|
140
143
|
"partner_ids": self.partner_ids.ids,
|
|
141
144
|
"show_move_line_details": self.show_move_line_details,
|
|
142
145
|
"account_financial_report_lang": self.env.lang,
|
|
146
|
+
"age_partner_config_id": self.age_partner_config_id.id,
|
|
143
147
|
}
|
|
144
148
|
|
|
145
149
|
def _export(self, report_type):
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
/>
|
|
34
34
|
</group>
|
|
35
35
|
<group name="account_filter" col="4">
|
|
36
|
+
<label for="age_partner_config_id" />
|
|
37
|
+
<field name="age_partner_config_id" nolabel="1" />
|
|
36
38
|
<label for="account_ids" colspan="4" />
|
|
37
39
|
<field name="receivable_accounts_only" />
|
|
38
40
|
<field name="payable_accounts_only" />
|
|
@@ -68,19 +70,16 @@
|
|
|
68
70
|
default_focus="1"
|
|
69
71
|
class="oe_highlight"
|
|
70
72
|
/>
|
|
71
|
-
or
|
|
72
73
|
<button
|
|
73
74
|
name="button_export_pdf"
|
|
74
75
|
string="Export PDF"
|
|
75
76
|
type="object"
|
|
76
77
|
/>
|
|
77
|
-
or
|
|
78
78
|
<button
|
|
79
79
|
name="button_export_xlsx"
|
|
80
80
|
string="Export XLSX"
|
|
81
81
|
type="object"
|
|
82
82
|
/>
|
|
83
|
-
or
|
|
84
83
|
<button string="Cancel" class="oe_link" special="cancel" />
|
|
85
84
|
</footer>
|
|
86
85
|
</form>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-account-financial-report
|
|
3
|
-
Version: 16.0.1.
|
|
3
|
+
Version: 16.0.1.6.0
|
|
4
4
|
Summary: OCA Financial Reports
|
|
5
5
|
Home-page: https://github.com/OCA/account-financial-reporting
|
|
6
6
|
Author: Camptocamp SA,initOS GmbH,redCOR AG,ForgeFlow,Odoo Community Association (OCA)
|
|
@@ -25,7 +25,7 @@ Account Financial Reports
|
|
|
25
25
|
!! This file is generated by oca-gen-addon-readme !!
|
|
26
26
|
!! changes will be overwritten. !!
|
|
27
27
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
28
|
-
!! source digest: sha256:
|
|
28
|
+
!! source digest: sha256:34860a3d62e5ebcec741d2f2bdc5a0e4e209b545dba76e0f9649a0aabb5aafbe
|
|
29
29
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
30
30
|
|
|
31
31
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -63,11 +63,45 @@ currency used in account move lines is properly shown.
|
|
|
63
63
|
In case that in an account has not been configured a second currency foreign
|
|
64
64
|
currency balances are not available.
|
|
65
65
|
|
|
66
|
+
Invoicing / Settings / Invoicing / OCA Aged Report Configuration you will be able to set
|
|
67
|
+
dynamic intervals that will appear on the Aged Partner Balance.
|
|
68
|
+
For further information, check CONFIGURE.rst
|
|
69
|
+
|
|
66
70
|
**Table of contents**
|
|
67
71
|
|
|
68
72
|
.. contents::
|
|
69
73
|
:local:
|
|
70
74
|
|
|
75
|
+
Configuration
|
|
76
|
+
=============
|
|
77
|
+
|
|
78
|
+
To configure dynamic intervals for Aged Partner Balance you need to:
|
|
79
|
+
|
|
80
|
+
Go on 'Settings' -> 'Invoicing' -> 'OCA Aged Report Configuration'.
|
|
81
|
+
|
|
82
|
+
Click on option 'Configurations' and create new record.
|
|
83
|
+
|
|
84
|
+
Create new interval.
|
|
85
|
+
The name established on line will be the column to display in Aged Partner Balance.
|
|
86
|
+
Inferior limit established on line is the interval
|
|
87
|
+
|
|
88
|
+
Example of configuration inferior limit:
|
|
89
|
+
|
|
90
|
+
-> 15
|
|
91
|
+
-> 30
|
|
92
|
+
-> 60
|
|
93
|
+
|
|
94
|
+
It means the first interval is from 0 to 15, the second from 16 to 30, and the third is 61+.
|
|
95
|
+
|
|
96
|
+
Go on 'Invoicing' -> 'Reports' -> 'OCA accounting reports' -> 'Aged Partner Balance'
|
|
97
|
+
|
|
98
|
+
When wizard is open, you need to select your interval configuration and print report.
|
|
99
|
+
|
|
100
|
+
If you want to get default interval configuration any time you wish to print Aged Partner Report,
|
|
101
|
+
you can set default interval configuration per company in:
|
|
102
|
+
|
|
103
|
+
'Settings' -> 'Invoicing' -> 'OCA Aged Report Configuration'.
|
|
104
|
+
|
|
71
105
|
Known issues / Roadmap
|
|
72
106
|
======================
|
|
73
107
|
|
|
@@ -152,6 +186,7 @@ Contributors
|
|
|
152
186
|
* João Marques
|
|
153
187
|
* Alexandre D. Díaz
|
|
154
188
|
* Víctor Martínez
|
|
189
|
+
* Carolina Fernandez
|
|
155
190
|
|
|
156
191
|
* `Sygel <https://www.sygel.es>`__:
|
|
157
192
|
|