Skip to content

Commit 0073e67

Browse files
committed
[IMP] account_financial_report: Add grouping by analytical account in Trial balance
TT48969
1 parent 41a0bcd commit 0073e67

7 files changed

Lines changed: 340 additions & 99 deletions

File tree

account_financial_report/i18n/account_financial_report.pot

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Odoo Server 15.0\n"
88
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2024-05-02 15:21+0000\n"
10+
"PO-Revision-Date: 2024-05-02 15:21+0000\n"
911
"Last-Translator: \n"
1012
"Language-Team: \n"
1113
"MIME-Version: 1.0\n"
@@ -43,6 +45,11 @@ msgstr ""
4345
msgid "91 - 120 d."
4446
msgstr ""
4547

48+
#. module: account_financial_report
49+
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_trial_balance_base
50+
msgid "<b>TOTAL</b>"
51+
msgstr ""
52+
4653
#. module: account_financial_report
4754
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_all_taxes
4855
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_taxes
@@ -322,6 +329,7 @@ msgstr ""
322329

323330
#. module: account_financial_report
324331
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
332+
#: model:ir.model.fields.selection,name:account_financial_report.selection__trial_balance_report_wizard__grouped_by__analytic_account
325333
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
326334
#, python-format
327335
msgid "Analytic Account"
@@ -902,6 +910,7 @@ msgstr ""
902910

903911
#. module: account_financial_report
904912
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__grouped_by
913+
#: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard__grouped_by
905914
msgid "Grouped By"
906915
msgstr ""
907916

@@ -1213,6 +1222,7 @@ msgstr ""
12131222

12141223
#. module: account_financial_report
12151224
#: model:ir.model.fields.selection,name:account_financial_report.selection__general_ledger_report_wizard__grouped_by__
1225+
#: model:ir.model.fields.selection,name:account_financial_report.selection__trial_balance_report_wizard__grouped_by__
12161226
msgid "None"
12171227
msgstr ""
12181228

@@ -1543,6 +1553,12 @@ msgstr ""
15431553
msgid "Starting account in a range"
15441554
msgstr ""
15451555

1556+
#. module: account_financial_report
1557+
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
1558+
#, python-format
1559+
msgid "TOTAL"
1560+
msgstr ""
1561+
15461562
#. module: account_financial_report
15471563
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
15481564
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines

account_financial_report/i18n/es.po

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Odoo Server 12.0+e\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2022-09-21 15:05+0000\n"
10-
"PO-Revision-Date: 2024-04-17 18:37+0000\n"
9+
"POT-Creation-Date: 2024-05-02 15:21+0000\n"
10+
"PO-Revision-Date: 2024-05-02 17:22+0200\n"
1111
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
1212
"Language-Team: \n"
1313
"Language: es\n"
1414
"MIME-Version: 1.0\n"
1515
"Content-Type: text/plain; charset=UTF-8\n"
1616
"Content-Transfer-Encoding: 8bit\n"
1717
"Plural-Forms: nplurals=2; plural=n != 1;\n"
18-
"X-Generator: Weblate 4.17\n"
18+
"X-Generator: Poedit 3.0.1\n"
1919

2020
#. module: account_financial_report
2121
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_lines_header
@@ -47,6 +47,11 @@ msgstr "61 - 90 d."
4747
msgid "91 - 120 d."
4848
msgstr "91 - 120 d."
4949

50+
#. module: account_financial_report
51+
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_trial_balance_base
52+
msgid "<b>TOTAL</b>"
53+
msgstr "<b>TOTAL</b>"
54+
5055
#. module: account_financial_report
5156
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_all_taxes
5257
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_taxes
@@ -330,6 +335,7 @@ msgstr "Importe moneda."
330335

331336
#. module: account_financial_report
332337
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
338+
#: model:ir.model.fields.selection,name:account_financial_report.selection__trial_balance_report_wizard__grouped_by__analytic_account
333339
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
334340
#, python-format
335341
msgid "Analytic Account"
@@ -917,6 +923,7 @@ msgstr "Agrupar por"
917923

