odoo-addon-account-financial-report 17.0.1.7.0__py3-none-any.whl → 17.0.1.8.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 +1 -1
- odoo/addons/account_financial_report/__manifest__.py +1 -1
- odoo/addons/account_financial_report/i18n/account_financial_report.pot +16 -0
- odoo/addons/account_financial_report/i18n/ar.po +15 -0
- odoo/addons/account_financial_report/i18n/ca.po +15 -0
- odoo/addons/account_financial_report/i18n/de.po +15 -0
- odoo/addons/account_financial_report/i18n/es.po +2 -1
- odoo/addons/account_financial_report/i18n/es_AR.po +15 -0
- odoo/addons/account_financial_report/i18n/es_MX.po +15 -0
- odoo/addons/account_financial_report/i18n/fr.po +15 -0
- odoo/addons/account_financial_report/i18n/fr_CH.po +15 -0
- odoo/addons/account_financial_report/i18n/hr.po +15 -0
- odoo/addons/account_financial_report/i18n/hr_HR.po +15 -0
- odoo/addons/account_financial_report/i18n/it.po +16 -1
- odoo/addons/account_financial_report/i18n/ja.po +15 -0
- odoo/addons/account_financial_report/i18n/nl.po +15 -0
- odoo/addons/account_financial_report/i18n/nl_NL.po +15 -0
- odoo/addons/account_financial_report/i18n/pt.po +15 -0
- odoo/addons/account_financial_report/i18n/pt_BR.po +15 -0
- odoo/addons/account_financial_report/i18n/ro.po +15 -0
- odoo/addons/account_financial_report/i18n/sv.po +15 -0
- odoo/addons/account_financial_report/i18n/tr.po +15 -0
- odoo/addons/account_financial_report/report/abstract_report.py +6 -0
- odoo/addons/account_financial_report/report/aged_partner_balance.py +18 -12
- odoo/addons/account_financial_report/report/general_ledger.py +30 -26
- odoo/addons/account_financial_report/report/journal_ledger.py +27 -22
- odoo/addons/account_financial_report/report/open_items.py +24 -19
- odoo/addons/account_financial_report/report/templates/general_ledger.xml +6 -2
- odoo/addons/account_financial_report/report/templates/journal_ledger.xml +5 -2
- odoo/addons/account_financial_report/report/templates/open_items.xml +1 -1
- odoo/addons/account_financial_report/report/trial_balance.py +30 -26
- odoo/addons/account_financial_report/report/vat_report.py +17 -12
- odoo/addons/account_financial_report/static/description/index.html +1 -1
- odoo/addons/account_financial_report/tests/test_aged_partner_balance.py +4 -4
- odoo/addons/account_financial_report/tests/test_general_ledger.py +1 -1
- odoo/addons/account_financial_report/tests/test_journal_ledger.py +5 -5
- odoo/addons/account_financial_report/tests/test_open_items.py +1 -1
- odoo/addons/account_financial_report/tests/test_trial_balance.py +4 -4
- odoo/addons/account_financial_report/tests/test_vat_report.py +1 -1
- odoo/addons/account_financial_report/wizard/abstract_wizard.py +23 -0
- odoo/addons/account_financial_report/wizard/aged_partner_balance_wizard.py +7 -1
- odoo/addons/account_financial_report/wizard/general_ledger_wizard.py +7 -1
- odoo/addons/account_financial_report/wizard/general_ledger_wizard_view.xml +5 -0
- odoo/addons/account_financial_report/wizard/journal_ledger_wizard.py +7 -1
- odoo/addons/account_financial_report/wizard/journal_ledger_wizard_view.xml +1 -0
- odoo/addons/account_financial_report/wizard/open_items_wizard.py +7 -1
- odoo/addons/account_financial_report/wizard/open_items_wizard_view.xml +1 -0
- odoo/addons/account_financial_report/wizard/trial_balance_wizard.py +7 -1
- odoo/addons/account_financial_report/wizard/vat_report_wizard.py +7 -1
- {odoo_addon_account_financial_report-17.0.1.7.0.dist-info → odoo_addon_account_financial_report-17.0.1.8.0.dist-info}/METADATA +2 -2
- {odoo_addon_account_financial_report-17.0.1.7.0.dist-info → odoo_addon_account_financial_report-17.0.1.8.0.dist-info}/RECORD +53 -53
- {odoo_addon_account_financial_report-17.0.1.7.0.dist-info → odoo_addon_account_financial_report-17.0.1.8.0.dist-info}/WHEEL +0 -0
- {odoo_addon_account_financial_report-17.0.1.7.0.dist-info → odoo_addon_account_financial_report-17.0.1.8.0.dist-info}/top_level.txt +0 -0
|
@@ -861,6 +861,7 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
861
861
|
return groups_data
|
|
862
862
|
|
|
863
863
|
def _get_report_values(self, docids, data):
|
|
864
|
+
res = super()._get_report_values(docids, data)
|
|
864
865
|
show_partner_details = data["show_partner_details"]
|
|
865
866
|
wizard_id = data["wizard_id"]
|
|
866
867
|
company = self.env["res.company"].browse(data["company_id"])
|
|
@@ -955,29 +956,32 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
955
956
|
total_amount[account_id]["currency_name"] = accounts_data[
|
|
956
957
|
account_id
|
|
957
958
|
]["currency_name"]
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
959
|
+
res.update(
|
|
960
|
+
{
|
|
961
|
+
"doc_ids": [wizard_id],
|
|
962
|
+
"doc_model": "trial.balance.report.wizard",
|
|
963
|
+
"docs": self.env["trial.balance.report.wizard"].browse(wizard_id),
|
|
964
|
+
"foreign_currency": data["foreign_currency"],
|
|
965
|
+
"company_name": company.display_name,
|
|
966
|
+
"company_currency": company.currency_id,
|
|
967
|
+
"currency_name": company.currency_id.name,
|
|
968
|
+
"date_from": data["date_from"],
|
|
969
|
+
"date_to": data["date_to"],
|
|
970
|
+
"only_posted_moves": data["only_posted_moves"],
|
|
971
|
+
"hide_account_at_0": data["hide_account_at_0"],
|
|
972
|
+
"show_partner_details": data["show_partner_details"],
|
|
973
|
+
"limit_hierarchy_level": data["limit_hierarchy_level"],
|
|
974
|
+
"show_hierarchy": show_hierarchy,
|
|
975
|
+
"hide_parent_hierarchy_level": data["hide_parent_hierarchy_level"],
|
|
976
|
+
"trial_balance": trial_balance,
|
|
977
|
+
"trial_balance_grouped": trial_balance_grouped,
|
|
978
|
+
"total_amount": total_amount,
|
|
979
|
+
"total_amount_grouped": total_amount_grouped,
|
|
980
|
+
"accounts_data": accounts_data,
|
|
981
|
+
"partners_data": partners_data,
|
|
982
|
+
"show_hierarchy_level": show_hierarchy_level,
|
|
983
|
+
"currency_model": self.env["res.currency"],
|
|
984
|
+
"grouped_by": grouped_by,
|
|
985
|
+
}
|
|
986
|
+
)
|
|
987
|
+
return res
|
|
@@ -8,6 +8,7 @@ from odoo import api, models
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class VATReport(models.AbstractModel):
|
|
11
|
+
_inherit = "report.account_financial_report.abstract_report"
|
|
11
12
|
_name = "report.account_financial_report.vat_report"
|
|
12
13
|
_description = "Vat Report Report"
|
|
13
14
|
|
|
@@ -197,6 +198,7 @@ class VATReport(models.AbstractModel):
|
|
|
197
198
|
return vat_report_list
|
|
198
199
|
|
|
199
200
|
def _get_report_values(self, docids, data):
|
|
201
|
+
res = super()._get_report_values(docids, data)
|
|
200
202
|
wizard_id = data["wizard_id"]
|
|
201
203
|
company = self.env["res.company"].browse(data["company_id"])
|
|
202
204
|
company_id = data["company_id"]
|
|
@@ -216,18 +218,21 @@ class VATReport(models.AbstractModel):
|
|
|
216
218
|
vat_report = self._get_vat_report_tag_data(
|
|
217
219
|
vat_report_data, tax_data, tax_detail
|
|
218
220
|
)
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
221
|
+
res.update(
|
|
222
|
+
{
|
|
223
|
+
"doc_ids": [wizard_id],
|
|
224
|
+
"doc_model": "vat.report.wizard",
|
|
225
|
+
"docs": self.env["vat.report.wizard"].browse(wizard_id),
|
|
226
|
+
"company_name": company.display_name,
|
|
227
|
+
"currency_name": company.currency_id.name,
|
|
228
|
+
"date_to": data["date_to"],
|
|
229
|
+
"date_from": data["date_from"],
|
|
230
|
+
"based_on": data["based_on"],
|
|
231
|
+
"tax_detail": data["tax_detail"],
|
|
232
|
+
"vat_report": vat_report,
|
|
233
|
+
}
|
|
234
|
+
)
|
|
235
|
+
return res
|
|
231
236
|
|
|
232
237
|
def _get_ml_fields_vat_report(self):
|
|
233
238
|
return [
|
|
@@ -372,7 +372,7 @@ ul.auto-toc {
|
|
|
372
372
|
!! This file is generated by oca-gen-addon-readme !!
|
|
373
373
|
!! changes will be overwritten. !!
|
|
374
374
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
375
|
-
!! source digest: sha256:
|
|
375
|
+
!! source digest: sha256:1f99d9f09b6b898088824b7b115048de26536d0ab194954bfec9847b648e1c9a
|
|
376
376
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
377
377
|
<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/license-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>
|
|
378
378
|
<p>This module adds a set of financial reports. They are accessible under
|
|
@@ -56,7 +56,7 @@ class TestAgedPartnerBalance(TransactionCase):
|
|
|
56
56
|
"""Check that report is produced correctly."""
|
|
57
57
|
wizard = self.wizard_with_line_details
|
|
58
58
|
wizard.onchange_type_accounts_only()
|
|
59
|
-
data = wizard.
|
|
59
|
+
data = wizard._prepare_report_data()
|
|
60
60
|
|
|
61
61
|
# Simulate web client behavior:
|
|
62
62
|
# default value is a datetime.date but web client sends back strings
|
|
@@ -71,7 +71,7 @@ class TestAgedPartnerBalance(TransactionCase):
|
|
|
71
71
|
self.assertTrue(result)
|
|
72
72
|
second_wizard = self.wizard_without_line_details
|
|
73
73
|
second_wizard.onchange_type_accounts_only()
|
|
74
|
-
data = second_wizard.
|
|
74
|
+
data = second_wizard._prepare_report_data()
|
|
75
75
|
|
|
76
76
|
# Simulate web client behavior:
|
|
77
77
|
# default value is a datetime.date but web client sends back strings
|
|
@@ -91,7 +91,7 @@ class TestAgedPartnerBalance(TransactionCase):
|
|
|
91
91
|
wizard.age_partner_config_id = self.account_age_report_config.id
|
|
92
92
|
|
|
93
93
|
wizard.onchange_type_accounts_only()
|
|
94
|
-
data = wizard.
|
|
94
|
+
data = wizard._prepare_report_data()
|
|
95
95
|
|
|
96
96
|
# Simulate web client behavior:
|
|
97
97
|
# default value is a datetime.date but web client sends back strings
|
|
@@ -109,7 +109,7 @@ class TestAgedPartnerBalance(TransactionCase):
|
|
|
109
109
|
second_wizard.age_partner_config_id = self.account_age_report_config.id
|
|
110
110
|
|
|
111
111
|
second_wizard.onchange_type_accounts_only()
|
|
112
|
-
data = second_wizard.
|
|
112
|
+
data = second_wizard._prepare_report_data()
|
|
113
113
|
|
|
114
114
|
# Simulate web client behavior:
|
|
115
115
|
# default value is a datetime.date but web client sends back strings
|
|
@@ -118,7 +118,7 @@ class TestGeneralLedgerReport(AccountTestInvoicingCommon):
|
|
|
118
118
|
"centralize": centralize,
|
|
119
119
|
}
|
|
120
120
|
)
|
|
121
|
-
data = general_ledger.
|
|
121
|
+
data = general_ledger._prepare_report_data()
|
|
122
122
|
res_data = self.env[
|
|
123
123
|
"report.account_financial_report.general_ledger"
|
|
124
124
|
]._get_report_values(general_ledger, data)
|
|
@@ -177,7 +177,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
|
|
|
177
177
|
"move_target": "all",
|
|
178
178
|
}
|
|
179
179
|
)
|
|
180
|
-
data = wiz.
|
|
180
|
+
data = wiz._prepare_report_data()
|
|
181
181
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
182
182
|
self.check_report_journal_debit_credit(res_data, 100, 100)
|
|
183
183
|
|
|
@@ -186,7 +186,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
|
|
|
186
186
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
187
187
|
self.check_report_journal_debit_credit(res_data, 200, 200)
|
|
188
188
|
wiz.move_target = "posted"
|
|
189
|
-
data = wiz.
|
|
189
|
+
data = wiz._prepare_report_data()
|
|
190
190
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
191
191
|
self.check_report_journal_debit_credit(res_data, 0, 0)
|
|
192
192
|
|
|
@@ -203,7 +203,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
|
|
|
203
203
|
self.check_report_journal_debit_credit(res_data, 200, 200)
|
|
204
204
|
|
|
205
205
|
wiz.date_from = self.previous_fy_date_start
|
|
206
|
-
data = wiz.
|
|
206
|
+
data = wiz._prepare_report_data()
|
|
207
207
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
208
208
|
self.check_report_journal_debit_credit(res_data, 300, 300)
|
|
209
209
|
|
|
@@ -238,7 +238,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
|
|
|
238
238
|
"move_target": "all",
|
|
239
239
|
}
|
|
240
240
|
)
|
|
241
|
-
data = wiz.
|
|
241
|
+
data = wiz._prepare_report_data()
|
|
242
242
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
243
243
|
self.check_report_journal_debit_credit(res_data, 250, 250)
|
|
244
244
|
self.check_report_journal_debit_credit_taxes(res_data, 0, 300, 0, 50)
|
|
@@ -276,7 +276,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
|
|
|
276
276
|
"move_target": "all",
|
|
277
277
|
}
|
|
278
278
|
)
|
|
279
|
-
data = wiz.
|
|
279
|
+
data = wiz._prepare_report_data()
|
|
280
280
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
281
281
|
|
|
282
282
|
self.check_report_journal_debit_credit(res_data, 250, 250)
|
|
@@ -192,7 +192,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
|
|
|
192
192
|
"show_partner_details": with_partners,
|
|
193
193
|
}
|
|
194
194
|
)
|
|
195
|
-
data = trial_balance.
|
|
195
|
+
data = trial_balance._prepare_report_data()
|
|
196
196
|
res_data = self.env[
|
|
197
197
|
"report.account_financial_report.trial_balance"
|
|
198
198
|
]._get_report_values(trial_balance, data)
|
|
@@ -547,7 +547,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
|
|
|
547
547
|
"fy_start_date": self.fy_date_start,
|
|
548
548
|
}
|
|
549
549
|
)
|
|
550
|
-
data = trial_balance.
|
|
550
|
+
data = trial_balance._prepare_report_data()
|
|
551
551
|
res_data = self.env[
|
|
552
552
|
"report.account_financial_report.trial_balance"
|
|
553
553
|
]._get_report_values(trial_balance, data)
|
|
@@ -600,7 +600,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
|
|
|
600
600
|
"fy_start_date": self.fy_date_start,
|
|
601
601
|
}
|
|
602
602
|
)
|
|
603
|
-
data = trial_balance.
|
|
603
|
+
data = trial_balance._prepare_report_data()
|
|
604
604
|
res_data = self.env[
|
|
605
605
|
"report.account_financial_report.trial_balance"
|
|
606
606
|
]._get_report_values(trial_balance, data)
|
|
@@ -654,7 +654,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
|
|
|
654
654
|
"fy_start_date": self.fy_date_start,
|
|
655
655
|
}
|
|
656
656
|
)
|
|
657
|
-
data = trial_balance.
|
|
657
|
+
data = trial_balance._prepare_report_data()
|
|
658
658
|
res_data = self.env[
|
|
659
659
|
"report.account_financial_report.trial_balance"
|
|
660
660
|
]._get_report_values(trial_balance, data)
|
|
@@ -218,7 +218,7 @@ class TestVATReport(AccountTestInvoicingCommon):
|
|
|
218
218
|
"tax_detail": True,
|
|
219
219
|
}
|
|
220
220
|
)
|
|
221
|
-
data = vat_report.
|
|
221
|
+
data = vat_report._prepare_report_data()
|
|
222
222
|
res_data = self.env[
|
|
223
223
|
"report.account_financial_report.vat_report"
|
|
224
224
|
]._get_report_values(vat_report, data)
|
|
@@ -34,18 +34,41 @@ class AbstractWizard(models.AbstractModel):
|
|
|
34
34
|
required=False,
|
|
35
35
|
string="Company",
|
|
36
36
|
)
|
|
37
|
+
label_text_limit = fields.Integer(default=40)
|
|
37
38
|
|
|
38
39
|
def button_export_html(self):
|
|
39
40
|
self.ensure_one()
|
|
41
|
+
self._set_default_wizard_values()
|
|
40
42
|
report_type = "qweb-html"
|
|
41
43
|
return self._export(report_type)
|
|
42
44
|
|
|
43
45
|
def button_export_pdf(self):
|
|
44
46
|
self.ensure_one()
|
|
47
|
+
self._set_default_wizard_values()
|
|
45
48
|
report_type = "qweb-pdf"
|
|
46
49
|
return self._export(report_type)
|
|
47
50
|
|
|
48
51
|
def button_export_xlsx(self):
|
|
49
52
|
self.ensure_one()
|
|
53
|
+
self._set_default_wizard_values()
|
|
50
54
|
report_type = "xlsx"
|
|
51
55
|
return self._export(report_type)
|
|
56
|
+
|
|
57
|
+
def _limit_text(self, value, limit_field="label_text_limit"):
|
|
58
|
+
limit = self[limit_field]
|
|
59
|
+
if value and limit and len(value) > limit:
|
|
60
|
+
value = value[:limit] + "..."
|
|
61
|
+
return value
|
|
62
|
+
|
|
63
|
+
def _prepare_report_data(self):
|
|
64
|
+
self.ensure_one()
|
|
65
|
+
return {"wizard_name": self._name, "wizard_id": self.id}
|
|
66
|
+
|
|
67
|
+
def _set_default_wizard_values(self):
|
|
68
|
+
self.env["ir.default"].set(
|
|
69
|
+
self._name,
|
|
70
|
+
"label_text_limit",
|
|
71
|
+
self.label_text_limit,
|
|
72
|
+
user_id=False,
|
|
73
|
+
company_id=True,
|
|
74
|
+
)
|
|
@@ -117,7 +117,7 @@ class AgedPartnerBalanceWizard(models.TransientModel):
|
|
|
117
117
|
|
|
118
118
|
def _print_report(self, report_type):
|
|
119
119
|
self.ensure_one()
|
|
120
|
-
data = self.
|
|
120
|
+
data = self._prepare_report_data()
|
|
121
121
|
if report_type == "xlsx":
|
|
122
122
|
report_name = "a_f_r.report_aged_partner_balance_xlsx"
|
|
123
123
|
else:
|
|
@@ -132,6 +132,7 @@ class AgedPartnerBalanceWizard(models.TransientModel):
|
|
|
132
132
|
)
|
|
133
133
|
|
|
134
134
|
def _prepare_report_aged_partner_balance(self):
|
|
135
|
+
# TODO: Kept for compatibility - To be merged into _prepare_report_data in 19
|
|
135
136
|
self.ensure_one()
|
|
136
137
|
return {
|
|
137
138
|
"wizard_id": self.id,
|
|
@@ -146,6 +147,11 @@ class AgedPartnerBalanceWizard(models.TransientModel):
|
|
|
146
147
|
"age_partner_config_id": self.age_partner_config_id.id,
|
|
147
148
|
}
|
|
148
149
|
|
|
150
|
+
def _prepare_report_data(self):
|
|
151
|
+
res = super()._prepare_report_data()
|
|
152
|
+
res.update(self._prepare_report_aged_partner_balance())
|
|
153
|
+
return res
|
|
154
|
+
|
|
149
155
|
def _export(self, report_type):
|
|
150
156
|
"""Default export is PDF."""
|
|
151
157
|
return self._print_report(report_type)
|
|
@@ -276,7 +276,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
|
|
276
276
|
|
|
277
277
|
def _print_report(self, report_type):
|
|
278
278
|
self.ensure_one()
|
|
279
|
-
data = self.
|
|
279
|
+
data = self._prepare_report_data()
|
|
280
280
|
if report_type == "xlsx":
|
|
281
281
|
report_name = "a_f_r.report_general_ledger_xlsx"
|
|
282
282
|
else:
|
|
@@ -291,6 +291,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
|
|
291
291
|
)
|
|
292
292
|
|
|
293
293
|
def _prepare_report_general_ledger(self):
|
|
294
|
+
# TODO: Kept for compatibility - To be merged into _prepare_report_data in 19
|
|
294
295
|
self.ensure_one()
|
|
295
296
|
return {
|
|
296
297
|
"wizard_id": self.id,
|
|
@@ -313,6 +314,11 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
|
|
313
314
|
"domain": self._get_account_move_lines_domain(),
|
|
314
315
|
}
|
|
315
316
|
|
|
317
|
+
def _prepare_report_data(self):
|
|
318
|
+
res = super()._prepare_report_data()
|
|
319
|
+
res.update(self._prepare_report_general_ledger())
|
|
320
|
+
return res
|
|
321
|
+
|
|
316
322
|
def _export(self, report_type):
|
|
317
323
|
"""Default export is PDF."""
|
|
318
324
|
return self._print_report(report_type)
|
|
@@ -75,7 +75,7 @@ class JournalLedgerReportWizard(models.TransientModel):
|
|
|
75
75
|
|
|
76
76
|
def _print_report(self, report_type):
|
|
77
77
|
self.ensure_one()
|
|
78
|
-
data = self.
|
|
78
|
+
data = self._prepare_report_data()
|
|
79
79
|
if report_type == "xlsx":
|
|
80
80
|
report_name = "a_f_r.report_journal_ledger_xlsx"
|
|
81
81
|
else:
|
|
@@ -90,6 +90,7 @@ class JournalLedgerReportWizard(models.TransientModel):
|
|
|
90
90
|
)
|
|
91
91
|
|
|
92
92
|
def _prepare_report_journal_ledger(self):
|
|
93
|
+
# TODO: Kept for compatibility - To be merged into _prepare_report_data in 19
|
|
93
94
|
self.ensure_one()
|
|
94
95
|
journals = self.journal_ids
|
|
95
96
|
if not journals:
|
|
@@ -112,6 +113,11 @@ class JournalLedgerReportWizard(models.TransientModel):
|
|
|
112
113
|
"with_auto_sequence": self.with_auto_sequence,
|
|
113
114
|
}
|
|
114
115
|
|
|
116
|
+
def _prepare_report_data(self):
|
|
117
|
+
res = super()._prepare_report_data()
|
|
118
|
+
res.update(self._prepare_report_journal_ledger())
|
|
119
|
+
return res
|
|
120
|
+
|
|
115
121
|
def _export(self, report_type):
|
|
116
122
|
"""Default export is PDF."""
|
|
117
123
|
self.ensure_one()
|
|
@@ -153,7 +153,7 @@ class OpenItemsReportWizard(models.TransientModel):
|
|
|
153
153
|
|
|
154
154
|
def _print_report(self, report_type):
|
|
155
155
|
self.ensure_one()
|
|
156
|
-
data = self.
|
|
156
|
+
data = self._prepare_report_data()
|
|
157
157
|
if report_type == "xlsx":
|
|
158
158
|
report_name = "a_f_r.report_open_items_xlsx"
|
|
159
159
|
else:
|
|
@@ -168,6 +168,7 @@ class OpenItemsReportWizard(models.TransientModel):
|
|
|
168
168
|
)
|
|
169
169
|
|
|
170
170
|
def _prepare_report_open_items(self):
|
|
171
|
+
# TODO: Kept for compatibility - To be merged into _prepare_report_data in 19
|
|
171
172
|
self.ensure_one()
|
|
172
173
|
return {
|
|
173
174
|
"wizard_id": self.id,
|
|
@@ -185,5 +186,10 @@ class OpenItemsReportWizard(models.TransientModel):
|
|
|
185
186
|
"grouped_by": self.grouped_by,
|
|
186
187
|
}
|
|
187
188
|
|
|
189
|
+
def _prepare_report_data(self):
|
|
190
|
+
res = super()._prepare_report_data()
|
|
191
|
+
res.update(self._prepare_report_open_items())
|
|
192
|
+
return res
|
|
193
|
+
|
|
188
194
|
def _export(self, report_type):
|
|
189
195
|
return self._print_report(report_type)
|
|
@@ -239,7 +239,7 @@ class TrialBalanceReportWizard(models.TransientModel):
|
|
|
239
239
|
|
|
240
240
|
def _print_report(self, report_type):
|
|
241
241
|
self.ensure_one()
|
|
242
|
-
data = self.
|
|
242
|
+
data = self._prepare_report_data()
|
|
243
243
|
if report_type == "xlsx":
|
|
244
244
|
report_name = "a_f_r.report_trial_balance_xlsx"
|
|
245
245
|
else:
|
|
@@ -254,6 +254,7 @@ class TrialBalanceReportWizard(models.TransientModel):
|
|
|
254
254
|
)
|
|
255
255
|
|
|
256
256
|
def _prepare_report_trial_balance(self):
|
|
257
|
+
# TODO: Kept for compatibility - To be merged into _prepare_report_data in 19
|
|
257
258
|
self.ensure_one()
|
|
258
259
|
return {
|
|
259
260
|
"wizard_id": self.id,
|
|
@@ -277,6 +278,11 @@ class TrialBalanceReportWizard(models.TransientModel):
|
|
|
277
278
|
"grouped_by": self.grouped_by,
|
|
278
279
|
}
|
|
279
280
|
|
|
281
|
+
def _prepare_report_data(self):
|
|
282
|
+
res = super()._prepare_report_data()
|
|
283
|
+
res.update(self._prepare_report_trial_balance())
|
|
284
|
+
return res
|
|
285
|
+
|
|
280
286
|
def _export(self, report_type):
|
|
281
287
|
"""Default export is PDF."""
|
|
282
288
|
return self._print_report(report_type)
|
|
@@ -68,7 +68,7 @@ class VATReportWizard(models.TransientModel):
|
|
|
68
68
|
|
|
69
69
|
def _print_report(self, report_type):
|
|
70
70
|
self.ensure_one()
|
|
71
|
-
data = self.
|
|
71
|
+
data = self._prepare_report_data()
|
|
72
72
|
if report_type == "xlsx":
|
|
73
73
|
report_name = "a_f_r.report_vat_report_xlsx"
|
|
74
74
|
else:
|
|
@@ -83,6 +83,7 @@ class VATReportWizard(models.TransientModel):
|
|
|
83
83
|
)
|
|
84
84
|
|
|
85
85
|
def _prepare_vat_report(self):
|
|
86
|
+
# TODO: Kept for compatibility - To be merged into _prepare_report_data in 19
|
|
86
87
|
self.ensure_one()
|
|
87
88
|
return {
|
|
88
89
|
"wizard_id": self.id,
|
|
@@ -95,6 +96,11 @@ class VATReportWizard(models.TransientModel):
|
|
|
95
96
|
"account_financial_report_lang": self.env.lang,
|
|
96
97
|
}
|
|
97
98
|
|
|
99
|
+
def _prepare_report_data(self):
|
|
100
|
+
res = super()._prepare_report_data()
|
|
101
|
+
res.update(self._prepare_vat_report())
|
|
102
|
+
return res
|
|
103
|
+
|
|
98
104
|
def _export(self, report_type):
|
|
99
105
|
"""Default export is PDF."""
|
|
100
106
|
return self._print_report(report_type)
|
|
@@ -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.8.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
|
|
@@ -29,7 +29,7 @@ Account Financial Reports
|
|
|
29
29
|
!! This file is generated by oca-gen-addon-readme !!
|
|
30
30
|
!! changes will be overwritten. !!
|
|
31
31
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
32
|
-
!! source digest: sha256:
|
|
32
|
+
!! source digest: sha256:1f99d9f09b6b898088824b7b115048de26536d0ab194954bfec9847b648e1c9a
|
|
33
33
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
34
34
|
|
|
35
35
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|