odoo-addon-account-financial-report 17.0.1.0.0.13__py3-none-any.whl → 17.0.1.1.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 +38 -1
- odoo/addons/account_financial_report/__manifest__.py +4 -1
- odoo/addons/account_financial_report/i18n/account_financial_report.pot +111 -13
- odoo/addons/account_financial_report/i18n/es.po +112 -3
- 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.md +26 -0
- odoo/addons/account_financial_report/readme/CONTRIBUTORS.md +1 -0
- odoo/addons/account_financial_report/readme/DESCRIPTION.md +4 -0
- odoo/addons/account_financial_report/report/aged_partner_balance.py +79 -3
- odoo/addons/account_financial_report/report/aged_partner_balance_xlsx.py +144 -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 +8 -0
- odoo/addons/account_financial_report/static/description/index.html +47 -21
- odoo/addons/account_financial_report/tests/__init__.py +1 -0
- odoo/addons/account_financial_report/tests/test_age_report_configuration.py +42 -0
- odoo/addons/account_financial_report/tests/test_aged_partner_balance.py +84 -5
- 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 +51 -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-17.0.1.0.0.13.dist-info → odoo_addon_account_financial_report-17.0.1.1.0.dist-info}/METADATA +39 -2
- {odoo_addon_account_financial_report-17.0.1.0.0.13.dist-info → odoo_addon_account_financial_report-17.0.1.1.0.dist-info}/RECORD +27 -20
- {odoo_addon_account_financial_report-17.0.1.0.0.13.dist-info → odoo_addon_account_financial_report-17.0.1.1.0.dist-info}/WHEEL +0 -0
- {odoo_addon_account_financial_report-17.0.1.0.0.13.dist-info → odoo_addon_account_financial_report-17.0.1.1.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,8 @@
|
|
|
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 name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
|
|
7
|
+
</record>
|
|
8
|
+
</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:1646f077641870ec261bd1513165189de8e744eed6d39b928177882b85bc4fa8
|
|
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/17.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-17-0/account-financial-reporting-17-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=17.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
|
|
@@ -385,27 +385,52 @@ balances. Moreover, any foreign currency used in account move lines is
|
|
|
385
385
|
properly shown.</p>
|
|
386
386
|
<p>In case that in an account has not been configured a second currency
|
|
387
387
|
foreign currency balances are not available.</p>
|
|
388
|
+
<p>Invoicing / Settings / Invoicing / OCA Aged Report Configuration you
|
|
389
|
+
will be able to set dynamic intervals that will appear on the Aged
|
|
390
|
+
Partner Balance. For further information, check CONFIGURE.rst</p>
|
|
388
391
|
<p><strong>Table of contents</strong></p>
|
|
389
392
|
<div class="contents local topic" id="contents">
|
|
390
393
|
<ul class="simple">
|
|
391
|
-
<li><a class="reference internal" href="#
|
|
392
|
-
<li><a class="reference internal" href="#
|
|
393
|
-
<li><a class="reference internal" href="#
|
|
394
|
-
<li><a class="reference internal" href="#section-
|
|
395
|
-
<li><a class="reference internal" href="#section-
|
|
394
|
+
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
|
|
395
|
+
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-2">Known issues / Roadmap</a></li>
|
|
396
|
+
<li><a class="reference internal" href="#changelog" id="toc-entry-3">Changelog</a><ul>
|
|
397
|
+
<li><a class="reference internal" href="#section-1" id="toc-entry-4">11.0.2.5.0 (2019-04-26)</a></li>
|
|
398
|
+
<li><a class="reference internal" href="#section-2" id="toc-entry-5">11.0.2.4.1 (2019-01-08)</a></li>
|
|
399
|
+
<li><a class="reference internal" href="#section-3" id="toc-entry-6">11.0.2.3.1 (2018-11-29)</a></li>
|
|
396
400
|
</ul>
|
|
397
401
|
</li>
|
|
398
|
-
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-
|
|
399
|
-
<li><a class="reference internal" href="#credits" id="toc-entry-
|
|
400
|
-
<li><a class="reference internal" href="#authors" id="toc-entry-
|
|
401
|
-
<li><a class="reference internal" href="#contributors" id="toc-entry-
|
|
402
|
-
<li><a class="reference internal" href="#maintainers" id="toc-entry-
|
|
402
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-7">Bug Tracker</a></li>
|
|
403
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-8">Credits</a><ul>
|
|
404
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-9">Authors</a></li>
|
|
405
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-10">Contributors</a></li>
|
|
406
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-11">Maintainers</a></li>
|
|
403
407
|
</ul>
|
|
404
408
|
</li>
|
|
405
409
|
</ul>
|
|
406
410
|
</div>
|
|
411
|
+
<div class="section" id="configuration">
|
|
412
|
+
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
|
413
|
+
<p>To configure dynamic intervals for Aged Partner Balance you need to:</p>
|
|
414
|
+
<p>Go on ‘Settings’ -> ‘Invoicing’ -> ‘OCA Aged Report Configuration’.</p>
|
|
415
|
+
<p>Click on option ‘Configurations’ and create new record.</p>
|
|
416
|
+
<p>Create new interval. The name established on line will be the column to
|
|
417
|
+
display in Aged Partner Balance. Inferior limit established on line is
|
|
418
|
+
the interval</p>
|
|
419
|
+
<p>Example of configuration inferior limit:</p>
|
|
420
|
+
<p>-> 15 -> 30 -> 60</p>
|
|
421
|
+
<p>It means the first interval is from 0 to 15, the second from 16 to 30,
|
|
422
|
+
and the third is 61+.</p>
|
|
423
|
+
<p>Go on ‘Invoicing’ -> ‘Reports’ -> ‘OCA accounting reports’ -> ‘Aged
|
|
424
|
+
Partner Balance’</p>
|
|
425
|
+
<p>When wizard is open, you need to select your interval configuration and
|
|
426
|
+
print report.</p>
|
|
427
|
+
<p>If you want to get default interval configuration any time you wish to
|
|
428
|
+
print Aged Partner Report, you can set default interval configuration
|
|
429
|
+
per company in:</p>
|
|
430
|
+
<p>‘Settings’ -> ‘Invoicing’ -> ‘OCA Aged Report Configuration’.</p>
|
|
431
|
+
</div>
|
|
407
432
|
<div class="section" id="known-issues-roadmap">
|
|
408
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
|
433
|
+
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
|
|
409
434
|
<ul class="simple">
|
|
410
435
|
<li>‘VAT Report’ is valid only for cases where it’s met that for each Tax
|
|
411
436
|
defined: all the “Account tags” of all the ‘Repartition for Invoices’
|
|
@@ -416,16 +441,16 @@ Moves” field in a wizard</li>
|
|
|
416
441
|
</ul>
|
|
417
442
|
</div>
|
|
418
443
|
<div class="section" id="changelog">
|
|
419
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
|
444
|
+
<h1><a class="toc-backref" href="#toc-entry-3">Changelog</a></h1>
|
|
420
445
|
<div class="section" id="section-1">
|
|
421
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
446
|
+
<h2><a class="toc-backref" href="#toc-entry-4">11.0.2.5.0 (2019-04-26)</a></h2>
|
|
422
447
|
<ul class="simple">
|
|
423
448
|
<li>In the Trial Balance you have an option to hide parent hierarchy
|
|
424
449
|
levels</li>
|
|
425
450
|
</ul>
|
|
426
451
|
</div>
|
|
427
452
|
<div class="section" id="section-2">
|
|
428
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
453
|
+
<h2><a class="toc-backref" href="#toc-entry-5">11.0.2.4.1 (2019-01-08)</a></h2>
|
|
429
454
|
<ul class="simple">
|
|
430
455
|
<li>Handle better multicompany behaviour</li>
|
|
431
456
|
<li>Improve how title appears in the reports</li>
|
|
@@ -433,7 +458,7 @@ levels</li>
|
|
|
433
458
|
</ul>
|
|
434
459
|
</div>
|
|
435
460
|
<div class="section" id="section-3">
|
|
436
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
461
|
+
<h2><a class="toc-backref" href="#toc-entry-6">11.0.2.3.1 (2018-11-29)</a></h2>
|
|
437
462
|
<ul class="simple">
|
|
438
463
|
<li>In the Trial Balance you can apply a filter by hierarchy levels</li>
|
|
439
464
|
<li>In the General Ledger you can apply a filter by Analytic Tag</li>
|
|
@@ -442,7 +467,7 @@ levels</li>
|
|
|
442
467
|
</div>
|
|
443
468
|
</div>
|
|
444
469
|
<div class="section" id="bug-tracker">
|
|
445
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
|
470
|
+
<h1><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h1>
|
|
446
471
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues">GitHub Issues</a>.
|
|
447
472
|
In case of trouble, please check there if your issue has already been reported.
|
|
448
473
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
@@ -450,9 +475,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
450
475
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
451
476
|
</div>
|
|
452
477
|
<div class="section" id="credits">
|
|
453
|
-
<h1><a class="toc-backref" href="#toc-entry-
|
|
478
|
+
<h1><a class="toc-backref" href="#toc-entry-8">Credits</a></h1>
|
|
454
479
|
<div class="section" id="authors">
|
|
455
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
480
|
+
<h2><a class="toc-backref" href="#toc-entry-9">Authors</a></h2>
|
|
456
481
|
<ul class="simple">
|
|
457
482
|
<li>Camptocamp SA</li>
|
|
458
483
|
<li>initOS GmbH</li>
|
|
@@ -461,7 +486,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
461
486
|
</ul>
|
|
462
487
|
</div>
|
|
463
488
|
<div class="section" id="contributors">
|
|
464
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
489
|
+
<h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2>
|
|
465
490
|
<ul class="simple">
|
|
466
491
|
<li>Jordi Ballester <<a class="reference external" href="mailto:jordi.ballester@forgeflow.com">jordi.ballester@forgeflow.com</a>></li>
|
|
467
492
|
<li>Yannick Vaucher <<a class="reference external" href="mailto:yannick.vaucher@camptocamp.com">yannick.vaucher@camptocamp.com</a>></li>
|
|
@@ -488,6 +513,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
488
513
|
<li>Jo??o Marques</li>
|
|
489
514
|
<li>Alexandre D. D??az</li>
|
|
490
515
|
<li>V??ctor Mart??nez</li>
|
|
516
|
+
<li>Carolina Fernandez</li>
|
|
491
517
|
</ul>
|
|
492
518
|
</li>
|
|
493
519
|
<li><a class="reference external" href="https://www.sygel.es">Sygel</a>:<ul>
|
|
@@ -503,7 +529,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
503
529
|
in April 2016.</p>
|
|
504
530
|
</div>
|
|
505
531
|
<div class="section" id="maintainers">
|
|
506
|
-
<h2><a class="toc-backref" href="#toc-entry-
|
|
532
|
+
<h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
|
|
507
533
|
<p>This module is maintained by the OCA.</p>
|
|
508
534
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
|
509
535
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
@@ -0,0 +1,42 @@
|
|
|
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, tagged
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@tagged("post_install", "-at_install")
|
|
9
|
+
class TestAccountAgeReportConfiguration(common.TransactionCase):
|
|
10
|
+
@classmethod
|
|
11
|
+
def setUpClass(cls):
|
|
12
|
+
super().setUpClass()
|
|
13
|
+
cls.account_age_report_config = cls.env[
|
|
14
|
+
"account.age.report.configuration"
|
|
15
|
+
].create(
|
|
16
|
+
{
|
|
17
|
+
"name": "Intervals configuration",
|
|
18
|
+
"line_ids": [
|
|
19
|
+
(
|
|
20
|
+
0,
|
|
21
|
+
0,
|
|
22
|
+
{
|
|
23
|
+
"name": "1-30",
|
|
24
|
+
"inferior_limit": 30,
|
|
25
|
+
},
|
|
26
|
+
),
|
|
27
|
+
],
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
def test_check_line_ids_constraint(self):
|
|
32
|
+
with self.assertRaises(ValidationError):
|
|
33
|
+
self.env["account.age.report.configuration"].create(
|
|
34
|
+
{"name": "Interval configuration", "line_ids": False}
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
def test_check_lower_inferior_limit_constraint(self):
|
|
38
|
+
with self.assertRaises(ValidationError):
|
|
39
|
+
self.account_age_report_config.line_ids.inferior_limit = 0
|
|
40
|
+
|
|
41
|
+
with self.assertRaises(ValidationError):
|
|
42
|
+
self.account_age_report_config.line_ids.inferior_limit = -1
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# Copyright 2021 Simone Rubino - Agile Business Group
|
|
2
2
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
3
3
|
|
|
4
|
-
from odoo.tests import TransactionCase
|
|
4
|
+
from odoo.tests import TransactionCase, tagged
|
|
5
5
|
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, test_reports
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
@tagged("post_install", "-at_install")
|
|
8
9
|
class TestAgedPartnerBalance(TransactionCase):
|
|
9
10
|
@classmethod
|
|
10
11
|
def setUpClass(cls):
|
|
@@ -20,15 +21,75 @@ class TestAgedPartnerBalance(TransactionCase):
|
|
|
20
21
|
)
|
|
21
22
|
)
|
|
22
23
|
cls.wizard_model = cls.env["aged.partner.balance.report.wizard"]
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"""Check that report is produced correctly."""
|
|
26
|
-
wizard = self.wizard_model.create(
|
|
24
|
+
# Check that report is produced correctly
|
|
25
|
+
cls.wizard_with_line_details = cls.wizard_model.create(
|
|
27
26
|
{
|
|
28
27
|
"show_move_line_details": True,
|
|
29
28
|
"receivable_accounts_only": True,
|
|
30
29
|
}
|
|
31
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
|
+
)
|
|
54
|
+
|
|
55
|
+
def test_report_without_aged_report_configuration(self):
|
|
56
|
+
"""Check that report is produced correctly."""
|
|
57
|
+
wizard = self.wizard_with_line_details
|
|
58
|
+
wizard.onchange_type_accounts_only()
|
|
59
|
+
data = wizard._prepare_report_aged_partner_balance()
|
|
60
|
+
|
|
61
|
+
# Simulate web client behavior:
|
|
62
|
+
# default value is a datetime.date but web client sends back strings
|
|
63
|
+
data.update({"date_at": data["date_at"].strftime(DEFAULT_SERVER_DATE_FORMAT)})
|
|
64
|
+
result = test_reports.try_report(
|
|
65
|
+
self.env.cr,
|
|
66
|
+
self.env.uid,
|
|
67
|
+
"account_financial_report.aged_partner_balance",
|
|
68
|
+
wizard.ids,
|
|
69
|
+
data=data,
|
|
70
|
+
)
|
|
71
|
+
self.assertTrue(result)
|
|
72
|
+
second_wizard = self.wizard_without_line_details
|
|
73
|
+
second_wizard.onchange_type_accounts_only()
|
|
74
|
+
data = second_wizard._prepare_report_aged_partner_balance()
|
|
75
|
+
|
|
76
|
+
# Simulate web client behavior:
|
|
77
|
+
# default value is a datetime.date but web client sends back strings
|
|
78
|
+
data.update({"date_at": data["date_at"].strftime(DEFAULT_SERVER_DATE_FORMAT)})
|
|
79
|
+
result = test_reports.try_report(
|
|
80
|
+
self.env.cr,
|
|
81
|
+
self.env.uid,
|
|
82
|
+
"account_financial_report.aged_partner_balance",
|
|
83
|
+
second_wizard.ids,
|
|
84
|
+
data=data,
|
|
85
|
+
)
|
|
86
|
+
self.assertTrue(result)
|
|
87
|
+
|
|
88
|
+
def test_report_with_aged_report_configuration(self):
|
|
89
|
+
"""Check that report is produced correctly."""
|
|
90
|
+
wizard = self.wizard_with_line_details
|
|
91
|
+
wizard.age_partner_config_id = self.account_age_report_config.id
|
|
92
|
+
|
|
32
93
|
wizard.onchange_type_accounts_only()
|
|
33
94
|
data = wizard._prepare_report_aged_partner_balance()
|
|
34
95
|
|
|
@@ -43,3 +104,21 @@ class TestAgedPartnerBalance(TransactionCase):
|
|
|
43
104
|
data=data,
|
|
44
105
|
)
|
|
45
106
|
self.assertTrue(result)
|
|
107
|
+
|
|
108
|
+
second_wizard = self.wizard_without_line_details
|
|
109
|
+
second_wizard.age_partner_config_id = self.account_age_report_config.id
|
|
110
|
+
|
|
111
|
+
second_wizard.onchange_type_accounts_only()
|
|
112
|
+
data = second_wizard._prepare_report_aged_partner_balance()
|
|
113
|
+
|
|
114
|
+
# Simulate web client behavior:
|
|
115
|
+
# default value is a datetime.date but web client sends back strings
|
|
116
|
+
data.update({"date_at": data["date_at"].strftime(DEFAULT_SERVER_DATE_FORMAT)})
|
|
117
|
+
result = test_reports.try_report(
|
|
118
|
+
self.env.cr,
|
|
119
|
+
self.env.uid,
|
|
120
|
+
"account_financial_report.aged_partner_balance",
|
|
121
|
+
second_wizard.ids,
|
|
122
|
+
data=data,
|
|
123
|
+
)
|
|
124
|
+
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,51 @@
|
|
|
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="//block[@id='analytic']" position="after">
|
|
10
|
+
<block
|
|
11
|
+
title="OCA Aged Report Configuration"
|
|
12
|
+
id="oca_aged_report_config"
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
id="main_oca_aged_report_config"
|
|
16
|
+
class="col-12 col-lg-12 o_setting_box"
|
|
17
|
+
>
|
|
18
|
+
<div class="o_setting_left_pane" />
|
|
19
|
+
<div class="o_setting_right_pane">
|
|
20
|
+
<span class="o_form_label">Intervals configuration</span>
|
|
21
|
+
<div class="text-muted">
|
|
22
|
+
Here you can set the intervals that will appear on the Aged Partner Balance.
|
|
23
|
+
</div>
|
|
24
|
+
<div class="content-group">
|
|
25
|
+
<div class="row mt16">
|
|
26
|
+
<label
|
|
27
|
+
for="default_age_partner_config_id"
|
|
28
|
+
class="col-lg-3 o_light_label"
|
|
29
|
+
/>
|
|
30
|
+
<field
|
|
31
|
+
name="default_age_partner_config_id"
|
|
32
|
+
options="{'no_create_edit': True, 'no_open': True}"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="mt8">
|
|
36
|
+
<button
|
|
37
|
+
type="action"
|
|
38
|
+
name="%(account_financial_report.action_aged_partner_report_configuration)d"
|
|
39
|
+
string="Configurations"
|
|
40
|
+
class="btn-link"
|
|
41
|
+
icon="fa-arrow-right"
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</block>
|
|
48
|
+
</xpath>
|
|
49
|
+
</field>
|
|
50
|
+
</record>
|
|
51
|
+
</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: 17.0.1.
|
|
3
|
+
Version: 17.0.1.1.0
|
|
4
4
|
Requires-Python: >=3.10
|
|
5
5
|
Requires-Dist: odoo-addon-date_range>=17.0dev,<17.1dev
|
|
6
6
|
Requires-Dist: odoo-addon-report_xlsx>=17.0dev,<17.1dev
|
|
@@ -24,7 +24,7 @@ Account Financial Reports
|
|
|
24
24
|
!! This file is generated by oca-gen-addon-readme !!
|
|
25
25
|
!! changes will be overwritten. !!
|
|
26
26
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
|
-
!! source digest: sha256:
|
|
27
|
+
!! source digest: sha256:1646f077641870ec261bd1513165189de8e744eed6d39b928177882b85bc4fa8
|
|
28
28
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
29
29
|
|
|
30
30
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -63,11 +63,47 @@ properly shown.
|
|
|
63
63
|
In case that in an account has not been configured a second currency
|
|
64
64
|
foreign currency balances are not available.
|
|
65
65
|
|
|
66
|
+
Invoicing / Settings / Invoicing / OCA Aged Report Configuration you
|
|
67
|
+
will be able to set dynamic intervals that will appear on the Aged
|
|
68
|
+
Partner Balance. 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. The name established on line will be the column to
|
|
85
|
+
display in Aged Partner Balance. Inferior limit established on line is
|
|
86
|
+
the interval
|
|
87
|
+
|
|
88
|
+
Example of configuration inferior limit:
|
|
89
|
+
|
|
90
|
+
-> 15 -> 30 -> 60
|
|
91
|
+
|
|
92
|
+
It means the first interval is from 0 to 15, the second from 16 to 30,
|
|
93
|
+
and the third is 61+.
|
|
94
|
+
|
|
95
|
+
Go on 'Invoicing' -> 'Reports' -> 'OCA accounting reports' -> 'Aged
|
|
96
|
+
Partner Balance'
|
|
97
|
+
|
|
98
|
+
When wizard is open, you need to select your interval configuration and
|
|
99
|
+
print report.
|
|
100
|
+
|
|
101
|
+
If you want to get default interval configuration any time you wish to
|
|
102
|
+
print Aged Partner Report, you can set default interval configuration
|
|
103
|
+
per company in:
|
|
104
|
+
|
|
105
|
+
'Settings' -> 'Invoicing' -> 'OCA Aged Report Configuration'.
|
|
106
|
+
|
|
71
107
|
Known issues / Roadmap
|
|
72
108
|
======================
|
|
73
109
|
|
|
@@ -151,6 +187,7 @@ Contributors
|
|
|
151
187
|
- Jo??o Marques
|
|
152
188
|
- Alexandre D. D??az
|
|
153
189
|
- V??ctor Mart??nez
|
|
190
|
+
- Carolina Fernandez
|
|
154
191
|
|
|
155
192
|
- `Sygel <https://www.sygel.es>`__:
|
|
156
193
|
|