918924
#. module: account_financial_report
919925
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__grouped_by
926+
#: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard__grouped_by
920927
msgid "Grouped By"
921928
msgstr "Agrupado por"
922929

@@ -1233,6 +1240,7 @@ msgstr "Sin límite"
12331240

12341241
#. module: account_financial_report
12351242
#: model:ir.model.fields.selection,name:account_financial_report.selection__general_ledger_report_wizard__grouped_by__
1243+
#: model:ir.model.fields.selection,name:account_financial_report.selection__trial_balance_report_wizard__grouped_by__
12361244
msgid "None"
12371245
msgstr "Ninguna"
12381246

@@ -1564,6 +1572,12 @@ msgstr "Fecha de inicio"
15641572
msgid "Starting account in a range"
15651573
msgstr "Cuenta inicial en un rango"
15661574

1575+
#. module: account_financial_report
1576+
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
1577+
#, python-format
1578+
msgid "TOTAL"
1579+
msgstr "TOTAL"
1580+
15671581
#. module: account_financial_report
15681582
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
15691583
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
@@ -1924,27 +1938,3 @@ msgstr "ancho: 38.92%;"
19241938
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header
19251939
msgid "width: 8.11%;"
19261940
msgstr "ancho: 8.11%;"
1927-
1928-
#~ msgid ""
1929-
#~ "Age ≤ 30\n"
1930-
#~ " d."
1931-
#~ msgstr ""
1932-
#~ "Tiempo ≤ 30\n"
1933-
#~ " d."
1934-
1935-
#~ msgid ""
1936-
#~ "Age ≤ 60\n"
1937-
#~ " d."
1938-
#~ msgstr ""
1939-
#~ "Tiempo ≤ 60\n"
1940-
#~ " d."
1941-
1942-
#~ msgid ""
1943-
#~ "Age ≤ 90\n"
1944-
#~ " d."
1945-
#~ msgstr ""
1946-
#~ "Tiempo ≤ 90\n"
1947-
#~ " d."
1948-
1949-
#~ msgid "Companies"
1950-
#~ msgstr "Compañías"

account_financial_report/report/templates/trial_balance.xml

