odoo-addon-account-financial-report 16.0.1.15.2__py3-none-any.whl → 16.0.1.16.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 +14 -1
- odoo/addons/account_financial_report/__manifest__.py +5 -1
- odoo/addons/account_financial_report/data/report_column_data.xml +358 -0
- odoo/addons/account_financial_report/i18n/account_financial_report.pot +125 -0
- odoo/addons/account_financial_report/i18n/ar.po +1 -1
- odoo/addons/account_financial_report/i18n/ca.po +1 -1
- odoo/addons/account_financial_report/i18n/de.po +1 -1
- odoo/addons/account_financial_report/i18n/es.po +11 -6
- odoo/addons/account_financial_report/i18n/es_AR.po +1 -1
- odoo/addons/account_financial_report/i18n/es_MX.po +1 -1
- odoo/addons/account_financial_report/i18n/fr.po +1 -1
- odoo/addons/account_financial_report/i18n/fr_CH.po +1 -1
- odoo/addons/account_financial_report/i18n/fr_FR.po +1 -1
- odoo/addons/account_financial_report/i18n/hr.po +1 -1
- odoo/addons/account_financial_report/i18n/hr_HR.po +1 -1
- odoo/addons/account_financial_report/i18n/it.po +1 -1
- odoo/addons/account_financial_report/i18n/ja.po +1 -1
- odoo/addons/account_financial_report/i18n/nl.po +1 -1
- odoo/addons/account_financial_report/i18n/nl_NL.po +1 -1
- odoo/addons/account_financial_report/i18n/pt.po +1 -1
- odoo/addons/account_financial_report/i18n/pt_BR.po +1 -1
- odoo/addons/account_financial_report/i18n/ro.po +1 -1
- odoo/addons/account_financial_report/i18n/sv.po +1 -1
- odoo/addons/account_financial_report/i18n/tr.po +1 -1
- odoo/addons/account_financial_report/models/__init__.py +1 -0
- odoo/addons/account_financial_report/models/account_financial_report_column.py +17 -0
- odoo/addons/account_financial_report/readme/CONTRIBUTORS.rst +1 -0
- odoo/addons/account_financial_report/readme/DESCRIPTION.rst +3 -0
- odoo/addons/account_financial_report/readme/HISTORY.rst +5 -0
- odoo/addons/account_financial_report/readme/ROADMAP.rst +3 -0
- odoo/addons/account_financial_report/report/abstract_report.py +15 -0
- odoo/addons/account_financial_report/report/aged_partner_balance.py +18 -12
- odoo/addons/account_financial_report/report/general_ledger.py +27 -24
- 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 +116 -52
- odoo/addons/account_financial_report/report/templates/journal_ledger.xml +79 -31
- odoo/addons/account_financial_report/report/templates/open_items.xml +51 -22
- odoo/addons/account_financial_report/report/trial_balance.py +30 -26
- odoo/addons/account_financial_report/report/vat_report.py +21 -16
- odoo/addons/account_financial_report/security/ir.model.access.csv +1 -0
- odoo/addons/account_financial_report/static/description/index.html +33 -19
- 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/view/account_financial_report_column_view.xml +46 -0
- odoo/addons/account_financial_report/wizard/abstract_wizard.py +25 -1
- odoo/addons/account_financial_report/wizard/aged_partner_balance_wizard.py +17 -15
- odoo/addons/account_financial_report/wizard/general_ledger_wizard.py +26 -23
- odoo/addons/account_financial_report/wizard/general_ledger_wizard_view.xml +7 -0
- odoo/addons/account_financial_report/wizard/journal_ledger_wizard.py +19 -17
- odoo/addons/account_financial_report/wizard/journal_ledger_wizard_view.xml +48 -32
- odoo/addons/account_financial_report/wizard/open_items_wizard.py +20 -18
- odoo/addons/account_financial_report/wizard/open_items_wizard_view.xml +67 -54
- odoo/addons/account_financial_report/wizard/trial_balance_wizard.py +26 -24
- odoo/addons/account_financial_report/wizard/vat_report_wizard.py +15 -13
- {odoo_addon_account_financial_report-16.0.1.15.2.dist-info → odoo_addon_account_financial_report-16.0.1.16.0.dist-info}/METADATA +16 -3
- {odoo_addon_account_financial_report-16.0.1.15.2.dist-info → odoo_addon_account_financial_report-16.0.1.16.0.dist-info}/RECORD +63 -60
- {odoo_addon_account_financial_report-16.0.1.15.2.dist-info → odoo_addon_account_financial_report-16.0.1.16.0.dist-info}/WHEEL +0 -0
- {odoo_addon_account_financial_report-16.0.1.15.2.dist-info → odoo_addon_account_financial_report-16.0.1.16.0.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Copyright 2019 Lorenzo Battistini @ TAKOBI
|
|
2
|
+
# Copyright 2025 Tecnativa - Carlos Dauden
|
|
2
3
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
3
4
|
|
|
4
|
-
from odoo import fields, models
|
|
5
|
+
from odoo import api, fields, models
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
class AbstractWizard(models.AbstractModel):
|
|
@@ -34,6 +35,20 @@ class AbstractWizard(models.AbstractModel):
|
|
|
34
35
|
required=False,
|
|
35
36
|
string="Company",
|
|
36
37
|
)
|
|
38
|
+
# Hack inverse to force save columns options and do not create table x_rel
|
|
39
|
+
column_ids = fields.Many2many(
|
|
40
|
+
comodel_name="account.financial.report.column",
|
|
41
|
+
store=False,
|
|
42
|
+
inverse=lambda self: self,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
@api.model
|
|
46
|
+
def default_get(self, fields):
|
|
47
|
+
res = super().default_get(fields)
|
|
48
|
+
res["column_ids"] = self.env["account.financial.report.column"].search(
|
|
49
|
+
[("res_model", "=", self._name)]
|
|
50
|
+
)
|
|
51
|
+
return res
|
|
37
52
|
|
|
38
53
|
def button_export_html(self):
|
|
39
54
|
self.ensure_one()
|
|
@@ -49,3 +64,12 @@ class AbstractWizard(models.AbstractModel):
|
|
|
49
64
|
self.ensure_one()
|
|
50
65
|
report_type = "xlsx"
|
|
51
66
|
return self._export(report_type)
|
|
67
|
+
|
|
68
|
+
def _limit_text(self, value, limit=0):
|
|
69
|
+
if value and limit and len(value) > limit:
|
|
70
|
+
value = value[:limit] + "..."
|
|
71
|
+
return value
|
|
72
|
+
|
|
73
|
+
def _prepare_report_data(self):
|
|
74
|
+
self.ensure_one()
|
|
75
|
+
return {"wizard_name": self._name, "wizard_id": self.id}
|
|
@@ -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:
|
|
@@ -131,20 +131,22 @@ class AgedPartnerBalanceWizard(models.TransientModel):
|
|
|
131
131
|
.report_action(self, data=data)
|
|
132
132
|
)
|
|
133
133
|
|
|
134
|
-
def
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
134
|
+
def _prepare_report_data(self):
|
|
135
|
+
res = super()._prepare_report_data()
|
|
136
|
+
res.update(
|
|
137
|
+
{
|
|
138
|
+
"date_at": self.date_at,
|
|
139
|
+
"date_from": self.date_from or False,
|
|
140
|
+
"only_posted_moves": self.target_move == "posted",
|
|
141
|
+
"company_id": self.company_id.id,
|
|
142
|
+
"account_ids": self.account_ids.ids,
|
|
143
|
+
"partner_ids": self.partner_ids.ids,
|
|
144
|
+
"show_move_line_details": self.show_move_line_details,
|
|
145
|
+
"account_financial_report_lang": self.env.lang,
|
|
146
|
+
"age_partner_config_id": self.age_partner_config_id.id,
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
return res
|
|
148
150
|
|
|
149
151
|
def _export(self, report_type):
|
|
150
152
|
"""Default export is PDF."""
|
|
@@ -269,7 +269,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
|
|
269
269
|
|
|
270
270
|
def _print_report(self, report_type):
|
|
271
271
|
self.ensure_one()
|
|
272
|
-
data = self.
|
|
272
|
+
data = self._prepare_report_data()
|
|
273
273
|
if report_type == "xlsx":
|
|
274
274
|
report_name = "a_f_r.report_general_ledger_xlsx"
|
|
275
275
|
else:
|
|
@@ -283,28 +283,31 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
|
|
283
283
|
.report_action(self, data=data)
|
|
284
284
|
)
|
|
285
285
|
|
|
286
|
-
def
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
286
|
+
def _prepare_report_data(self):
|
|
287
|
+
res = super()._prepare_report_data()
|
|
288
|
+
res.update(
|
|
289
|
+
{
|
|
290
|
+
"wizard_id": self.id,
|
|
291
|
+
"date_from": self.date_from,
|
|
292
|
+
"date_to": self.date_to,
|
|
293
|
+
"only_posted_moves": self.target_move == "posted",
|
|
294
|
+
"hide_account_at_0": self.hide_account_at_0,
|
|
295
|
+
"foreign_currency": self.foreign_currency,
|
|
296
|
+
"company_id": self.company_id.id,
|
|
297
|
+
"account_ids": self.account_ids.ids,
|
|
298
|
+
"partner_ids": self.partner_ids.ids,
|
|
299
|
+
"grouped_by": self.grouped_by,
|
|
300
|
+
"cost_center_ids": self.cost_center_ids.ids,
|
|
301
|
+
"show_cost_center": self.show_cost_center,
|
|
302
|
+
"journal_ids": self.account_journal_ids.ids,
|
|
303
|
+
"centralize": self.centralize,
|
|
304
|
+
"fy_start_date": self.fy_start_date,
|
|
305
|
+
"unaffected_earnings_account": self.unaffected_earnings_account.id,
|
|
306
|
+
"account_financial_report_lang": self.env.lang,
|
|
307
|
+
"domain": self._get_account_move_lines_domain(),
|
|
308
|
+
}
|
|
309
|
+
)
|
|
310
|
+
return res
|
|
308
311
|
|
|
309
312
|
def _export(self, report_type):
|
|
310
313
|
"""Default export is PDF."""
|
|
@@ -93,6 +93,13 @@
|
|
|
93
93
|
context="{'skip_search_count': 1}"
|
|
94
94
|
/>
|
|
95
95
|
</page>
|
|
96
|
+
<page name="columns" string="Columns">
|
|
97
|
+
<field
|
|
98
|
+
name="column_ids"
|
|
99
|
+
context="{'default_res_name': 'general.ledger.report.wizard'}"
|
|
100
|
+
widget="one2many"
|
|
101
|
+
/>
|
|
102
|
+
</page>
|
|
96
103
|
</notebook>
|
|
97
104
|
</div>
|
|
98
105
|
<div
|
|
@@ -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:
|
|
@@ -89,28 +89,30 @@ class JournalLedgerReportWizard(models.TransientModel):
|
|
|
89
89
|
.report_action(self, data=data)
|
|
90
90
|
)
|
|
91
91
|
|
|
92
|
-
def
|
|
93
|
-
|
|
92
|
+
def _prepare_report_data(self):
|
|
93
|
+
res = super()._prepare_report_data()
|
|
94
94
|
journals = self.journal_ids
|
|
95
95
|
if not journals:
|
|
96
96
|
# Not selecting a journal means that we'll display all journals
|
|
97
97
|
journals = self.env["account.journal"].search(
|
|
98
98
|
[("company_id", "=", self.company_id.id)]
|
|
99
99
|
)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
res.update(
|
|
101
|
+
{
|
|
102
|
+
"date_from": self.date_from,
|
|
103
|
+
"date_to": self.date_to,
|
|
104
|
+
"move_target": self.move_target,
|
|
105
|
+
"foreign_currency": self.foreign_currency,
|
|
106
|
+
"company_id": self.company_id.id,
|
|
107
|
+
"journal_ids": journals.ids,
|
|
108
|
+
"sort_option": self.sort_option,
|
|
109
|
+
"group_option": self.group_option,
|
|
110
|
+
"with_account_name": self.with_account_name,
|
|
111
|
+
"account_financial_report_lang": self.env.lang,
|
|
112
|
+
"with_auto_sequence": self.with_auto_sequence,
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
return res
|
|
114
116
|
|
|
115
117
|
def _export(self, report_type):
|
|
116
118
|
"""Default export is PDF."""
|
|
@@ -7,38 +7,54 @@
|
|
|
7
7
|
<field name="model">journal.ledger.report.wizard</field>
|
|
8
8
|
<field name="arch" type="xml">
|
|
9
9
|
<form>
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
10
|
+
<sheet>
|
|
11
|
+
<notebook>
|
|
12
|
+
<page string="Filters">
|
|
13
|
+
<group>
|
|
14
|
+
<field
|
|
15
|
+
name="company_id"
|
|
16
|
+
groups="base.group_multi_company"
|
|
17
|
+
/>
|
|
18
|
+
</group>
|
|
19
|
+
<separator string="Periods" />
|
|
20
|
+
<group>
|
|
21
|
+
<group>
|
|
22
|
+
<field name="date_range_id" />
|
|
23
|
+
<field name="date_from" />
|
|
24
|
+
<field name="date_to" />
|
|
25
|
+
</group>
|
|
26
|
+
<group />
|
|
27
|
+
</group>
|
|
28
|
+
<separator string="Options" />
|
|
29
|
+
<group name="options">
|
|
30
|
+
<group>
|
|
31
|
+
<field
|
|
32
|
+
name="move_target"
|
|
33
|
+
widget="radio"
|
|
34
|
+
options="{'horizontal': true}"
|
|
35
|
+
/>
|
|
36
|
+
<field name="sort_option" />
|
|
37
|
+
<field name="group_option" />
|
|
38
|
+
<field name="foreign_currency" />
|
|
39
|
+
<field name="with_account_name" />
|
|
40
|
+
<field name="with_auto_sequence" />
|
|
41
|
+
</group>
|
|
42
|
+
<group />
|
|
43
|
+
</group>
|
|
44
|
+
<separator string="Journals" />
|
|
45
|
+
<group>
|
|
46
|
+
<field name="journal_ids" widget="many2many_tags" />
|
|
47
|
+
</group>
|
|
48
|
+
</page>
|
|
49
|
+
<page string="Columns">
|
|
50
|
+
<field
|
|
51
|
+
name="column_ids"
|
|
52
|
+
context="{'default_res_name': 'journal.ledger.report.wizard'}"
|
|
53
|
+
widget="one2many"
|
|
54
|
+
/>
|
|
55
|
+
</page>
|
|
56
|
+
</notebook>
|
|
57
|
+
</sheet>
|
|
42
58
|
<footer>
|
|
43
59
|
<button
|
|
44
60
|
name="button_export_html"
|
|
@@ -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:
|
|
@@ -167,23 +167,25 @@ class OpenItemsReportWizard(models.TransientModel):
|
|
|
167
167
|
.report_action(self, data=data)
|
|
168
168
|
)
|
|
169
169
|
|
|
170
|
-
def
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
170
|
+
def _prepare_report_data(self):
|
|
171
|
+
res = super()._prepare_report_data()
|
|
172
|
+
res.update(
|
|
173
|
+
{
|
|
174
|
+
"date_at": fields.Date.to_string(self.date_at),
|
|
175
|
+
"date_from": self.date_from or False,
|
|
176
|
+
"only_posted_moves": self.target_move == "posted",
|
|
177
|
+
"hide_account_at_0": self.hide_account_at_0,
|
|
178
|
+
"foreign_currency": self.foreign_currency,
|
|
179
|
+
"show_partner_details": self.show_partner_details,
|
|
180
|
+
"company_id": self.company_id.id,
|
|
181
|
+
"target_move": self.target_move,
|
|
182
|
+
"account_ids": self.account_ids.ids,
|
|
183
|
+
"partner_ids": self.partner_ids.ids or [],
|
|
184
|
+
"account_financial_report_lang": self.env.lang,
|
|
185
|
+
"grouped_by": self.grouped_by,
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
return res
|
|
187
189
|
|
|
188
190
|
def _export(self, report_type):
|
|
189
191
|
return self._print_report(report_type)
|
|
@@ -6,62 +6,75 @@
|
|
|
6
6
|
<field name="model">open.items.report.wizard</field>
|
|
7
7
|
<field name="arch" type="xml">
|
|
8
8
|
<form>
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
9
|
+
<sheet>
|
|
10
|
+
<notebook>
|
|
11
|
+
<page string="Filters">
|
|
12
|
+
<group name="main_info">
|
|
13
|
+
<field
|
|
14
|
+
name="company_id"
|
|
15
|
+
options="{'no_create': True}"
|
|
16
|
+
groups="base.group_multi_company"
|
|
17
|
+
/>
|
|
18
|
+
</group>
|
|
19
|
+
<group name="filters">
|
|
20
|
+
<group name="date_range">
|
|
21
|
+
<field name="date_at" />
|
|
22
|
+
<field name="date_from" />
|
|
23
|
+
</group>
|
|
24
|
+
<group name="other_filters">
|
|
25
|
+
<field name="target_move" widget="radio" />
|
|
26
|
+
<field name="show_partner_details" />
|
|
27
|
+
<field name="grouped_by" />
|
|
28
|
+
<field name="hide_account_at_0" />
|
|
29
|
+
<field name="foreign_currency" />
|
|
30
|
+
</group>
|
|
31
|
+
</group>
|
|
32
|
+
<group name="partner_filter" col="1">
|
|
33
|
+
<label for="partner_ids" />
|
|
34
|
+
<field
|
|
35
|
+
name="partner_ids"
|
|
36
|
+
nolabel="1"
|
|
37
|
+
widget="many2many_tags"
|
|
38
|
+
options="{'no_create': True}"
|
|
39
|
+
/>
|
|
40
|
+
</group>
|
|
41
|
+
<group name="account_filter" col="4">
|
|
42
|
+
<field name="receivable_accounts_only" />
|
|
43
|
+
<field name="payable_accounts_only" />
|
|
44
|
+
<label for="account_code_from" string="From Code" />
|
|
45
|
+
<div>
|
|
46
|
+
<div class="o_row">
|
|
47
|
+
<field
|
|
48
|
+
name="account_code_from"
|
|
49
|
+
class="oe_inline"
|
|
50
|
+
options="{'no_create': True}"
|
|
51
|
+
/>
|
|
52
|
+
<span class="oe_inline">To</span>
|
|
53
|
+
<field
|
|
54
|
+
name="account_code_to"
|
|
55
|
+
class="oe_inline"
|
|
56
|
+
options="{'no_create': True}"
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<field
|
|
61
|
+
name="account_ids"
|
|
62
|
+
nolabel="1"
|
|
63
|
+
widget="many2many_tags"
|
|
64
|
+
options="{'no_create': True}"
|
|
65
|
+
colspan="4"
|
|
66
|
+
/>
|
|
67
|
+
</group>
|
|
68
|
+
</page>
|
|
69
|
+
<page string="Columns">
|
|
44
70
|
<field
|
|
45
|
-
name="
|
|
46
|
-
|
|
47
|
-
|
|
71
|
+
name="column_ids"
|
|
72
|
+
context="{'default_res_name': 'open.items.report.wizard'}"
|
|
73
|
+
widget="one2many"
|
|
48
74
|
/>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class="oe_inline"
|
|
53
|
-
options="{'no_create': True}"
|
|
54
|
-
/>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
<field
|
|
58
|
-
name="account_ids"
|
|
59
|
-
nolabel="1"
|
|
60
|
-
widget="many2many_tags"
|
|
61
|
-
options="{'no_create': True}"
|
|
62
|
-
colspan="4"
|
|
63
|
-
/>
|
|
64
|
-
</group>
|
|
75
|
+
</page>
|
|
76
|
+
</notebook>
|
|
77
|
+
</sheet>
|
|
65
78
|
<footer>
|
|
66
79
|
<button
|
|
67
80
|
name="button_export_html"
|
|
@@ -233,7 +233,7 @@ class TrialBalanceReportWizard(models.TransientModel):
|
|
|
233
233
|
|
|
234
234
|
def _print_report(self, report_type):
|
|
235
235
|
self.ensure_one()
|
|
236
|
-
data = self.
|
|
236
|
+
data = self._prepare_report_data()
|
|
237
237
|
if report_type == "xlsx":
|
|
238
238
|
report_name = "a_f_r.report_trial_balance_xlsx"
|
|
239
239
|
else:
|
|
@@ -247,29 +247,31 @@ class TrialBalanceReportWizard(models.TransientModel):
|
|
|
247
247
|
.report_action(self, data=data)
|
|
248
248
|
)
|
|
249
249
|
|
|
250
|
-
def
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
250
|
+
def _prepare_report_data(self):
|
|
251
|
+
res = super()._prepare_report_data()
|
|
252
|
+
res.update(
|
|
253
|
+
{
|
|
254
|
+
"date_from": self.date_from,
|
|
255
|
+
"date_to": self.date_to,
|
|
256
|
+
"only_posted_moves": self.target_move == "posted",
|
|
257
|
+
"hide_account_at_0": self.hide_account_at_0,
|
|
258
|
+
"foreign_currency": self.foreign_currency,
|
|
259
|
+
"company_id": self.company_id.id,
|
|
260
|
+
"account_ids": self.account_ids.ids or [],
|
|
261
|
+
"partner_ids": self.partner_ids.ids or [],
|
|
262
|
+
"journal_ids": self.journal_ids.ids or [],
|
|
263
|
+
"fy_start_date": self.fy_start_date,
|
|
264
|
+
"show_hierarchy": self.show_hierarchy,
|
|
265
|
+
"limit_hierarchy_level": self.limit_hierarchy_level,
|
|
266
|
+
"show_hierarchy_level": self.show_hierarchy_level,
|
|
267
|
+
"hide_parent_hierarchy_level": self.hide_parent_hierarchy_level,
|
|
268
|
+
"show_partner_details": self.show_partner_details,
|
|
269
|
+
"unaffected_earnings_account": self.unaffected_earnings_account.id,
|
|
270
|
+
"account_financial_report_lang": self.env.lang,
|
|
271
|
+
"grouped_by": self.grouped_by,
|
|
272
|
+
}
|
|
273
|
+
)
|
|
274
|
+
return res
|
|
273
275
|
|
|
274
276
|
def _export(self, report_type):
|
|
275
277
|
"""Default export is PDF."""
|
|
@@ -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:
|
|
@@ -82,18 +82,20 @@ class VATReportWizard(models.TransientModel):
|
|
|
82
82
|
.report_action(self, data=data)
|
|
83
83
|
)
|
|
84
84
|
|
|
85
|
-
def
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
85
|
+
def _prepare_report_data(self):
|
|
86
|
+
res = super()._prepare_report_data()
|
|
87
|
+
res.update(
|
|
88
|
+
{
|
|
89
|
+
"company_id": self.company_id.id,
|
|
90
|
+
"date_from": self.date_from,
|
|
91
|
+
"date_to": self.date_to,
|
|
92
|
+
"based_on": self.based_on,
|
|
93
|
+
"only_posted_moves": self.target_move == "posted",
|
|
94
|
+
"tax_detail": self.tax_detail,
|
|
95
|
+
"account_financial_report_lang": self.env.lang,
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
return res
|
|
97
99
|
|
|
98
100
|
def _export(self, report_type):
|
|
99
101
|
"""Default export is PDF."""
|