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