odoo-addon-account-financial-report 15.0.2.13.0__py3-none-any.whl → 15.0.3.0.0.1__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 +17 -0
- odoo/addons/account_financial_report/i18n/ar.po +17 -0
- odoo/addons/account_financial_report/i18n/ca.po +17 -0
- odoo/addons/account_financial_report/i18n/da.po +17 -0
- odoo/addons/account_financial_report/i18n/de.po +17 -0
- odoo/addons/account_financial_report/i18n/es.po +17 -0
- odoo/addons/account_financial_report/i18n/es_AR.po +17 -0
- odoo/addons/account_financial_report/i18n/es_MX.po +17 -0
- odoo/addons/account_financial_report/i18n/fr.po +17 -0
- odoo/addons/account_financial_report/i18n/fr_CH.po +17 -0
- odoo/addons/account_financial_report/i18n/fr_FR.po +17 -0
- odoo/addons/account_financial_report/i18n/hr.po +17 -0
- odoo/addons/account_financial_report/i18n/hr_HR.po +17 -0
- odoo/addons/account_financial_report/i18n/it.po +17 -0
- odoo/addons/account_financial_report/i18n/ja.po +17 -0
- odoo/addons/account_financial_report/i18n/nl.po +17 -0
- odoo/addons/account_financial_report/i18n/nl_NL.po +17 -0
- odoo/addons/account_financial_report/i18n/pt.po +17 -0
- odoo/addons/account_financial_report/i18n/pt_BR.po +17 -0
- odoo/addons/account_financial_report/i18n/ro.po +17 -0
- odoo/addons/account_financial_report/report/templates/trial_balance.xml +208 -100
- odoo/addons/account_financial_report/report/trial_balance.py +182 -3
- odoo/addons/account_financial_report/report/trial_balance_xlsx.py +34 -14
- odoo/addons/account_financial_report/static/description/index.html +1 -1
- odoo/addons/account_financial_report/wizard/trial_balance_wizard.py +11 -0
- odoo/addons/account_financial_report/wizard/trial_balance_wizard_view.xml +9 -2
- {odoo_addon_account_financial_report-15.0.2.13.0.dist-info → odoo_addon_account_financial_report-15.0.3.0.0.1.dist-info}/METADATA +2 -2
- {odoo_addon_account_financial_report-15.0.2.13.0.dist-info → odoo_addon_account_financial_report-15.0.3.0.0.1.dist-info}/RECORD +32 -32
- {odoo_addon_account_financial_report-15.0.2.13.0.dist-info → odoo_addon_account_financial_report-15.0.3.0.0.1.dist-info}/WHEEL +0 -0
- {odoo_addon_account_financial_report-15.0.2.13.0.dist-info → odoo_addon_account_financial_report-15.0.3.0.0.1.dist-info}/top_level.txt +0 -0
|
@@ -192,10 +192,31 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
192
192
|
total_amount[acc_id]["debit"] = tb["debit"]
|
|
193
193
|
total_amount[acc_id]["balance"] = tb["balance"]
|
|
194
194
|
total_amount[acc_id]["initial_balance"] = 0.0
|
|
195
|
+
if "__context" in tb and "group_by" in tb["__context"]:
|
|
196
|
+
group_by = tb["__context"]["group_by"][0]
|
|
197
|
+
gb_data = {}
|
|
198
|
+
tb_grouped = self.env["account.move.line"].read_group(
|
|
199
|
+
domain=tb["__domain"],
|
|
200
|
+
fields=[group_by, "debit", "credit", "balance", "amount_currency"],
|
|
201
|
+
groupby=[group_by],
|
|
202
|
+
)
|
|
203
|
+
for tb2 in tb_grouped:
|
|
204
|
+
gb_id = tb2[group_by][0] if tb2[group_by] else 0
|
|
205
|
+
gb_data[gb_id] = self._prepare_total_amount(tb2, foreign_currency)
|
|
206
|
+
gb_data[gb_id]["credit"] = tb2["credit"]
|
|
207
|
+
gb_data[gb_id]["debit"] = tb2["debit"]
|
|
208
|
+
gb_data[gb_id]["balance"] = tb2["balance"]
|
|
209
|
+
gb_data[gb_id]["initial_balance"] = 0.0
|
|
210
|
+
total_amount[acc_id]["group_by"] = group_by
|
|
211
|
+
total_amount[acc_id]["group_by_data"] = gb_data
|
|
195
212
|
for tb in tb_initial_acc:
|
|
196
213
|
acc_id = tb["account_id"]
|
|
197
214
|
if acc_id not in total_amount.keys():
|
|
198
215
|
total_amount[acc_id] = self._prepare_total_amount(tb, foreign_currency)
|
|
216
|
+
total_amount[acc_id]["group_by_data"] = {}
|
|
217
|
+
total_amount[acc_id]["group_by_data"][0] = self._prepare_total_amount(
|
|
218
|
+
tb, foreign_currency
|
|
219
|
+
)
|
|
199
220
|
else:
|
|
200
221
|
total_amount[acc_id]["initial_balance"] = tb["balance"]
|
|
201
222
|
total_amount[acc_id]["ending_balance"] += tb["balance"]
|
|
@@ -206,6 +227,28 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
206
227
|
total_amount[acc_id]["ending_currency_balance"] += round(
|
|
207
228
|
tb["amount_currency"], 2
|
|
208
229
|
)
|
|
230
|
+
if "group_by_data" in tb:
|
|
231
|
+
for gb_key in list(tb["group_by_data"]):
|
|
232
|
+
tb2 = tb["group_by_data"][gb_key]
|
|
233
|
+
if "group_by_data" in total_amount[acc_id]:
|
|
234
|
+
if gb_key not in total_amount[acc_id]["group_by_data"]:
|
|
235
|
+
total_amount[acc_id]["group_by_data"][
|
|
236
|
+
gb_key
|
|
237
|
+
] = self._prepare_total_amount(tb2, foreign_currency)
|
|
238
|
+
else:
|
|
239
|
+
total_amount[acc_id]["group_by_data"][gb_key][
|
|
240
|
+
"initial_balance"
|
|
241
|
+
] = tb2["balance"]
|
|
242
|
+
total_amount[acc_id]["group_by_data"][gb_key][
|
|
243
|
+
"ending_balance"
|
|
244
|
+
] += tb2["balance"]
|
|
245
|
+
if foreign_currency:
|
|
246
|
+
total_amount[acc_id]["group_by_data"][gb_key][
|
|
247
|
+
"initial_currency_balance"
|
|
248
|
+
] = round(tb2["amount_currency"], 2)
|
|
249
|
+
total_amount[acc_id]["group_by_data"][gb_key][
|
|
250
|
+
"ending_currency_balance"
|
|
251
|
+
] += round(tb2["amount_currency"], 2)
|
|
209
252
|
return total_amount
|
|
210
253
|
|
|
211
254
|
@api.model
|
|
@@ -308,6 +351,7 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
308
351
|
for account_id in accounts_to_remove:
|
|
309
352
|
del total_amount[account_id]
|
|
310
353
|
|
|
354
|
+
# flake8: noqa: C901
|
|
311
355
|
@api.model
|
|
312
356
|
def _get_data(
|
|
313
357
|
self,
|
|
@@ -323,6 +367,7 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
323
367
|
hide_account_at_0,
|
|
324
368
|
unaffected_earnings_account,
|
|
325
369
|
fy_start_date,
|
|
370
|
+
grouped_by,
|
|
326
371
|
):
|
|
327
372
|
accounts_domain = [("company_id", "=", company_id)]
|
|
328
373
|
if account_ids:
|
|
@@ -336,6 +381,9 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
336
381
|
tb_initial_acc.append(
|
|
337
382
|
{"account_id": account.id, "balance": 0.0, "amount_currency": 0.0}
|
|
338
383
|
)
|
|
384
|
+
groupby_fields = ["account_id"]
|
|
385
|
+
if grouped_by:
|
|
386
|
+
groupby_fields.append("analytic_account_id")
|
|
339
387
|
initial_domain_bs = self._get_initial_balances_bs_ml_domain(
|
|
340
388
|
account_ids,
|
|
341
389
|
journal_ids,
|
|
@@ -348,7 +396,7 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
348
396
|
tb_initial_acc_bs = self.env["account.move.line"].read_group(
|
|
349
397
|
domain=initial_domain_bs,
|
|
350
398
|
fields=["account_id", "balance", "amount_currency"],
|
|
351
|
-
groupby=
|
|
399
|
+
groupby=groupby_fields,
|
|
352
400
|
)
|
|
353
401
|
initial_domain_pl = self._get_initial_balances_pl_ml_domain(
|
|
354
402
|
account_ids,
|
|
@@ -363,7 +411,7 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
363
411
|
tb_initial_acc_pl = self.env["account.move.line"].read_group(
|
|
364
412
|
domain=initial_domain_pl,
|
|
365
413
|
fields=["account_id", "balance", "amount_currency"],
|
|
366
|
-
groupby=
|
|
414
|
+
groupby=groupby_fields,
|
|
367
415
|
)
|
|
368
416
|
tb_initial_acc_rg = tb_initial_acc_bs + tb_initial_acc_pl
|
|
369
417
|
for account_rg in tb_initial_acc_rg:
|
|
@@ -377,6 +425,22 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
377
425
|
if element:
|
|
378
426
|
element[0]["balance"] += account_rg["balance"]
|
|
379
427
|
element[0]["amount_currency"] += account_rg["amount_currency"]
|
|
428
|
+
if "__context" in account_rg and "group_by" in account_rg["__context"]:
|
|
429
|
+
group_by = account_rg["__context"]["group_by"][0]
|
|
430
|
+
gb_data = {}
|
|
431
|
+
account_rg_grouped = self.env["account.move.line"].read_group(
|
|
432
|
+
domain=account_rg["__domain"],
|
|
433
|
+
fields=[group_by, "balance", "amount_currency"],
|
|
434
|
+
groupby=[group_by],
|
|
435
|
+
)
|
|
436
|
+
for a_rg2 in account_rg_grouped:
|
|
437
|
+
gb_id = a_rg2[group_by][0] if a_rg2[group_by] else 0
|
|
438
|
+
gb_data[gb_id] = {
|
|
439
|
+
"balance": a_rg2["balance"],
|
|
440
|
+
"amount_currency": a_rg2["amount_currency"],
|
|
441
|
+
}
|
|
442
|
+
element[0]["group_by"] = group_by
|
|
443
|
+
element[0]["group_by_data"] = gb_data
|
|
380
444
|
if hide_account_at_0:
|
|
381
445
|
tb_initial_acc = [p for p in tb_initial_acc if p["balance"] != 0]
|
|
382
446
|
|
|
@@ -393,7 +457,7 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
393
457
|
tb_period_acc = self.env["account.move.line"].read_group(
|
|
394
458
|
domain=period_domain,
|
|
395
459
|
fields=["account_id", "debit", "credit", "balance", "amount_currency"],
|
|
396
|
-
groupby=
|
|
460
|
+
groupby=groupby_fields,
|
|
397
461
|
)
|
|
398
462
|
|
|
399
463
|
if show_partner_details:
|
|
@@ -450,8 +514,22 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
450
514
|
total_amount[unaffected_id]["debit"] = 0.0
|
|
451
515
|
total_amount[unaffected_id]["ending_balance"] = 0.0
|
|
452
516
|
if foreign_currency:
|
|
517
|
+
total_amount[unaffected_id]["amount_currency"] = 0
|
|
453
518
|
total_amount[unaffected_id]["initial_currency_balance"] = 0.0
|
|
454
519
|
total_amount[unaffected_id]["ending_currency_balance"] = 0.0
|
|
520
|
+
if grouped_by:
|
|
521
|
+
total_amount[unaffected_id]["group_by"] = grouped_by
|
|
522
|
+
total_amount[unaffected_id]["group_by_data"] = {}
|
|
523
|
+
# Fix to prevent side effects
|
|
524
|
+
if (
|
|
525
|
+
foreign_currency
|
|
526
|
+
and "amount_currency" not in total_amount[unaffected_id]
|
|
527
|
+
):
|
|
528
|
+
total_amount[unaffected_id]["amount_currency"] = 0
|
|
529
|
+
group_by_data_item = self._prepare_total_amount(
|
|
530
|
+
total_amount[unaffected_id], foreign_currency
|
|
531
|
+
)
|
|
532
|
+
total_amount[unaffected_id]["group_by_data"][0] = group_by_data_item
|
|
455
533
|
accounts_data = self._get_accounts_data(accounts_ids)
|
|
456
534
|
(
|
|
457
535
|
pl_initial_balance,
|
|
@@ -476,8 +554,88 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
476
554
|
total_amount[unaffected_id][
|
|
477
555
|
"initial_currency_balance"
|
|
478
556
|
] += pl_initial_currency_balance
|
|
557
|
+
if grouped_by:
|
|
558
|
+
total_amount[unaffected_id]["group_by_data"][0][
|
|
559
|
+
"ending_balance"
|
|
560
|
+
] = total_amount[unaffected_id]["ending_balance"]
|
|
561
|
+
total_amount[unaffected_id]["group_by_data"][0][
|
|
562
|
+
"initial_balance"
|
|
563
|
+
] = total_amount[unaffected_id]["initial_balance"]
|
|
564
|
+
if foreign_currency:
|
|
565
|
+
total_amount[unaffected_id]["group_by_data"][0][
|
|
566
|
+
"ending_currency_balance"
|
|
567
|
+
] = total_amount[unaffected_id]["ending_currency_balance"]
|
|
568
|
+
total_amount[unaffected_id]["group_by_data"][0][
|
|
569
|
+
"initial_currency_balance"
|
|
570
|
+
] = total_amount[unaffected_id]["initial_currency_balance"]
|
|
479
571
|
return total_amount, accounts_data, partners_data
|
|
480
572
|
|
|
573
|
+
def _get_data_grouped(self, total_amount, accounts_data, foreign_currency):
|
|
574
|
+
"""Get the data grouped by analytical account instead of as used
|
|
575
|
+
"without grouping".
|
|
576
|
+
"""
|
|
577
|
+
trial_balance = {}
|
|
578
|
+
total_amount_grouped = {"type": "total", "name": _("TOTAL")}
|
|
579
|
+
f_names = [
|
|
580
|
+
"credit",
|
|
581
|
+
"debit",
|
|
582
|
+
"balance",
|
|
583
|
+
"initial_balance",
|
|
584
|
+
"ending_balance",
|
|
585
|
+
"initial_currency_balance",
|
|
586
|
+
"ending_currency_balance",
|
|
587
|
+
]
|
|
588
|
+
for f_name in f_names:
|
|
589
|
+
total_amount_grouped[f_name] = 0
|
|
590
|
+
for a_id in list(total_amount.keys()):
|
|
591
|
+
for key in list(total_amount[a_id]["group_by_data"].keys()):
|
|
592
|
+
total_amount_item2 = total_amount[a_id]["group_by_data"][key]
|
|
593
|
+
if key not in trial_balance:
|
|
594
|
+
trial_balance[key] = {}
|
|
595
|
+
for f_name in f_names:
|
|
596
|
+
if f_name in total_amount_item2:
|
|
597
|
+
trial_balance[key][f_name] = 0
|
|
598
|
+
trial_balance[key]["account_data"] = {}
|
|
599
|
+
for f_name in f_names:
|
|
600
|
+
if f_name in total_amount_item2:
|
|
601
|
+
trial_balance[key][f_name] += total_amount_item2[f_name]
|
|
602
|
+
# Prepare data_item
|
|
603
|
+
data_item = total_amount_item2
|
|
604
|
+
data_item["type"] = "account_type"
|
|
605
|
+
data_item["id"] = a_id
|
|
606
|
+
data_item["name"] = accounts_data[a_id]["name"]
|
|
607
|
+
data_item["code"] = accounts_data[a_id]["code"]
|
|
608
|
+
if foreign_currency:
|
|
609
|
+
data_item["currency_id"] = accounts_data[a_id]["currency_id"]
|
|
610
|
+
data_item["currency_name"] = accounts_data[a_id]["currency_name"]
|
|
611
|
+
trial_balance[key]["account_data"][a_id] = data_item
|
|
612
|
+
analytic_account_ids = list(trial_balance.keys())
|
|
613
|
+
aa_data = {}
|
|
614
|
+
aaa_model = self.env["account.analytic.account"].with_context(active_test=False)
|
|
615
|
+
analytic_accounts = aaa_model.search_read(
|
|
616
|
+
domain=[("id", "in", analytic_account_ids)],
|
|
617
|
+
fields=["display_name"],
|
|
618
|
+
)
|
|
619
|
+
for aa in analytic_accounts:
|
|
620
|
+
aa_data[aa["id"]] = aa
|
|
621
|
+
for aa_id in analytic_account_ids:
|
|
622
|
+
trial_balance[aa_id]["id"] = aa_id
|
|
623
|
+
trial_balance[aa_id]["type"] = "analytic_account_type"
|
|
624
|
+
trial_balance[aa_id]["name"] = (
|
|
625
|
+
aa_data[aa_id]["display_name"]
|
|
626
|
+
if aa_id in aa_data
|
|
627
|
+
else _("Without analytic account")
|
|
628
|
+
)
|
|
629
|
+
account_data_item = list(trial_balance[aa_id]["account_data"].values())
|
|
630
|
+
account_data_item = sorted(account_data_item, key=lambda k: k["code"])
|
|
631
|
+
trial_balance[aa_id]["account_data"] = account_data_item
|
|
632
|
+
for f_name in f_names:
|
|
633
|
+
if f_name in trial_balance[aa_id]:
|
|
634
|
+
total_amount_grouped[f_name] += trial_balance[aa_id][f_name]
|
|
635
|
+
trial_balance = list(trial_balance.values())
|
|
636
|
+
trial_balance = sorted(trial_balance, key=lambda k: k["name"])
|
|
637
|
+
return trial_balance, total_amount_grouped
|
|
638
|
+
|
|
481
639
|
def _get_hierarchy_groups(self, group_ids, groups_data, foreign_currency):
|
|
482
640
|
for group_id in group_ids:
|
|
483
641
|
parent_id = groups_data[group_id]["parent_id"]
|
|
@@ -650,6 +808,7 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
650
808
|
only_posted_moves = data["only_posted_moves"]
|
|
651
809
|
unaffected_earnings_account = data["unaffected_earnings_account"]
|
|
652
810
|
fy_start_date = data["fy_start_date"]
|
|
811
|
+
grouped_by = data["grouped_by"]
|
|
653
812
|
total_amount, accounts_data, partners_data = self._get_data(
|
|
654
813
|
account_ids,
|
|
655
814
|
journal_ids,
|
|
@@ -663,7 +822,14 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
663
822
|
hide_account_at_0,
|
|
664
823
|
unaffected_earnings_account,
|
|
665
824
|
fy_start_date,
|
|
825
|
+
grouped_by,
|
|
666
826
|
)
|
|
827
|
+
trial_balance_grouped = False
|
|
828
|
+
total_amount_grouped = False
|
|
829
|
+
if grouped_by:
|
|
830
|
+
trial_balance_grouped, total_amount_grouped = self._get_data_grouped(
|
|
831
|
+
total_amount, accounts_data, foreign_currency
|
|
832
|
+
)
|
|
667
833
|
trial_balance = []
|
|
668
834
|
if not show_partner_details:
|
|
669
835
|
for account_id in accounts_data.keys():
|
|
@@ -674,6 +840,16 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
674
840
|
"debit": total_amount[account_id]["debit"],
|
|
675
841
|
"balance": total_amount[account_id]["balance"],
|
|
676
842
|
"ending_balance": total_amount[account_id]["ending_balance"],
|
|
843
|
+
"group_by": (
|
|
844
|
+
total_amount[account_id]["group_by"]
|
|
845
|
+
if "group_by" in total_amount[account_id]
|
|
846
|
+
else False
|
|
847
|
+
),
|
|
848
|
+
"group_by_data": (
|
|
849
|
+
total_amount[account_id]["group_by_data"]
|
|
850
|
+
if "group_by_data" in total_amount[account_id]
|
|
851
|
+
else False
|
|
852
|
+
),
|
|
677
853
|
"type": "account_type",
|
|
678
854
|
}
|
|
679
855
|
)
|
|
@@ -727,8 +903,11 @@ class TrialBalanceReport(models.AbstractModel):
|
|
|
727
903
|
"show_hierarchy": show_hierarchy,
|
|
728
904
|
"hide_parent_hierarchy_level": data["hide_parent_hierarchy_level"],
|
|
729
905
|
"trial_balance": trial_balance,
|
|
906
|
+
"trial_balance_grouped": trial_balance_grouped,
|
|
730
907
|
"total_amount": total_amount,
|
|
908
|
+
"total_amount_grouped": total_amount_grouped,
|
|
731
909
|
"accounts_data": accounts_data,
|
|
732
910
|
"partners_data": partners_data,
|
|
733
911
|
"show_hierarchy_level": show_hierarchy_level,
|
|
912
|
+
"grouped_by": grouped_by,
|
|
734
913
|
}
|
|
@@ -166,7 +166,9 @@ class TrialBalanceXslx(models.AbstractModel):
|
|
|
166
166
|
"report.account_financial_report.trial_balance"
|
|
167
167
|
]._get_report_values(report, data)
|
|
168
168
|
trial_balance = res_data["trial_balance"]
|
|
169
|
+
trial_balance_grouped = res_data["trial_balance_grouped"]
|
|
169
170
|
total_amount = res_data["total_amount"]
|
|
171
|
+
total_amount_grouped = res_data["total_amount_grouped"]
|
|
170
172
|
partners_data = res_data["partners_data"]
|
|
171
173
|
accounts_data = res_data["accounts_data"]
|
|
172
174
|
show_hierarchy = res_data["show_hierarchy"]
|
|
@@ -175,22 +177,40 @@ class TrialBalanceXslx(models.AbstractModel):
|
|
|
175
177
|
foreign_currency = res_data["foreign_currency"]
|
|
176
178
|
limit_hierarchy_level = res_data["limit_hierarchy_level"]
|
|
177
179
|
hide_parent_hierarchy_level = res_data["hide_parent_hierarchy_level"]
|
|
180
|
+
grouped_by = res_data["grouped_by"]
|
|
178
181
|
if not show_partner_details:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
182
|
+
if grouped_by:
|
|
183
|
+
# For each grouped
|
|
184
|
+
for grouped_item in trial_balance_grouped:
|
|
185
|
+
self.write_array_title(grouped_item["name"], report_data)
|
|
186
|
+
# Display array header for account lines
|
|
187
|
+
self.write_array_header(report_data)
|
|
188
|
+
# For each account
|
|
189
|
+
for balance in grouped_item["account_data"]:
|
|
190
|
+
self.write_line_from_dict(balance, report_data)
|
|
191
|
+
# Footer with totals
|
|
192
|
+
grouped_item["code"] = ""
|
|
193
|
+
grouped_item["currency_id"] = False
|
|
194
|
+
self.write_account_footer(grouped_item, _("Total"), report_data)
|
|
195
|
+
report_data["row_pos"] += 1
|
|
196
|
+
# Last line with totals
|
|
197
|
+
total_amount_grouped["currency_id"] = False
|
|
198
|
+
total_amount_grouped["code"] = ""
|
|
199
|
+
self.write_account_footer(total_amount_grouped, _("TOTAL"), report_data)
|
|
200
|
+
else:
|
|
201
|
+
# Display array header for account lines
|
|
202
|
+
self.write_array_header(report_data)
|
|
203
|
+
# For each account
|
|
204
|
+
for balance in trial_balance:
|
|
205
|
+
if show_hierarchy and limit_hierarchy_level:
|
|
206
|
+
if show_hierarchy_level > balance["level"] and (
|
|
207
|
+
not hide_parent_hierarchy_level
|
|
208
|
+
or (show_hierarchy_level - 1) == balance["level"]
|
|
209
|
+
):
|
|
210
|
+
# Display account lines
|
|
211
|
+
self.write_line_from_dict(balance, report_data)
|
|
212
|
+
else:
|
|
191
213
|
self.write_line_from_dict(balance, report_data)
|
|
192
|
-
else:
|
|
193
|
-
self.write_line_from_dict(balance, report_data)
|
|
194
214
|
else:
|
|
195
215
|
for account_id in total_amount:
|
|
196
216
|
# Write account title
|
|
@@ -367,7 +367,7 @@ ul.auto-toc {
|
|
|
367
367
|
!! This file is generated by oca-gen-addon-readme !!
|
|
368
368
|
!! changes will be overwritten. !!
|
|
369
369
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
370
|
-
!! source digest: sha256:
|
|
370
|
+
!! source digest: sha256:7a729cad2177a2d79dea23692b620f65ca49b3f28348bb0f191cd074fdb4bf41
|
|
371
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
372
|
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-reporting/tree/15.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-15-0/account-financial-reporting-15-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=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
373
373
|
<p>This module adds a set of financial reports. They are accessible under
|
|
@@ -67,6 +67,15 @@ class TrialBalanceReportWizard(models.TransientModel):
|
|
|
67
67
|
comodel_name="account.account",
|
|
68
68
|
help="Ending account in a range",
|
|
69
69
|
)
|
|
70
|
+
grouped_by = fields.Selection(
|
|
71
|
+
selection=[("analytic_account", "Analytic Account")], default=False
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
@api.onchange("grouped_by")
|
|
75
|
+
def onchange_grouped_by(self):
|
|
76
|
+
if self.grouped_by == "analytic_account":
|
|
77
|
+
self.show_partner_details = False
|
|
78
|
+
self.show_hierarchy = False
|
|
70
79
|
|
|
71
80
|
@api.onchange("account_code_from", "account_code_to")
|
|
72
81
|
def on_change_account_range(self):
|
|
@@ -201,6 +210,7 @@ class TrialBalanceReportWizard(models.TransientModel):
|
|
|
201
210
|
"""Handle partners change."""
|
|
202
211
|
if self.show_partner_details:
|
|
203
212
|
self.receivable_accounts_only = self.payable_accounts_only = True
|
|
213
|
+
self.grouped_by = False
|
|
204
214
|
else:
|
|
205
215
|
self.receivable_accounts_only = self.payable_accounts_only = False
|
|
206
216
|
|
|
@@ -258,6 +268,7 @@ class TrialBalanceReportWizard(models.TransientModel):
|
|
|
258
268
|
"show_partner_details": self.show_partner_details,
|
|
259
269
|
"unaffected_earnings_account": self.unaffected_earnings_account.id,
|
|
260
270
|
"account_financial_report_lang": self.env.lang,
|
|
271
|
+
"grouped_by": self.grouped_by,
|
|
261
272
|
}
|
|
262
273
|
|
|
263
274
|
def _export(self, report_type):
|
|
@@ -25,11 +25,18 @@
|
|
|
25
25
|
</group>
|
|
26
26
|
<group name="other_filters">
|
|
27
27
|
<field name="target_move" widget="radio" />
|
|
28
|
+
<field
|
|
29
|
+
name="grouped_by"
|
|
30
|
+
groups="analytic.group_analytic_accounting"
|
|
31
|
+
/>
|
|
28
32
|
<field name="hide_account_at_0" />
|
|
29
|
-
<field
|
|
33
|
+
<field
|
|
34
|
+
name="show_partner_details"
|
|
35
|
+
attrs="{'invisible':[('grouped_by','!=',False)]}"
|
|
36
|
+
/>
|
|
30
37
|
<field
|
|
31
38
|
name="show_hierarchy"
|
|
32
|
-
attrs="{'invisible':[('show_partner_details','=',True)]}"
|
|
39
|
+
attrs="{'invisible':['|', ('show_partner_details','=',True),('grouped_by','!=',False)]}"
|
|
33
40
|
/>
|
|
34
41
|
<field
|
|
35
42
|
name="limit_hierarchy_level"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-account_financial_report
|
|
3
|
-
Version: 15.0.
|
|
3
|
+
Version: 15.0.3.0.0.1
|
|
4
4
|
Summary: OCA Financial Reports
|
|
5
5
|
Home-page: https://github.com/OCA/account-financial-reporting
|
|
6
6
|
Author: Camptocamp,initOS GmbH,redCOR AG,ForgeFlow,Odoo Community Association (OCA)
|
|
@@ -24,7 +24,7 @@ Account Financial Reports
|
|
|
24
24
|
!! This file is generated by oca-gen-addon-readme !!
|
|
25
25
|
!! changes will be overwritten. !!
|
|
26
26
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
|
-
!! source digest: sha256:
|
|
27
|
+
!! source digest: sha256:7a729cad2177a2d79dea23692b620f65ca49b3f28348bb0f191cd074fdb4bf41
|
|
28
28
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
29
29
|
|
|
30
30
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
odoo/addons/account_financial_report/README.rst,sha256=
|
|
1
|
+
odoo/addons/account_financial_report/README.rst,sha256=a-YYNhmZ_7H1t7XgluNtLlch7SVLImSe0eDPv5maRyE,6889
|
|
2
2
|
odoo/addons/account_financial_report/__init__.py,sha256=YoL8hk5QxSifbFJL7gPzpOSk-3zB1OSHJBXyZK25G6Q,187
|
|
3
|
-
odoo/addons/account_financial_report/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/account_financial_report/__manifest__.py,sha256=G05L8B5x61L7mQ_4Ld95CKR0C_m4a2Paniq4TETkEbk,2307
|
|
4
4
|
odoo/addons/account_financial_report/menuitems.xml,sha256=k20N6cNRlDsnPhc378MVs7jwzJhbbJQ2k-P3WdsmF_M,1206
|
|
5
5
|
odoo/addons/account_financial_report/reports.xml,sha256=c2KamS250rNzHUInjNwC0G2dhwiIqtYgbked51PtmVw,9254
|
|
6
|
-
odoo/addons/account_financial_report/i18n/account_financial_report.pot,sha256=
|
|
7
|
-
odoo/addons/account_financial_report/i18n/ar.po,sha256=
|
|
8
|
-
odoo/addons/account_financial_report/i18n/ca.po,sha256=
|
|
9
|
-
odoo/addons/account_financial_report/i18n/da.po,sha256=
|
|
10
|
-
odoo/addons/account_financial_report/i18n/de.po,sha256=
|
|
11
|
-
odoo/addons/account_financial_report/i18n/es.po,sha256=
|
|
12
|
-
odoo/addons/account_financial_report/i18n/es_AR.po,sha256=
|
|
13
|
-
odoo/addons/account_financial_report/i18n/es_MX.po,sha256=
|
|
14
|
-
odoo/addons/account_financial_report/i18n/fr.po,sha256=
|
|
15
|
-
odoo/addons/account_financial_report/i18n/fr_CH.po,sha256=
|
|
16
|
-
odoo/addons/account_financial_report/i18n/fr_FR.po,sha256=
|
|
17
|
-
odoo/addons/account_financial_report/i18n/hr.po,sha256=
|
|
18
|
-
odoo/addons/account_financial_report/i18n/hr_HR.po,sha256=
|
|
19
|
-
odoo/addons/account_financial_report/i18n/it.po,sha256=
|
|
20
|
-
odoo/addons/account_financial_report/i18n/ja.po,sha256=
|
|
21
|
-
odoo/addons/account_financial_report/i18n/nl.po,sha256=
|
|
22
|
-
odoo/addons/account_financial_report/i18n/nl_NL.po,sha256=
|
|
23
|
-
odoo/addons/account_financial_report/i18n/pt.po,sha256=
|
|
24
|
-
odoo/addons/account_financial_report/i18n/pt_BR.po,sha256=
|
|
25
|
-
odoo/addons/account_financial_report/i18n/ro.po,sha256=
|
|
6
|
+
odoo/addons/account_financial_report/i18n/account_financial_report.pot,sha256=ypCilq5ysJuqD-s7BUd2sop_UtJTD86WVpSGdUobVYI,85393
|
|
7
|
+
odoo/addons/account_financial_report/i18n/ar.po,sha256=bihZISzHhgELfeIHhrekJttgJsTq-D-3T0YAXMoxWzQ,93182
|
|
8
|
+
odoo/addons/account_financial_report/i18n/ca.po,sha256=V1jky-Xj_Ju1xCS2JDSFO5rndKz43jWPY6tiyM6wYGI,90022
|
|
9
|
+
odoo/addons/account_financial_report/i18n/da.po,sha256=qaMeKCi-_c7hUjsYHSm3vf-DbrhP5njy-n2waDNLGmI,89254
|
|
10
|
+
odoo/addons/account_financial_report/i18n/de.po,sha256=28V7Da_9dB0UOyh-e_e-Hkvw5N-9WxkJ6VHu0fhgzj4,95814
|
|
11
|
+
odoo/addons/account_financial_report/i18n/es.po,sha256=78qYu91LYmVJTIY8s--krVQOzlfdzU1Jjy-h6xqvaaw,90959
|
|
12
|
+
odoo/addons/account_financial_report/i18n/es_AR.po,sha256=t-bs7ro-6J3V1emyLxyni8BiW4KugsJ0LO2NJWgjaxg,93657
|
|
13
|
+
odoo/addons/account_financial_report/i18n/es_MX.po,sha256=y6KQlGhDae0jnC1EK9SOzwcz3pI6w0hv7lmICWKzrbk,83791
|
|
14
|
+
odoo/addons/account_financial_report/i18n/fr.po,sha256=n4FUDKoWpAm0xhn4aMD2iyQD7-cfL8SLMgIcmC50i6A,96567
|
|
15
|
+
odoo/addons/account_financial_report/i18n/fr_CH.po,sha256=mQRn7YWQvrmyk6TpkYUA_eFmdOJhU34p1OP6oW1LwBA,95345
|
|
16
|
+
odoo/addons/account_financial_report/i18n/fr_FR.po,sha256=imD7-iwFXnx06ZbM2pYfIY-khk0mX_L8EIrsV1X3L60,90433
|
|
17
|
+
odoo/addons/account_financial_report/i18n/hr.po,sha256=lDfO8Rg6B-FPHDd1bZTf9B_5poxb3vWJxBYmToI0rsg,83880
|
|
18
|
+
odoo/addons/account_financial_report/i18n/hr_HR.po,sha256=tXNzaXYBOkrdMfkJLQelZWX7W0wpwgCoQkZ4FDAejA8,84641
|
|
19
|
+
odoo/addons/account_financial_report/i18n/it.po,sha256=SBVLxTlDvgc0yEW9GFJalYtPrtBqH30fwvyLEyuV920,91048
|
|
20
|
+
odoo/addons/account_financial_report/i18n/ja.po,sha256=fgTm4sI1be0tgkeYmDIl8FA2hoO5qZczfIZhPZ5SFlE,84402
|
|
21
|
+
odoo/addons/account_financial_report/i18n/nl.po,sha256=q5AugkgeO2UGW1fyIvRUPuqWj0sfCN5UJb0Hx2G4vp8,95437
|
|
22
|
+
odoo/addons/account_financial_report/i18n/nl_NL.po,sha256=ogD44RfLbhBbKp3pOSjRep_A7OXwtpRB8zd4xIkVZUY,84307
|
|
23
|
+
odoo/addons/account_financial_report/i18n/pt.po,sha256=GDf6y61DfBiy9_cS2i9iVUNkyxCaj23t1vjOdDL-TZA,90952
|
|
24
|
+
odoo/addons/account_financial_report/i18n/pt_BR.po,sha256=VKTfrqiVB0G3WdtDORHrAW9dQJm-oq-B140fAPEDhm4,98901
|
|
25
|
+
odoo/addons/account_financial_report/i18n/ro.po,sha256=vTzehKFDPpOSz3_Aqw_Qgc8xXhl7d5v8dRuOwA9Bl4U,91835
|
|
26
26
|
odoo/addons/account_financial_report/models/__init__.py,sha256=KCE4mRzM1HSu4Mjg3thvCgBOaEyw5w8VHB--Du-wXyE,195
|
|
27
27
|
odoo/addons/account_financial_report/models/account.py,sha256=wqzI7oZ9H5XsJM6Ngo3WewQ7lExyX-fuKNzSljpj644,422
|
|
28
28
|
odoo/addons/account_financial_report/models/account_age_report_configuration.py,sha256=U5Xr0uAD696TohTCkKsY3HZDYAfVrlocTIGYzr2JlkA,1664
|
|
@@ -46,8 +46,8 @@ odoo/addons/account_financial_report/report/journal_ledger.py,sha256=j83-QCAONs7
|
|
|
46
46
|
odoo/addons/account_financial_report/report/journal_ledger_xlsx.py,sha256=Pp7iDkBjSk0BqZkSPAiKI2hBHNcjKYjZoBxuL_ENz5E,10126
|
|
47
47
|
odoo/addons/account_financial_report/report/open_items.py,sha256=7iIrnkCLuH17Lx0I98Nvt0KfYpcyhVcNRSJMr9i_PS8,13788
|
|
48
48
|
odoo/addons/account_financial_report/report/open_items_xlsx.py,sha256=a4HMQ97VkwTO_8tnxyzFIIlLkawaG1HBXnujgYUI_Ug,15119
|
|
49
|
-
odoo/addons/account_financial_report/report/trial_balance.py,sha256=
|
|
50
|
-
odoo/addons/account_financial_report/report/trial_balance_xlsx.py,sha256=
|
|
49
|
+
odoo/addons/account_financial_report/report/trial_balance.py,sha256=TNfnjUD0TLXmDvcj6cUHDK60EfOdtLj4PAh9zh346tg,40093
|
|
50
|
+
odoo/addons/account_financial_report/report/trial_balance_xlsx.py,sha256=iGn0bVz63eMNL6Xdnjk8r4JdZrX2ojnEm9E0BaOcDoY,13278
|
|
51
51
|
odoo/addons/account_financial_report/report/vat_report.py,sha256=mRr8zk3sTVvz7CFHQAzDL4Eexqzt7X6JVOEPD2axumM,10163
|
|
52
52
|
odoo/addons/account_financial_report/report/vat_report_xlsx.py,sha256=aa0dLzYdywjmO63ONRYUBTpSGmsPfEjX60CkUbULuo8,2317
|
|
53
53
|
odoo/addons/account_financial_report/report/templates/aged_partner_balance.xml,sha256=WNaWvMoBR74v6SGj13Tp6Eydxd-zk93Yf3x0dnRIj28,43416
|
|
@@ -55,12 +55,12 @@ odoo/addons/account_financial_report/report/templates/general_ledger.xml,sha256=
|
|
|
55
55
|
odoo/addons/account_financial_report/report/templates/journal_ledger.xml,sha256=qPupJ-t85k2_H-o12pwOyvpYCpROBkVpSsGaib3mGkI,21619
|
|
56
56
|
odoo/addons/account_financial_report/report/templates/layouts.xml,sha256=gCejPAn8GLrySSve8pGcs0fY5nr48C3mmyuoEJVZkJ4,1526
|
|
57
57
|
odoo/addons/account_financial_report/report/templates/open_items.xml,sha256=OxyVnVzPa0UKGNuV2uqgWh7RxMwsWu8OzQbcIV0iDaE,22821
|
|
58
|
-
odoo/addons/account_financial_report/report/templates/trial_balance.xml,sha256=
|
|
58
|
+
odoo/addons/account_financial_report/report/templates/trial_balance.xml,sha256=u4MvCt5y7uCMCJajpm81miLD6e22w7sSBVIiC6xU86o,52685
|
|
59
59
|
odoo/addons/account_financial_report/report/templates/vat_report.xml,sha256=F5hQzdM8NTuLW04mT6SMjbdush5r7C81_RXa7NByfAY,8128
|
|
60
60
|
odoo/addons/account_financial_report/security/ir.model.access.csv,sha256=S1VQLLwLeaOeAMYGqtoOqHUaZVrvDUVE4Z-0-SRjSGQ,1134
|
|
61
61
|
odoo/addons/account_financial_report/security/security.xml,sha256=gpNJnzruXfeYskn26FqY9U04FiuTf8vgLCKEGY8PADM,422
|
|
62
62
|
odoo/addons/account_financial_report/static/description/icon.png,sha256=WW-eOIjW5-jo7tgBieNv6K2DUKMoHFSVctnp0htstHI,15230
|
|
63
|
-
odoo/addons/account_financial_report/static/description/index.html,sha256=
|
|
63
|
+
odoo/addons/account_financial_report/static/description/index.html,sha256=vnhIUbULmQnNjLhbBYoCjpvvyTuKJQa6t5Z9kmXglsI,19748
|
|
64
64
|
odoo/addons/account_financial_report/static/src/css/report.css,sha256=y0CysZUK3afkYSHgBaMi_qmh8da3XXEZwJDjRBg6HqQ,2335
|
|
65
65
|
odoo/addons/account_financial_report/static/src/css/report_html.css,sha256=I1kX1RsThtjGNLOaNJEWCvMnB9iAFW6nGkcyFYZzJoA,135
|
|
66
66
|
odoo/addons/account_financial_report/static/src/js/action_manager_report.js,sha256=g8aZkSRMgNcFzQ4f_3mmeKl7oNnoap_cDUxuyGxMT4M,1608
|
|
@@ -94,11 +94,11 @@ odoo/addons/account_financial_report/wizard/journal_ledger_wizard.py,sha256=CA44
|
|
|
94
94
|
odoo/addons/account_financial_report/wizard/journal_ledger_wizard_view.xml,sha256=s3go3x-VSCcr1xNAE3Lzj1FnymyS76hxzazuWtNc91k,2957
|
|
95
95
|
odoo/addons/account_financial_report/wizard/open_items_wizard.py,sha256=JUOLiUNl6jyGDQACf70hqsBykN5Bax8pGSOTQk2beu8,8247
|
|
96
96
|
odoo/addons/account_financial_report/wizard/open_items_wizard_view.xml,sha256=B6AEXvVHm02J5Dz75SirpdszyqdPDtpB_7AvSW2X7nE,5226
|
|
97
|
-
odoo/addons/account_financial_report/wizard/trial_balance_wizard.py,sha256=
|
|
98
|
-
odoo/addons/account_financial_report/wizard/trial_balance_wizard_view.xml,sha256=
|
|
97
|
+
odoo/addons/account_financial_report/wizard/trial_balance_wizard.py,sha256=rq4knziPEVaMM2Jl0jXB1q_Zt4HKzTmZ2jeWVAewEEE,11052
|
|
98
|
+
odoo/addons/account_financial_report/wizard/trial_balance_wizard_view.xml,sha256=kzsselPX_jYDWQEbDSXIS5K2vKuyzjTZMdinH0976c0,7413
|
|
99
99
|
odoo/addons/account_financial_report/wizard/vat_report_wizard.py,sha256=pJATDNWLcEWvctby5e5yvv4Kz7YDfCTi7YZP7slA8a4,3424
|
|
100
100
|
odoo/addons/account_financial_report/wizard/vat_report_wizard_view.xml,sha256=T3P81O4csDGP7Jmf7eAtmbIIldja3IoXbBmweMMt8vA,2330
|
|
101
|
-
odoo_addon_account_financial_report-15.0.
|
|
102
|
-
odoo_addon_account_financial_report-15.0.
|
|
103
|
-
odoo_addon_account_financial_report-15.0.
|
|
104
|
-
odoo_addon_account_financial_report-15.0.
|
|
101
|
+
odoo_addon_account_financial_report-15.0.3.0.0.1.dist-info/METADATA,sha256=uD3uCSE-Na9AP0qJlap5TeXjg5oVX4yLpzXrF6AbCsk,7567
|
|
102
|
+
odoo_addon_account_financial_report-15.0.3.0.0.1.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
|
103
|
+
odoo_addon_account_financial_report-15.0.3.0.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
104
|
+
odoo_addon_account_financial_report-15.0.3.0.0.1.dist-info/RECORD,,
|
|
File without changes
|