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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Author: Julien Coux
|
|
2
2
|
# Copyright 2016 Camptocamp SA
|
|
3
3
|
# Copyright 2021 Tecnativa - João Marques
|
|
4
|
+
# Copyright 2023 Tecnativa - Carolina Fernandez
|
|
4
5
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
5
6
|
|
|
6
7
|
from odoo import _, models
|
|
@@ -20,67 +21,84 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
|
|
|
20
21
|
report_name = report_name + suffix
|
|
21
22
|
return report_name
|
|
22
23
|
|
|
23
|
-
def
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
24
|
+
def _get_report_columns_without_move_line_details(self, report, column_index):
|
|
25
|
+
report_columns = {
|
|
26
|
+
0: {"header": _("Partner"), "field": "name", "width": 70},
|
|
27
|
+
1: {
|
|
28
|
+
"header": _("Residual"),
|
|
29
|
+
"field": "residual",
|
|
30
|
+
"field_footer_total": "residual",
|
|
31
|
+
"type": "amount",
|
|
32
|
+
"width": 14,
|
|
33
|
+
},
|
|
34
|
+
2: {
|
|
35
|
+
"header": _("Current"),
|
|
36
|
+
"field": "current",
|
|
37
|
+
"field_footer_total": "current",
|
|
38
|
+
"field_footer_percent": "percent_current",
|
|
39
|
+
"type": "amount",
|
|
40
|
+
"width": 14,
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
if not report.age_partner_config_id:
|
|
44
|
+
report_columns.update(
|
|
45
|
+
{
|
|
46
|
+
3: {
|
|
47
|
+
"header": _("Age ≤ 30 d."),
|
|
48
|
+
"field": "30_days",
|
|
49
|
+
"field_footer_total": "30_days",
|
|
50
|
+
"field_footer_percent": "percent_30_days",
|
|
51
|
+
"type": "amount",
|
|
52
|
+
"width": 14,
|
|
53
|
+
},
|
|
54
|
+
4: {
|
|
55
|
+
"header": _("Age ≤ 60 d."),
|
|
56
|
+
"field": "60_days",
|
|
57
|
+
"field_footer_total": "60_days",
|
|
58
|
+
"field_footer_percent": "percent_60_days",
|
|
59
|
+
"type": "amount",
|
|
60
|
+
"width": 14,
|
|
61
|
+
},
|
|
62
|
+
5: {
|
|
63
|
+
"header": _("Age ≤ 90 d."),
|
|
64
|
+
"field": "90_days",
|
|
65
|
+
"field_footer_total": "90_days",
|
|
66
|
+
"field_footer_percent": "percent_90_days",
|
|
67
|
+
"type": "amount",
|
|
68
|
+
"width": 14,
|
|
69
|
+
},
|
|
70
|
+
6: {
|
|
71
|
+
"header": _("Age ≤ 120 d."),
|
|
72
|
+
"field": "120_days",
|
|
73
|
+
"field_footer_total": "120_days",
|
|
74
|
+
"field_footer_percent": "percent_120_days",
|
|
75
|
+
"type": "amount",
|
|
76
|
+
"width": 14,
|
|
77
|
+
},
|
|
78
|
+
7: {
|
|
79
|
+
"header": _("Older"),
|
|
80
|
+
"field": "older",
|
|
81
|
+
"field_footer_total": "older",
|
|
82
|
+
"field_footer_percent": "percent_older",
|
|
83
|
+
"type": "amount",
|
|
84
|
+
"width": 14,
|
|
85
|
+
},
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
for interval in report.age_partner_config_id.line_ids:
|
|
89
|
+
report_columns[column_index] = {
|
|
90
|
+
"header": interval.name,
|
|
91
|
+
"field": interval,
|
|
92
|
+
"field_footer_total": interval,
|
|
93
|
+
"field_footer_percent": f"percent_{interval.id}",
|
|
94
|
+
"type": "amount",
|
|
95
|
+
"width": 14,
|
|
82
96
|
}
|
|
83
|
-
|
|
97
|
+
column_index += 1
|
|
98
|
+
return report_columns
|
|
99
|
+
|
|
100
|
+
def _get_report_columns_with_move_line_details(self, report, column_index):
|
|
101
|
+
report_columns = {
|
|
84
102
|
0: {"header": _("Date"), "field": "date", "width": 11},
|
|
85
103
|
1: {"header": _("Entry"), "field": "entry", "width": 18},
|
|
86
104
|
2: {"header": _("Journal"), "field": "journal", "width": 8},
|
|
@@ -105,52 +123,75 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
|
|
|
105
123
|
"type": "amount",
|
|
106
124
|
"width": 14,
|
|
107
125
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
126
|
+
}
|
|
127
|
+
if not report.age_partner_config_id:
|
|
128
|
+
report_columns.update(
|
|
129
|
+
{
|
|
130
|
+
9: {
|
|
131
|
+
"header": _("Age ≤ 30 d."),
|
|
132
|
+
"field": "30_days",
|
|
133
|
+
"field_footer_total": "30_days",
|
|
134
|
+
"field_footer_percent": "percent_30_days",
|
|
135
|
+
"field_final_balance": "30_days",
|
|
136
|
+
"type": "amount",
|
|
137
|
+
"width": 14,
|
|
138
|
+
},
|
|
139
|
+
10: {
|
|
140
|
+
"header": _("Age ≤ 60 d."),
|
|
141
|
+
"field": "60_days",
|
|
142
|
+
"field_footer_total": "60_days",
|
|
143
|
+
"field_footer_percent": "percent_60_days",
|
|
144
|
+
"field_final_balance": "60_days",
|
|
145
|
+
"type": "amount",
|
|
146
|
+
"width": 14,
|
|
147
|
+
},
|
|
148
|
+
11: {
|
|
149
|
+
"header": _("Age ≤ 90 d."),
|
|
150
|
+
"field": "90_days",
|
|
151
|
+
"field_footer_total": "90_days",
|
|
152
|
+
"field_footer_percent": "percent_90_days",
|
|
153
|
+
"field_final_balance": "90_days",
|
|
154
|
+
"type": "amount",
|
|
155
|
+
"width": 14,
|
|
156
|
+
},
|
|
157
|
+
12: {
|
|
158
|
+
"header": _("Age ≤ 120 d."),
|
|
159
|
+
"field": "120_days",
|
|
160
|
+
"field_footer_total": "120_days",
|
|
161
|
+
"field_footer_percent": "percent_120_days",
|
|
162
|
+
"field_final_balance": "120_days",
|
|
163
|
+
"type": "amount",
|
|
164
|
+
"width": 14,
|
|
165
|
+
},
|
|
166
|
+
13: {
|
|
167
|
+
"header": _("Older"),
|
|
168
|
+
"field": "older",
|
|
169
|
+
"field_footer_total": "older",
|
|
170
|
+
"field_footer_percent": "percent_older",
|
|
171
|
+
"field_final_balance": "older",
|
|
172
|
+
"type": "amount",
|
|
173
|
+
"width": 14,
|
|
174
|
+
},
|
|
175
|
+
}
|
|
176
|
+
)
|
|
177
|
+
for interval in report.age_partner_config_id.line_ids:
|
|
178
|
+
report_columns[column_index] = {
|
|
179
|
+
"header": interval.name,
|
|
180
|
+
"field": interval,
|
|
181
|
+
"field_footer_total": interval,
|
|
182
|
+
"field_footer_percent": f"percent_{interval.id}",
|
|
150
183
|
"type": "amount",
|
|
151
184
|
"width": 14,
|
|
152
|
-
}
|
|
153
|
-
|
|
185
|
+
}
|
|
186
|
+
column_index += 1
|
|
187
|
+
return report_columns
|
|
188
|
+
|
|
189
|
+
def _get_report_columns(self, report):
|
|
190
|
+
if not report.show_move_line_details:
|
|
191
|
+
return self._get_report_columns_without_move_line_details(
|
|
192
|
+
report, column_index=3
|
|
193
|
+
)
|
|
194
|
+
return self._get_report_columns_with_move_line_details(report, column_index=9)
|
|
154
195
|
|
|
155
196
|
def _get_report_filters(self, report):
|
|
156
197
|
return [
|