odoo-addon-account-financial-report 15.0.1.1.0.1__py3-none-any.whl → 18.0.1.4.4.3__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.
- odoo/addons/account_financial_report/README.rst +131 -74
- odoo/addons/account_financial_report/__manifest__.py +6 -9
- odoo/addons/account_financial_report/i18n/account_financial_report.pot +313 -188
- odoo/addons/account_financial_report/i18n/ar.po +579 -433
- odoo/addons/account_financial_report/i18n/ca.po +474 -289
- odoo/addons/account_financial_report/i18n/{fr_FR.po → ca_AD.po} +539 -491
- odoo/addons/account_financial_report/i18n/ca_ES.po +1891 -0
- odoo/addons/account_financial_report/i18n/de.po +455 -295
- odoo/addons/account_financial_report/i18n/es.po +458 -394
- odoo/addons/account_financial_report/i18n/es_AR.po +464 -283
- odoo/addons/account_financial_report/i18n/es_MX.po +315 -220
- odoo/addons/account_financial_report/i18n/fr.po +620 -435
- odoo/addons/account_financial_report/i18n/fr_CH.po +616 -462
- odoo/addons/account_financial_report/i18n/hr.po +506 -355
- odoo/addons/account_financial_report/i18n/hr_HR.po +331 -232
- odoo/addons/account_financial_report/i18n/it.po +538 -356
- odoo/addons/account_financial_report/i18n/ja.po +339 -240
- odoo/addons/account_financial_report/i18n/nl.po +462 -324
- odoo/addons/account_financial_report/i18n/nl_NL.po +318 -220
- odoo/addons/account_financial_report/i18n/pt.po +429 -242
- odoo/addons/account_financial_report/i18n/pt_BR.po +588 -438
- odoo/addons/account_financial_report/i18n/ro.po +499 -342
- odoo/addons/account_financial_report/i18n/sl.po +1945 -0
- odoo/addons/account_financial_report/i18n/sv.po +1997 -0
- odoo/addons/account_financial_report/i18n/tr.po +1947 -0
- odoo/addons/account_financial_report/menuitems.xml +1 -1
- odoo/addons/account_financial_report/models/__init__.py +2 -0
- odoo/addons/account_financial_report/models/account_age_report_configuration.py +49 -0
- odoo/addons/account_financial_report/models/account_group.py +62 -23
- odoo/addons/account_financial_report/models/account_move_line.py +33 -3
- odoo/addons/account_financial_report/models/ir_actions_report.py +6 -4
- odoo/addons/account_financial_report/models/res_config_settings.py +36 -0
- odoo/addons/account_financial_report/readme/CONFIGURE.md +26 -0
- odoo/addons/account_financial_report/readme/CONTRIBUTORS.md +38 -0
- odoo/addons/account_financial_report/readme/CREDITS.md +1 -0
- odoo/addons/account_financial_report/readme/DESCRIPTION.md +21 -0
- odoo/addons/account_financial_report/readme/HISTORY.md +16 -0
- odoo/addons/account_financial_report/readme/ROADMAP.md +6 -0
- odoo/addons/account_financial_report/report/abstract_report.py +73 -23
- odoo/addons/account_financial_report/report/abstract_report_xlsx.py +28 -23
- odoo/addons/account_financial_report/report/aged_partner_balance.py +131 -30
- odoo/addons/account_financial_report/report/aged_partner_balance_xlsx.py +158 -118
- odoo/addons/account_financial_report/report/general_ledger.py +421 -340
- odoo/addons/account_financial_report/report/general_ledger_xlsx.py +127 -75
- odoo/addons/account_financial_report/report/journal_ledger.py +84 -68
- odoo/addons/account_financial_report/report/journal_ledger_xlsx.py +14 -8
- odoo/addons/account_financial_report/report/open_items.py +113 -70
- odoo/addons/account_financial_report/report/open_items_xlsx.py +152 -19
- odoo/addons/account_financial_report/report/templates/aged_partner_balance.xml +408 -311
- odoo/addons/account_financial_report/report/templates/general_ledger.xml +273 -213
- odoo/addons/account_financial_report/report/templates/journal_ledger.xml +70 -76
- odoo/addons/account_financial_report/report/templates/layouts.xml +12 -1
- odoo/addons/account_financial_report/report/templates/open_items.xml +181 -55
- odoo/addons/account_financial_report/report/templates/trial_balance.xml +304 -195
- odoo/addons/account_financial_report/report/templates/vat_report.xml +10 -10
- odoo/addons/account_financial_report/report/trial_balance.py +463 -211
- odoo/addons/account_financial_report/report/trial_balance_xlsx.py +37 -38
- odoo/addons/account_financial_report/report/vat_report.py +36 -25
- odoo/addons/account_financial_report/report/vat_report_xlsx.py +1 -1
- 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 +106 -55
- odoo/addons/account_financial_report/static/src/css/report.css +77 -42
- odoo/addons/account_financial_report/static/src/css/report_html.css +10 -0
- odoo/addons/account_financial_report/static/src/js/report.esm.js +72 -0
- odoo/addons/account_financial_report/static/src/js/report_action.esm.js +39 -0
- odoo/addons/account_financial_report/static/src/xml/report.xml +10 -9
- 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 +99 -9
- odoo/addons/account_financial_report/tests/test_general_ledger.py +19 -9
- odoo/addons/account_financial_report/tests/test_journal_ledger.py +18 -9
- odoo/addons/account_financial_report/tests/test_open_items.py +42 -2
- odoo/addons/account_financial_report/tests/test_trial_balance.py +114 -223
- odoo/addons/account_financial_report/tests/test_vat_report.py +17 -9
- 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/abstract_wizard.py +23 -0
- odoo/addons/account_financial_report/wizard/aged_partner_balance_wizard.py +22 -8
- odoo/addons/account_financial_report/wizard/aged_partner_balance_wizard_view.xml +2 -3
- odoo/addons/account_financial_report/wizard/general_ledger_wizard.py +42 -36
- odoo/addons/account_financial_report/wizard/general_ledger_wizard_view.xml +26 -41
- odoo/addons/account_financial_report/wizard/journal_ledger_wizard.py +19 -7
- odoo/addons/account_financial_report/wizard/journal_ledger_wizard_view.xml +15 -14
- odoo/addons/account_financial_report/wizard/open_items_wizard.py +34 -8
- odoo/addons/account_financial_report/wizard/open_items_wizard_view.xml +16 -14
- odoo/addons/account_financial_report/wizard/trial_balance_wizard.py +68 -45
- odoo/addons/account_financial_report/wizard/trial_balance_wizard_view.xml +40 -39
- odoo/addons/account_financial_report/wizard/vat_report_wizard.py +9 -3
- odoo/addons/account_financial_report/wizard/vat_report_wizard_view.xml +14 -14
- odoo_addon_account_financial_report-18.0.1.4.4.3.dist-info/METADATA +234 -0
- odoo_addon_account_financial_report-18.0.1.4.4.3.dist-info/RECORD +107 -0
- {odoo_addon_account_financial_report-15.0.1.1.0.1.dist-info → odoo_addon_account_financial_report-18.0.1.4.4.3.dist-info}/WHEEL +1 -1
- odoo_addon_account_financial_report-18.0.1.4.4.3.dist-info/top_level.txt +1 -0
- odoo/addons/account_financial_report/readme/CONTRIBUTORS.rst +0 -35
- odoo/addons/account_financial_report/readme/DESCRIPTION.rst +0 -16
- odoo/addons/account_financial_report/readme/HISTORY.rst +0 -19
- odoo/addons/account_financial_report/readme/ROADMAP.rst +0 -7
- odoo/addons/account_financial_report/static/src/js/action_manager_report.js +0 -37
- odoo/addons/account_financial_report/static/src/js/client_action.js +0 -58
- odoo/addons/account_financial_report/static/src/js/report.js +0 -58
- odoo_addon_account_financial_report-15.0.1.1.0.1.dist-info/METADATA +0 -179
- odoo_addon_account_financial_report-15.0.1.1.0.1.dist-info/RECORD +0 -95
- odoo_addon_account_financial_report-15.0.1.1.0.1.dist-info/top_level.txt +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Copyright 2021 Tecnativa - João Marques
|
|
4
4
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
5
5
|
|
|
6
|
-
from odoo import
|
|
6
|
+
from odoo import models
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class AgedPartnerBalanceXslx(models.AbstractModel):
|
|
@@ -13,153 +13,193 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
|
|
|
13
13
|
|
|
14
14
|
def _get_report_name(self, report, data=False):
|
|
15
15
|
company_id = data.get("company_id", False)
|
|
16
|
-
report_name = _("Aged Partner Balance")
|
|
16
|
+
report_name = self.env._("Aged Partner Balance")
|
|
17
17
|
if company_id:
|
|
18
18
|
company = self.env["res.company"].browse(company_id)
|
|
19
|
-
suffix = " - {} - {
|
|
19
|
+
suffix = f" - {company.name} - {company.currency_id.name}"
|
|
20
20
|
report_name = report_name + suffix
|
|
21
21
|
return report_name
|
|
22
22
|
|
|
23
|
-
def
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
3: {
|
|
43
|
-
"header": _("Age ≤ 30 d."),
|
|
44
|
-
"field": "30_days",
|
|
45
|
-
"field_footer_total": "30_days",
|
|
46
|
-
"field_footer_percent": "percent_30_days",
|
|
47
|
-
"type": "amount",
|
|
48
|
-
"width": 14,
|
|
49
|
-
},
|
|
50
|
-
4: {
|
|
51
|
-
"header": _("Age ≤ 60 d."),
|
|
52
|
-
"field": "60_days",
|
|
53
|
-
"field_footer_total": "60_days",
|
|
54
|
-
"field_footer_percent": "percent_60_days",
|
|
55
|
-
"type": "amount",
|
|
56
|
-
"width": 14,
|
|
57
|
-
},
|
|
58
|
-
5: {
|
|
59
|
-
"header": _("Age ≤ 90 d."),
|
|
60
|
-
"field": "90_days",
|
|
61
|
-
"field_footer_total": "90_days",
|
|
62
|
-
"field_footer_percent": "percent_90_days",
|
|
63
|
-
"type": "amount",
|
|
64
|
-
"width": 14,
|
|
65
|
-
},
|
|
66
|
-
6: {
|
|
67
|
-
"header": _("Age ≤ 120 d."),
|
|
68
|
-
"field": "120_days",
|
|
69
|
-
"field_footer_total": "120_days",
|
|
70
|
-
"field_footer_percent": "percent_120_days",
|
|
71
|
-
"type": "amount",
|
|
72
|
-
"width": 14,
|
|
73
|
-
},
|
|
74
|
-
7: {
|
|
75
|
-
"header": _("Older"),
|
|
76
|
-
"field": "older",
|
|
77
|
-
"field_footer_total": "older",
|
|
78
|
-
"field_footer_percent": "percent_older",
|
|
79
|
-
"type": "amount",
|
|
80
|
-
"width": 14,
|
|
81
|
-
},
|
|
82
|
-
}
|
|
83
|
-
return {
|
|
84
|
-
0: {"header": _("Date"), "field": "date", "width": 11},
|
|
85
|
-
1: {"header": _("Entry"), "field": "entry", "width": 18},
|
|
86
|
-
2: {"header": _("Journal"), "field": "journal", "width": 8},
|
|
87
|
-
3: {"header": _("Account"), "field": "account", "width": 9},
|
|
88
|
-
4: {"header": _("Partner"), "field": "partner", "width": 25},
|
|
89
|
-
5: {"header": _("Ref - Label"), "field": "ref_label", "width": 40},
|
|
90
|
-
6: {"header": _("Due date"), "field": "due_date", "width": 11},
|
|
91
|
-
7: {
|
|
92
|
-
"header": _("Residual"),
|
|
23
|
+
def _get_report_columns_without_move_line_details(self, report, column_index):
|
|
24
|
+
report_columns = {
|
|
25
|
+
0: {"header": self.env._("Partner"), "field": "name", "width": 70},
|
|
26
|
+
1: {
|
|
27
|
+
"header": self.env._("Residual"),
|
|
93
28
|
"field": "residual",
|
|
94
29
|
"field_footer_total": "residual",
|
|
95
|
-
"field_final_balance": "residual",
|
|
96
30
|
"type": "amount",
|
|
97
31
|
"width": 14,
|
|
98
32
|
},
|
|
99
|
-
|
|
100
|
-
"header": _("Current"),
|
|
33
|
+
2: {
|
|
34
|
+
"header": self.env._("Current"),
|
|
101
35
|
"field": "current",
|
|
102
36
|
"field_footer_total": "current",
|
|
103
37
|
"field_footer_percent": "percent_current",
|
|
104
|
-
"field_final_balance": "current",
|
|
105
38
|
"type": "amount",
|
|
106
39
|
"width": 14,
|
|
107
40
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
41
|
+
}
|
|
42
|
+
if not report.age_partner_config_id:
|
|
43
|
+
report_columns.update(
|
|
44
|
+
{
|
|
45
|
+
3: {
|
|
46
|
+
"header": self.env._("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": self.env._("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": self.env._("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": self.env._("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": self.env._("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}",
|
|
123
93
|
"type": "amount",
|
|
124
94
|
"width": 14,
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
95
|
+
}
|
|
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 = {
|
|
101
|
+
0: {"header": self.env._("Date"), "field": "date", "width": 11},
|
|
102
|
+
1: {"header": self.env._("Entry"), "field": "entry", "width": 18},
|
|
103
|
+
2: {"header": self.env._("Journal"), "field": "journal", "width": 8},
|
|
104
|
+
3: {"header": self.env._("Account"), "field": "account", "width": 9},
|
|
105
|
+
4: {"header": self.env._("Partner"), "field": "partner", "width": 25},
|
|
106
|
+
5: {"header": self.env._("Ref - Label"), "field": "ref_label", "width": 40},
|
|
107
|
+
6: {"header": self.env._("Due date"), "field": "due_date", "width": 11},
|
|
108
|
+
7: {
|
|
109
|
+
"header": self.env._("Residual"),
|
|
110
|
+
"field": "residual",
|
|
111
|
+
"field_footer_total": "residual",
|
|
112
|
+
"field_final_balance": "residual",
|
|
132
113
|
"type": "amount",
|
|
133
114
|
"width": 14,
|
|
134
115
|
},
|
|
135
|
-
|
|
136
|
-
"header": _("
|
|
137
|
-
"field": "
|
|
138
|
-
"field_footer_total": "
|
|
139
|
-
"field_footer_percent": "
|
|
140
|
-
"field_final_balance": "
|
|
116
|
+
8: {
|
|
117
|
+
"header": self.env._("Current"),
|
|
118
|
+
"field": "current",
|
|
119
|
+
"field_footer_total": "current",
|
|
120
|
+
"field_footer_percent": "percent_current",
|
|
121
|
+
"field_final_balance": "current",
|
|
141
122
|
"type": "amount",
|
|
142
123
|
"width": 14,
|
|
143
124
|
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
125
|
+
}
|
|
126
|
+
if not report.age_partner_config_id:
|
|
127
|
+
report_columns.update(
|
|
128
|
+
{
|
|
129
|
+
9: {
|
|
130
|
+
"header": self.env._("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": self.env._("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": self.env._("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": self.env._("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": self.env._("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 [
|
|
157
|
-
[_("Date at filter"), report.date_at.strftime("%d/%m/%Y")],
|
|
197
|
+
[self.env._("Date at filter"), report.date_at.strftime("%d/%m/%Y")],
|
|
158
198
|
[
|
|
159
|
-
_("Target moves filter"),
|
|
160
|
-
_("All posted entries")
|
|
199
|
+
self.env._("Target moves filter"),
|
|
200
|
+
self.env._("All posted entries")
|
|
161
201
|
if report.target_move == "posted"
|
|
162
|
-
else _("All entries"),
|
|
202
|
+
else self.env._("All entries"),
|
|
163
203
|
],
|
|
164
204
|
]
|
|
165
205
|
|
|
@@ -281,7 +321,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
|
|
|
281
321
|
for Aged Partner Balance
|
|
282
322
|
"""
|
|
283
323
|
name = None
|
|
284
|
-
label = _("Partner cumul aged balance")
|
|
324
|
+
label = self.env._("Partner cumul aged balance")
|
|
285
325
|
return super().write_ending_balance_from_dict(
|
|
286
326
|
my_object, name, label, report_data
|
|
287
327
|
)
|