Lines changed: 111 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,42 +37,125 @@
3737
<div class="act_as_table list_table" style="margin-top: 10px;" />
3838
<!-- Display account lines -->
3939
<t t-if="not show_partner_details">
40-
<div class="act_as_table data_table" style="width: 100%;">
41-
<!-- Display account header -->
42-
<t
43-
t-call="account_financial_report.report_trial_balance_lines_header"
44-
/>
45-
<!-- Display each lines -->
46-
<t t-foreach="trial_balance" t-as="balance">
47-
<!-- Adapt -->
48-
<t t-set="style" t-value="'font-size:12px;'" />
49-
<!-- Different style for account group -->
50-
<t t-if="show_hierarchy">
51-
<t
52-
t-if="balance['type'] == 'group_type'"
40+
<t t-if="grouped_by">
41+
<t t-foreach="trial_balance_grouped" t-as="trial_balance_item">
42+
<!-- Display table headers for lines -->
43+
<h5 t-esc="trial_balance_item['name']" />
44+
<div class="act_as_table data_table" style="width: 100%;">
45+
<!-- Display account header -->
46+
<t
47+
t-call="account_financial_report.report_trial_balance_lines_header"
48+
/>
49+
<!-- Display each lines -->
50+
<t
51+
t-foreach="trial_balance_item['trial_balance']"
52+
t-as="balance"
5353
>
54+
<!-- Adapt -->
55+
<t t-set="style" t-value="'font-size:12px;'" />
56+
<!-- Different style for account group -->
57+
<t t-if="show_hierarchy">
58+
<t
59+
t-if="balance['type'] == 'group_type'"
60+
>
61+
<t
62+
t-set="style"
63+
t-value="style + 'font-weight: bold; color: blue;'"
64+
/>
65+
</t>
66+
</t>
67+
<t t-if="show_hierarchy and limit_hierarchy_level">
68+
<t
69+
t-if="show_hierarchy_level > balance['level'] and (not hide_parent_hierarchy_level or (show_hierarchy_level - 1) == balance['level'])"
70+
>
71+
<t
72+
t-call="account_financial_report.report_trial_balance_line"
73+
/>
74+
</t>
75+
</t>
76+
<t t-else="">
77+
<t
78+
t-call="account_financial_report.report_trial_balance_line"
79+
/>
80+
</t>
81+
</t>
82+
<!-- Total -->
83+
<div class="act_as_row lines">
84+
<div class="act_as_cell left" />
85+
<div class="act_as_cell left"><b>TOTAL</b></div>
86+
<div class="act_as_cell amount" t-att-style="style">
87+
<span
88+
t-out="trial_balance_item['initial_balance']"
89+
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
90+
/>
91+
</div>
92+
<div class="act_as_cell amount" t-att-style="style">
93+
<span
94+
t-out="trial_balance_item['debit']"
95+
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
96+
/>
97+
</div>
98+
<div class="act_as_cell amount" t-att-style="style">
99+
<span
100+
t-out="trial_balance_item['credit']"
101+
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
102+
/>
103+
</div>
104+
<div class="act_as_cell amount" t-att-style="style">
105+
<span
106+
t-out="trial_balance_item['balance']"
107+
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
108+
/>
109+
</div>
110+
<div class="act_as_cell amount" t-att-style="style">
111+
<span
112+
t-out="trial_balance_item['ending_balance']"
113+
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
114+
/>
115+
</div>
116+
</div>
117+
</div>
118+
<br />
119+
</t>
120+
</t>
121+
<t t-else="">
122+
<div class="act_as_table data_table" style="width: 100%;">
123+
<!-- Display account header -->
124+
<t
125+
t-call="account_financial_report.report_trial_balance_lines_header"
126+
/>
127+
<!-- Display each lines -->
128+
<t t-foreach="trial_balance" t-as="balance">
129+
<!-- Adapt -->
130+
<t t-set="style" t-value="'font-size:12px;'" />
131+
<!-- Different style for account group -->
132+
<t t-if="show_hierarchy">
133+
<t
134+
t-if="balance['type'] == 'group_type'"
135+
>
136+
<t
137+
t-set="style"
138+
t-value="style + 'font-weight: bold; color: blue;'"
139+
/>
140+
</t>
141+
</t>
142+
<t t-if="show_hierarchy and limit_hierarchy_level">
54143
<t
55-
t-set="style"
56-
t-value="style + 'font-weight: bold; color: blue;'"
57-
/>
144+
t-if="show_hierarchy_level > balance['level'] and (not hide_parent_hierarchy_level or (show_hierarchy_level - 1) == balance['level'])"
145+
>
146+
<t
147+
t-call="account_financial_report.report_trial_balance_line"
148+
/>
149+
</t>
58150
</t>
59-
</t>
60-
<t t-if="show_hierarchy and limit_hierarchy_level">
61-
<t
62-
t-if="show_hierarchy_level > balance['level'] and (not hide_parent_hierarchy_level or (show_hierarchy_level - 1) == balance['level'])"
63-
>
151+
<t t-else="">
64152
<t
65153
t-call="account_financial_report.report_trial_balance_line"
66154
/>
67155
</t>
68156
</t>
69-
<t t-else="">
70-
<t
71-
t-call="account_financial_report.report_trial_balance_line"
72-
/>
73-
</t>
74-
</t>
75-
</div>
157+
</div>
158+
</t>
76159
</t>
77160
<!-- Display partner lines -->
78161
<t t-if="show_partner_details">

0 commit comments

Comments
 (0)