odoo-addon-account-financial-report 18.0.1.3.0.4__py3-none-any.whl → 18.0.1.4.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/fr_CH.po +210 -227
- 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 +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 +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-18.0.1.3.0.4.dist-info → odoo_addon_account_financial_report-18.0.1.4.0.dist-info}/METADATA +2 -2
- {odoo_addon_account_financial_report-18.0.1.3.0.4.dist-info → odoo_addon_account_financial_report-18.0.1.4.0.dist-info}/RECORD +35 -35
- {odoo_addon_account_financial_report-18.0.1.3.0.4.dist-info → odoo_addon_account_financial_report-18.0.1.4.0.dist-info}/WHEEL +0 -0
- {odoo_addon_account_financial_report-18.0.1.3.0.4.dist-info → odoo_addon_account_financial_report-18.0.1.4.0.dist-info}/top_level.txt +0 -0
|
@@ -162,3 +162,9 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|
|
162
162
|
"debit",
|
|
163
163
|
"amount_currency",
|
|
164
164
|
]
|
|
165
|
+
|
|
166
|
+
def _get_report_values(self, docids, data):
|
|
167
|
+
wizard = self.env[data["wizard_name"]].browse(data["wizard_id"])
|
|
168
|
+
return {
|
|
169
|
+
"limit_text": wizard._limit_text,
|
|
170
|
+
}
|
|
@@ -409,6 +409,7 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|
|
409
409
|
return aged_partner_data
|
|
410
410
|
|
|
411
411
|
def _get_report_values(self, docids, data):
|
|
412
|
+
res = super()._get_report_values(docids, data)
|
|
412
413
|
wizard_id = data["wizard_id"]
|
|
413
414
|
company = self.env["res.company"].browse(data["company_id"])
|
|
414
415
|
company_id = data["company_id"]
|
|
@@ -451,18 +452,23 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
|
|
451
452
|
aged_partner_data = self.with_context(
|
|
452
453
|
age_partner_config=aged_partner_configuration
|
|
453
454
|
)._calculate_percent(aged_partner_data)
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
455
|
+
res.update(
|
|
456
|
+
{
|
|
457
|
+
"doc_ids": [wizard_id],
|
|
458
|
+
"doc_model": "aged.partner.balance.report.wizard",
|
|
459
|
+
"docs": self.env["aged.partner.balance.report.wizard"].browse(
|
|
460
|
+
wizard_id
|
|
461
|
+
),
|
|
462
|
+
"company_name": company.display_name,
|
|
463
|
+
"currency_name": company.currency_id.name,
|
|
464
|
+
"date_at": date_at,
|
|
465
|
+
"only_posted_moves": only_posted_moves,
|
|
466
|
+
"aged_partner_balance": aged_partner_data,
|
|
467
|
+
"show_move_lines_details": show_move_line_details,
|
|
468
|
+
"age_partner_config": aged_partner_configuration,
|
|
469
|
+
}
|
|
470
|
+
)
|
|
471
|
+
return res
|
|
466
472
|
|
|
467
473
|
def _get_ml_fields(self):
|
|
468
474
|
return self.COMMON_ML_FIELDS + [
|
|
@@ -385,7 +385,6 @@ class GeneralLedgerReport(models.AbstractModel):
|
|
|
385
385
|
domain += [("move_id.state", "=", "posted")]
|
|
386
386
|
else:
|
|
387
387
|
domain += [("move_id.state", "in", ["posted", "draft"])]
|
|
388
|
-
|
|
389
388
|
if cost_center_ids:
|
|
390
389
|
domain += [("analytic_account_ids", "in", cost_center_ids)]
|
|
391
390
|
return domain
|
|
@@ -761,6 +760,7 @@ class GeneralLedgerReport(models.AbstractModel):
|
|
|
761
760
|
|
|
762
761
|
# flake8: noqa: C901
|
|
763
762
|
def _get_report_values(self, docids, data):
|
|
763
|
+
res = super()._get_report_values(docids, data)
|
|
764
764
|
wizard_id = data["wizard_id"]
|
|
765
765
|
company = self.env["res.company"].browse(data["company_id"])
|
|
766
766
|
company_id = data["company_id"]
|
|
@@ -890,29 +890,32 @@ class GeneralLedgerReport(models.AbstractModel):
|
|
|
890
890
|
if not gl_item["currency_id"] and len(fin_bal_currency_ids) == 1:
|
|
891
891
|
fin_bal_currency_id = fin_bal_currency_ids[0]
|
|
892
892
|
gl_item["fin_bal_currency_id"] = fin_bal_currency_id
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
893
|
+
res.update(
|
|
894
|
+
{
|
|
895
|
+
"doc_ids": [wizard_id],
|
|
896
|
+
"doc_model": "general.ledger.report.wizard",
|
|
897
|
+
"docs": self.env["general.ledger.report.wizard"].browse(wizard_id),
|
|
898
|
+
"foreign_currency": data["foreign_currency"],
|
|
899
|
+
"company_name": company.display_name,
|
|
900
|
+
"company_currency": company.currency_id,
|
|
901
|
+
"currency_name": company.currency_id.name,
|
|
902
|
+
"date_from": data["date_from"],
|
|
903
|
+
"date_to": data["date_to"],
|
|
904
|
+
"only_posted_moves": data["only_posted_moves"],
|
|
905
|
+
"hide_account_at_0": data["hide_account_at_0"],
|
|
906
|
+
"show_cost_center": data["show_cost_center"],
|
|
907
|
+
"general_ledger": general_ledger,
|
|
908
|
+
"accounts_data": accounts_data,
|
|
909
|
+
"journals_data": journals_data,
|
|
910
|
+
"full_reconcile_data": full_reconcile_data,
|
|
911
|
+
"taxes_data": taxes_data,
|
|
912
|
+
"centralize": centralize,
|
|
913
|
+
"analytic_data": analytic_data,
|
|
914
|
+
"filter_partner_ids": True if partner_ids else False,
|
|
915
|
+
"currency_model": self.env["res.currency"],
|
|
916
|
+
}
|
|
917
|
+
)
|
|
918
|
+
return res
|
|
916
919
|
|
|
917
920
|
def _get_ml_fields(self):
|
|
918
921
|
return self.COMMON_ML_FIELDS + [
|
|
@@ -9,6 +9,7 @@ from odoo import models
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class JournalLedgerReport(models.AbstractModel):
|
|
12
|
+
_inherit = "report.account_financial_report.abstract_report"
|
|
12
13
|
_name = "report.account_financial_report.journal_ledger"
|
|
13
14
|
_description = "Journal Ledger Report"
|
|
14
15
|
|
|
@@ -300,6 +301,7 @@ class JournalLedgerReport(models.AbstractModel):
|
|
|
300
301
|
return journals_taxes_data_2
|
|
301
302
|
|
|
302
303
|
def _get_report_values(self, docids, data):
|
|
304
|
+
res = super()._get_report_values(docids, data)
|
|
303
305
|
wizard_id = data["wizard_id"]
|
|
304
306
|
wizard = self.env["journal.ledger.report.wizard"].browse(wizard_id)
|
|
305
307
|
company = self.env["res.company"].browse(data["company_id"])
|
|
@@ -351,25 +353,28 @@ class JournalLedgerReport(models.AbstractModel):
|
|
|
351
353
|
if journal_id in journal_totals.keys():
|
|
352
354
|
for item in ["debit", "credit"]:
|
|
353
355
|
journal_ledger_data[item] += journal_totals[journal_id][item]
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
356
|
+
res.update(
|
|
357
|
+
{
|
|
358
|
+
"doc_ids": [wizard_id],
|
|
359
|
+
"doc_model": "journal.ledger.report.wizard",
|
|
360
|
+
"docs": self.env["journal.ledger.report.wizard"].browse(wizard_id),
|
|
361
|
+
"group_option": data["group_option"],
|
|
362
|
+
"foreign_currency": data["foreign_currency"],
|
|
363
|
+
"with_account_name": data["with_account_name"],
|
|
364
|
+
"company_name": company.display_name,
|
|
365
|
+
"currency_name": company.currency_id.name,
|
|
366
|
+
"date_from": data["date_from"],
|
|
367
|
+
"date_to": data["date_to"],
|
|
368
|
+
"move_target": data["move_target"],
|
|
369
|
+
"with_auto_sequence": data["with_auto_sequence"],
|
|
370
|
+
"account_ids_data": account_ids_data,
|
|
371
|
+
"partner_ids_data": partner_ids_data,
|
|
372
|
+
"currency_ids_data": currency_ids_data,
|
|
373
|
+
"move_ids_data": move_ids_data,
|
|
374
|
+
"tax_line_data": tax_line_ids_data,
|
|
375
|
+
"move_line_ids_taxes_data": move_line_ids_taxes_data,
|
|
376
|
+
"Journal_Ledgers": journal_ledgers_data,
|
|
377
|
+
"Moves": moves_data,
|
|
378
|
+
}
|
|
379
|
+
)
|
|
380
|
+
return res
|
|
@@ -159,7 +159,7 @@ class OpenItemsReport(models.AbstractModel):
|
|
|
159
159
|
"partner_name": partner.name or "",
|
|
160
160
|
"ref_label": ref_label,
|
|
161
161
|
"journal_id": move_line["journal_id"][0],
|
|
162
|
-
"move_name": move_line["
|
|
162
|
+
"move_name": move_line["move_name"],
|
|
163
163
|
"entry_id": move_line["move_id"][0],
|
|
164
164
|
"currency_id": move_line["currency_id"][0]
|
|
165
165
|
if move_line["currency_id"]
|
|
@@ -243,6 +243,7 @@ class OpenItemsReport(models.AbstractModel):
|
|
|
243
243
|
return new_open_items
|
|
244
244
|
|
|
245
245
|
def _get_report_values(self, docids, data):
|
|
246
|
+
res = super()._get_report_values(docids, data)
|
|
246
247
|
wizard_id = data["wizard_id"]
|
|
247
248
|
company = self.env["res.company"].browse(data["company_id"])
|
|
248
249
|
company_id = data["company_id"]
|
|
@@ -277,24 +278,27 @@ class OpenItemsReport(models.AbstractModel):
|
|
|
277
278
|
partners_data,
|
|
278
279
|
accounts_data,
|
|
279
280
|
)
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
281
|
+
res.update(
|
|
282
|
+
{
|
|
283
|
+
"doc_ids": [wizard_id],
|
|
284
|
+
"doc_model": "open.items.report.wizard",
|
|
285
|
+
"docs": self.env["open.items.report.wizard"].browse(wizard_id),
|
|
286
|
+
"foreign_currency": data["foreign_currency"],
|
|
287
|
+
"show_partner_details": data["show_partner_details"],
|
|
288
|
+
"company_name": company.display_name,
|
|
289
|
+
"currency_name": company.currency_id.name,
|
|
290
|
+
"date_at": date_at_object.strftime("%d/%m/%Y"),
|
|
291
|
+
"hide_account_at_0": data["hide_account_at_0"],
|
|
292
|
+
"target_move": data["target_move"],
|
|
293
|
+
"journals_data": journals_data,
|
|
294
|
+
"partners_data": partners_data,
|
|
295
|
+
"accounts_data": accounts_data,
|
|
296
|
+
"total_amount": total_amount,
|
|
297
|
+
"Open_Items": open_items_move_lines_data,
|
|
298
|
+
"grouped_by": grouped_by,
|
|
299
|
+
}
|
|
300
|
+
)
|
|
301
|
+
return res
|
|
298
302
|
|
|
299
303
|
def _get_ml_fields(self):
|
|
300
304
|
return self.COMMON_ML_FIELDS + [
|
|
@@ -306,4 +310,5 @@ class OpenItemsReport(models.AbstractModel):
|
|
|
306
310
|
"amount_residual_currency",
|
|
307
311
|
"debit",
|
|
308
312
|
"amount_currency",
|
|
313
|
+
"move_name",
|
|
309
314
|
]
|
|
@@ -463,12 +463,16 @@
|
|
|
463
463
|
res-model="account.move.line"
|
|
464
464
|
view-type="form"
|
|
465
465
|
>
|
|
466
|
-
<t
|
|
466
|
+
<t
|
|
467
|
+
t-out="limit_text(line['ref_label'], 'label_text_limit')"
|
|
468
|
+
/>
|
|
467
469
|
</span>
|
|
468
470
|
</t>
|
|
469
471
|
<t t-else="">
|
|
470
472
|
<span>
|
|
471
|
-
<t
|
|
473
|
+
<t
|
|
474
|
+
t-out="limit_text(line['ref_label'], 'label_text_limit')"
|
|
475
|
+
/>
|
|
472
476
|
</span>
|
|
473
477
|
</t>
|
|
474
478
|
</div>
|
|
@@ -263,7 +263,10 @@
|
|
|
263
263
|
/>
|
|
264
264
|
</div>
|
|
265
265
|
<div class="act_as_cell left" name="label">
|
|
266
|
-
<span
|
|
266
|
+
<span
|
|
267
|
+
t-if="move_line['label']"
|
|
268
|
+
t-esc="limit_text(move_line['label'], 'label_text_limit')"
|
|
269
|
+
/>
|
|
267
270
|
<span t-if="not move_line['label']">/</span>
|
|
268
271
|
</div>
|
|
269
272
|
<div class="act_as_cell left" name="taxes">
|
|
@@ -276,7 +279,7 @@
|
|
|
276
279
|
t-value="o._get_data_from_dict(move_line['move_line_id'], move_line_ids_taxes_data)"
|
|
277
280
|
/>
|
|
278
281
|
<span
|
|
279
|
-
t-esc="o._get_ml_tax_description(move_line, tax_line_dat, move_line_ids_taxes_dat)"
|
|
282
|
+
t-esc="limit_text(o._get_ml_tax_description(move_line, tax_line_dat, move_line_ids_taxes_dat), 'label_text_limit')"
|
|
280
283
|
/>
|
|
281
284
|
</div>
|
|
282
285
|
<div class="act_as_cell amount" name="debit">
|
|
@@ -858,6 +858,7 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
858
858
|
return groups_data
|
|
859
859
|
|
|
860
860
|
def _get_report_values(self, docids, data):
|
|
861
|
+
res = super()._get_report_values(docids, data)
|
|
861
862
|
show_partner_details = data["show_partner_details"]
|
|
862
863
|
wizard_id = data["wizard_id"]
|
|
863
864
|
company = self.env["res.company"].browse(data["company_id"])
|
|
@@ -952,29 +953,32 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
952
953
|
total_amount[account_id]["currency_name"] = accounts_data[
|
|
953
954
|
account_id
|
|
954
955
|
]["currency_name"]
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
956
|
+
res.update(
|
|
957
|
+
{
|
|
958
|
+
"doc_ids": [wizard_id],
|
|
959
|
+
"doc_model": "trial.balance.report.wizard",
|
|
960
|
+
"docs": self.env["trial.balance.report.wizard"].browse(wizard_id),
|
|
961
|
+
"foreign_currency": data["foreign_currency"],
|
|
962
|
+
"company_name": company.display_name,
|
|
963
|
+
"company_currency": company.currency_id,
|
|
964
|
+
"currency_name": company.currency_id.name,
|
|
965
|
+
"date_from": data["date_from"],
|
|
966
|
+
"date_to": data["date_to"],
|
|
967
|
+
"only_posted_moves": data["only_posted_moves"],
|
|
968
|
+
"hide_account_at_0": data["hide_account_at_0"],
|
|
969
|
+
"show_partner_details": data["show_partner_details"],
|
|
970
|
+
"limit_hierarchy_level": data["limit_hierarchy_level"],
|
|
971
|
+
"show_hierarchy": show_hierarchy,
|
|
972
|
+
"hide_parent_hierarchy_level": data["hide_parent_hierarchy_level"],
|
|
973
|
+
"trial_balance": trial_balance,
|
|
974
|
+
"trial_balance_grouped": trial_balance_grouped,
|
|
975
|
+
"total_amount": total_amount,
|
|
976
|
+
"total_amount_grouped": total_amount_grouped,
|
|
977
|
+
"accounts_data": accounts_data,
|
|
978
|
+
"partners_data": partners_data,
|
|
979
|
+
"show_hierarchy_level": show_hierarchy_level,
|
|
980
|
+
"currency_model": self.env["res.currency"],
|
|
981
|
+
"grouped_by": grouped_by,
|
|
982
|
+
}
|
|
983
|
+
)
|
|
984
|
+
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
|
|
|
@@ -201,6 +202,7 @@ class VATReport(models.AbstractModel):
|
|
|
201
202
|
return vat_report_list
|
|
202
203
|
|
|
203
204
|
def _get_report_values(self, docids, data):
|
|
205
|
+
res = super()._get_report_values(docids, data)
|
|
204
206
|
wizard_id = data["wizard_id"]
|
|
205
207
|
company = self.env["res.company"].browse(data["company_id"])
|
|
206
208
|
company_id = data["company_id"]
|
|
@@ -220,18 +222,21 @@ class VATReport(models.AbstractModel):
|
|
|
220
222
|
vat_report = self._get_vat_report_tag_data(
|
|
221
223
|
vat_report_data, tax_data, tax_detail
|
|
222
224
|
)
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
225
|
+
res.update(
|
|
226
|
+
{
|
|
227
|
+
"doc_ids": [wizard_id],
|
|
228
|
+
"doc_model": "vat.report.wizard",
|
|
229
|
+
"docs": self.env["vat.report.wizard"].browse(wizard_id),
|
|
230
|
+
"company_name": company.display_name,
|
|
231
|
+
"currency_name": company.currency_id.name,
|
|
232
|
+
"date_to": data["date_to"],
|
|
233
|
+
"date_from": data["date_from"],
|
|
234
|
+
"based_on": data["based_on"],
|
|
235
|
+
"tax_detail": data["tax_detail"],
|
|
236
|
+
"vat_report": vat_report,
|
|
237
|
+
}
|
|
238
|
+
)
|
|
239
|
+
return res
|
|
235
240
|
|
|
236
241
|
def _get_ml_fields_vat_report(self):
|
|
237
242
|
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:28b271586e6e9a5c8bb57d25d47843326c5618b35a53495fe6959bd47e5c1f12
|
|
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/18.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-18-0/account-financial-reporting-18-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=18.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)
|
|
@@ -176,7 +176,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
|
|
|
176
176
|
"move_target": "all",
|
|
177
177
|
}
|
|
178
178
|
)
|
|
179
|
-
data = wiz.
|
|
179
|
+
data = wiz._prepare_report_data()
|
|
180
180
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
181
181
|
self.check_report_journal_debit_credit(res_data, 100, 100)
|
|
182
182
|
|
|
@@ -185,7 +185,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
|
|
|
185
185
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
186
186
|
self.check_report_journal_debit_credit(res_data, 200, 200)
|
|
187
187
|
wiz.move_target = "posted"
|
|
188
|
-
data = wiz.
|
|
188
|
+
data = wiz._prepare_report_data()
|
|
189
189
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
190
190
|
self.check_report_journal_debit_credit(res_data, 0, 0)
|
|
191
191
|
|
|
@@ -202,7 +202,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
|
|
|
202
202
|
self.check_report_journal_debit_credit(res_data, 200, 200)
|
|
203
203
|
|
|
204
204
|
wiz.date_from = self.previous_fy_date_start
|
|
205
|
-
data = wiz.
|
|
205
|
+
data = wiz._prepare_report_data()
|
|
206
206
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
207
207
|
self.check_report_journal_debit_credit(res_data, 300, 300)
|
|
208
208
|
|
|
@@ -237,7 +237,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
|
|
|
237
237
|
"move_target": "all",
|
|
238
238
|
}
|
|
239
239
|
)
|
|
240
|
-
data = wiz.
|
|
240
|
+
data = wiz._prepare_report_data()
|
|
241
241
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
242
242
|
self.check_report_journal_debit_credit(res_data, 250, 250)
|
|
243
243
|
self.check_report_journal_debit_credit_taxes(res_data, 0, 300, 0, 50)
|
|
@@ -275,7 +275,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
|
|
|
275
275
|
"move_target": "all",
|
|
276
276
|
}
|
|
277
277
|
)
|
|
278
|
-
data = wiz.
|
|
278
|
+
data = wiz._prepare_report_data()
|
|
279
279
|
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
|
|
280
280
|
|
|
281
281
|
self.check_report_journal_debit_credit(res_data, 250, 250)
|
|
@@ -188,7 +188,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
|
|
|
188
188
|
"show_partner_details": with_partners,
|
|
189
189
|
}
|
|
190
190
|
)
|
|
191
|
-
data = trial_balance.
|
|
191
|
+
data = trial_balance._prepare_report_data()
|
|
192
192
|
res_data = self.env[
|
|
193
193
|
"report.account_financial_report.trial_balance"
|
|
194
194
|
]._get_report_values(trial_balance, data)
|
|
@@ -543,7 +543,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
|
|
|
543
543
|
"fy_start_date": self.fy_date_start,
|
|
544
544
|
}
|
|
545
545
|
)
|
|
546
|
-
data = trial_balance.
|
|
546
|
+
data = trial_balance._prepare_report_data()
|
|
547
547
|
res_data = self.env[
|
|
548
548
|
"report.account_financial_report.trial_balance"
|
|
549
549
|
]._get_report_values(trial_balance, data)
|
|
@@ -596,7 +596,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
|
|
|
596
596
|
"fy_start_date": self.fy_date_start,
|
|
597
597
|
}
|
|
598
598
|
)
|
|
599
|
-
data = trial_balance.
|
|
599
|
+
data = trial_balance._prepare_report_data()
|
|
600
600
|
res_data = self.env[
|
|
601
601
|
"report.account_financial_report.trial_balance"
|
|
602
602
|
]._get_report_values(trial_balance, data)
|
|
@@ -650,7 +650,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
|
|
|
650
650
|
"fy_start_date": self.fy_date_start,
|
|
651
651
|
}
|
|
652
652
|
)
|
|
653
|
-
data = trial_balance.
|
|
653
|
+
data = trial_balance._prepare_report_data()
|
|
654
654
|
res_data = self.env[
|
|
655
655
|
"report.account_financial_report.trial_balance"
|
|
656
656
|
]._get_report_values(trial_balance, data)
|
|
@@ -217,7 +217,7 @@ class TestVATReport(AccountTestInvoicingCommon):
|
|
|
217
217
|
"tax_detail": True,
|
|
218
218
|
}
|
|
219
219
|
)
|
|
220
|
-
data = vat_report.
|
|
220
|
+
data = vat_report._prepare_report_data()
|
|
221
221
|
res_data = self.env[
|
|
222
222
|
"report.account_financial_report.vat_report"
|
|
223
223
|
]._get_report_values(vat_report, data)
|