odoo-addon-account-financial-report 17.0.1.4.0.1__py3-none-any.whl → 17.0.1.6.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.

@@ -7,7 +7,7 @@ Account Financial Reports
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:4dd0964e1e5bccd75c7c56d0b89bd21f35a0f176bd7b9b69aaebb7db4f3bd729
10
+ !! source digest: sha256:20ae22a108ec709b3bf88351495514d82435eb77953df3f3164d48b9c58886cc
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -31,12 +31,12 @@ Account Financial Reports
31
31
  This module adds a set of financial reports. They are accessible under
32
32
  Invoicing / Reporting / OCA accounting reports.
33
33
 
34
- - General ledger
35
- - Trial Balance
36
- - Open Items
37
- - Aged Partner Balance
38
- - VAT Report
39
- - Journal Ledger
34
+ - General ledger
35
+ - Trial Balance
36
+ - Open Items
37
+ - Aged Partner Balance
38
+ - VAT Report
39
+ - Journal Ledger
40
40
 
41
41
  Currently General ledger, Trial Balance and Open Items are fully
42
42
  compatible with a foreign currency set up in account in order to display
@@ -90,12 +90,12 @@ per company in:
90
90
  Known issues / Roadmap
91
91
  ======================
92
92
 
93
- - 'VAT Report' is valid only for cases where it's met that for each Tax
94
- defined: all the "Account tags" of all the 'Repartition for Invoices'
95
- or 'Repartition for Credit Notes' are different.
96
- - It would be nice to have in reports a column indicating the state of
97
- the entries when the option "All Entries" is selected in "Target
98
- Moves" field in a wizard
93
+ - 'VAT Report' is valid only for cases where it's met that for each Tax
94
+ defined: all the "Account tags" of all the 'Repartition for Invoices'
95
+ or 'Repartition for Credit Notes' are different.
96
+ - It would be nice to have in reports a column indicating the state of
97
+ the entries when the option "All Entries" is selected in "Target
98
+ Moves" field in a wizard
99
99
 
100
100
  Changelog
101
101
  =========
@@ -103,22 +103,22 @@ Changelog
103
103
  11.0.2.5.0 (2019-04-26)
104
104
  -----------------------
105
105
 
106
- - In the Trial Balance you have an option to hide parent hierarchy
107
- levels
106
+ - In the Trial Balance you have an option to hide parent hierarchy
107
+ levels
108
108
 
109
109
  11.0.2.4.1 (2019-01-08)
110
110
  -----------------------
111
111
 
112
- - Handle better multicompany behaviour
113
- - Improve how title appears in the reports
114
- - Improve performance in General Ledger
112
+ - Handle better multicompany behaviour
113
+ - Improve how title appears in the reports
114
+ - Improve performance in General Ledger
115
115
 
116
116
  11.0.2.3.1 (2018-11-29)
117
117
  -----------------------
118
118
 
119
- - In the Trial Balance you can apply a filter by hierarchy levels
120
- - In the General Ledger you can apply a filter by Analytic Tag
121
- - In the Journal Ledger the field 'Journal' is now optional
119
+ - In the Trial Balance you can apply a filter by hierarchy levels
120
+ - In the General Ledger you can apply a filter by Analytic Tag
121
+ - In the Journal Ledger the field 'Journal' is now optional
122
122
 
123
123
  Bug Tracker
124
124
  ===========
@@ -144,42 +144,42 @@ Authors
144
144
  Contributors
145
145
  ------------
146
146
 
147
- - Jordi Ballester <jordi.ballester@forgeflow.com>
148
- - Yannick Vaucher <yannick.vaucher@camptocamp.com>
149
- - Simone Orsi <simone.orsi@abstract.com>
150
- - Leonardo Pistone <leonardo.pistone@camptocamp.com>
151
- - Damien Crier <damien.crier@camptocamp.com>
152
- - Andrea Stirpe <a.stirpe@onestein.nl>
153
- - Thomas Rehn <thomas.rehn@initos.com>
154
- - Andrea Gallina <4everamd@gmail.com>
155
- - Robert Rottermann <robert@redcor.ch>
156
- - Ciro Urselli <c.urselli@apuliasoftware.it>
157
- - Francesco Apruzzese <opencode@e-ware.org>
158
- - Lorenzo Battistini <https://github.com/eLBati>
159
- - Julien Coux <julien.coux@camptocamp.com>
160
- - Akim Juillerat <akim.juillerat@camptocamp.com>
161
- - Alexis de Lattre <alexis@via.ecp.fr>
162
- - Mihai Fekete <feketemihai@gmail.com>
163
- - Miquel Ra??ch <miquel.raich@forgeflow.com>
164
- - Joan Sisquella <joan.sisquella@forgeflow.com>
165
- - `Tecnativa <https://www.tecnativa.com>`__:
166
-
167
- - Pedro M. Baeza
168
- - Sergio Teruel
169
- - Ernesto Tejeda
170
- - Jo??o Marques
171
- - Alexandre D. D??az
172
- - V??ctor Mart??nez
173
- - Carolina Fernandez
174
-
175
- - `Sygel <https://www.sygel.es>`__:
176
-
177
- - Harald Panten
178
- - Valentin Vinagre
179
-
180
- - Lois Rilo <lois.rilo@forgeflow.com>
181
- - Saran Lim. <saranl@ecosoft.co.th>
182
- - Omar Casti??eira <omar@comunitea.com>
147
+ - Jordi Ballester <jordi.ballester@forgeflow.com>
148
+ - Yannick Vaucher <yannick.vaucher@camptocamp.com>
149
+ - Simone Orsi <simone.orsi@abstract.com>
150
+ - Leonardo Pistone <leonardo.pistone@camptocamp.com>
151
+ - Damien Crier <damien.crier@camptocamp.com>
152
+ - Andrea Stirpe <a.stirpe@onestein.nl>
153
+ - Thomas Rehn <thomas.rehn@initos.com>
154
+ - Andrea Gallina <4everamd@gmail.com>
155
+ - Robert Rottermann <robert@redcor.ch>
156
+ - Ciro Urselli <c.urselli@apuliasoftware.it>
157
+ - Francesco Apruzzese <opencode@e-ware.org>
158
+ - Lorenzo Battistini <https://github.com/eLBati>
159
+ - Julien Coux <julien.coux@camptocamp.com>
160
+ - Akim Juillerat <akim.juillerat@camptocamp.com>
161
+ - Alexis de Lattre <alexis@via.ecp.fr>
162
+ - Mihai Fekete <feketemihai@gmail.com>
163
+ - Miquel Ra??ch <miquel.raich@forgeflow.com>
164
+ - Joan Sisquella <joan.sisquella@forgeflow.com>
165
+ - `Tecnativa <https://www.tecnativa.com>`__:
166
+
167
+ - Pedro M. Baeza
168
+ - Sergio Teruel
169
+ - Ernesto Tejeda
170
+ - Jo??o Marques
171
+ - Alexandre D. D??az
172
+ - V??ctor Mart??nez
173
+ - Carolina Fernandez
174
+
175
+ - `Sygel <https://www.sygel.es>`__:
176
+
177
+ - Harald Panten
178
+ - Valentin Vinagre
179
+
180
+ - Lois Rilo <lois.rilo@forgeflow.com>
181
+ - Saran Lim. <saranl@ecosoft.co.th>
182
+ - Omar Casti??eira <omar@comunitea.com>
183
183
 
184
184
  Much of the work in this module was done at a sprint in Sorrento, Italy
185
185
  in April 2016.
@@ -6,7 +6,7 @@
6
6
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
7
7
  {
8
8
  "name": "Account Financial Reports",
9
- "version": "17.0.1.4.0",
9
+ "version": "17.0.1.6.0",
10
10
  "category": "Reporting",
11
11
  "summary": "OCA Financial Reports",
12
12
  "author": "Camptocamp,"
@@ -49,6 +49,13 @@ msgstr ""
49
49
  msgid "<b>Taxes summary</b>"
50
50
  msgstr ""
51
51
 
52
+ #. module: account_financial_report
53
+ #: model_terms:ir.ui.view,arch_db:account_financial_report.trial_balance_wizard
54
+ msgid ""
55
+ "<i class=\"fa fa-exclamation-triangle mr-3\"/>\n"
56
+ " Duplicate amounts may be shown because more than one analytical account may be defined in the journal items."
57
+ msgstr ""
58
+
52
59
  #. module: account_financial_report
53
60
  #: model_terms:ir.ui.view,arch_db:account_financial_report.res_config_settings_view_form
54
61
  msgid "<span class=\"o_form_label\">Intervals configuration</span>"
@@ -336,6 +343,7 @@ msgstr ""
336
343
 
337
344
  #. module: account_financial_report
338
345
  #: model:ir.model.fields,field_description:account_financial_report.field_account_move_line__analytic_account_ids
346
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__trial_balance_report_wizard__grouped_by__analytic_account
339
347
  msgid "Analytic Account"
340
348
  msgstr ""
341
349
 
@@ -945,6 +953,7 @@ msgstr ""
945
953
 
946
954
  #. module: account_financial_report
947
955
  #: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__grouped_by
956
+ #: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard__grouped_by
948
957
  msgid "Grouped By"
949
958
  msgstr ""
950
959
 
@@ -1586,6 +1595,14 @@ msgstr ""
1586
1595
  msgid "Starting account in a range"
1587
1596
  msgstr ""
1588
1597
 
1598
+ #. module: account_financial_report
1599
+ #. odoo-python
1600
+ #: code:addons/account_financial_report/report/trial_balance.py:0
1601
+ #: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
1602
+ #, python-format
1603
+ msgid "TOTAL"
1604
+ msgstr ""
1605
+
1589
1606
  #. module: account_financial_report
1590
1607
  #: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
1591
1608
  msgid "Tags"
@@ -1746,7 +1763,10 @@ msgid "To:"
1746
1763
  msgstr ""
1747
1764
 
1748
1765
  #. module: account_financial_report
1766
+ #. odoo-python
1767
+ #: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
1749
1768
  #: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_account_ending_cumul
1769
+ #, python-format
1750
1770
  msgid "Total"
1751
1771
  msgstr ""
1752
1772
 
@@ -1880,6 +1900,13 @@ msgstr ""
1880
1900
  msgid "With Account Name"
1881
1901
  msgstr ""
1882
1902
 
1903
+ #. module: account_financial_report
1904
+ #. odoo-python
1905
+ #: code:addons/account_financial_report/report/trial_balance.py:0
1906
+ #, python-format
1907
+ msgid "Without analytic account"
1908
+ msgstr ""
1909
+
1883
1910
  #. module: account_financial_report
1884
1911
  #. odoo-python
1885
1912
  #: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
@@ -762,6 +762,7 @@ class GeneralLedgerReport(models.AbstractModel):
762
762
  list_centralized_ml += list(centralized_ml[jnl_id].values())
763
763
  return list_centralized_ml
764
764
 
765
+ # flake8: noqa: C901
765
766
  def _get_report_values(self, docids, data):
766
767
  wizard_id = data["wizard_id"]
767
768
  company = self.env["res.company"].browse(data["company_id"])
@@ -836,6 +837,61 @@ class GeneralLedgerReport(models.AbstractModel):
836
837
  account[grouped_by] = False
837
838
  del account["list_grouped"]
838
839
  general_ledger = sorted(general_ledger, key=lambda k: k["code"])
840
+ # Set the bal_curr of the initial balance to 0 if it does not correspond
841
+ # (reducing the corresponding of the bal_curr of the initial balance).
842
+ for gl_item in general_ledger:
843
+ if not foreign_currency:
844
+ continue
845
+ if (
846
+ not gl_item["currency_id"]
847
+ or gl_item["currency_id"] != company.currency_id
848
+ ):
849
+ gl_item["fin_bal"]["bal_curr"] -= gl_item["init_bal"]["bal_curr"]
850
+ gl_item["init_bal"]["bal_curr"] = 0
851
+ if "list_grouped" in gl_item:
852
+ for lg_item in gl_item["list_grouped"]:
853
+ lg_item["fin_bal"]["bal_curr"] -= lg_item["init_bal"][
854
+ "bal_curr"
855
+ ]
856
+ lg_item["init_bal"]["bal_curr"] = 0
857
+ # Set the fin_bal_currency_id value if the account does not have it set
858
+ # and there are move lines in a currency different from that of
859
+ # the company (USD for example).
860
+ for gl_item in general_ledger:
861
+ fin_bal_currency_ids = []
862
+ fin_bal_currency_id = gl_item["currency_id"]
863
+ if gl_item["currency_id"] or not foreign_currency:
864
+ continue
865
+ gl_item["fin_bal"]["bal_curr"] = gl_item["init_bal"]["bal_curr"]
866
+ if "move_lines" in gl_item:
867
+ for ml in gl_item["move_lines"]:
868
+ ml_currency_id = (
869
+ ml["currency_id"][0] if ml["currency_id"] else False
870
+ )
871
+ if ml_currency_id and ml_currency_id != company.currency_id.id:
872
+ gl_item["fin_bal"]["bal_curr"] += ml["bal_curr"]
873
+ if ml_currency_id not in fin_bal_currency_ids:
874
+ fin_bal_currency_ids.append(ml_currency_id)
875
+ elif "list_grouped" in gl_item:
876
+ fin_bal_currency_ids = []
877
+ for lg_item in gl_item["list_grouped"]:
878
+ lg_item["fin_bal"]["bal_curr"] = lg_item["init_bal"]["bal_curr"]
879
+ for ml in lg_item["move_lines"]:
880
+ ml_currency_id = (
881
+ ml["currency_id"][0] if ml["currency_id"] else False
882
+ )
883
+ if ml_currency_id and ml_currency_id != company.currency_id.id:
884
+ lg_item["fin_bal"]["bal_curr"] += ml["bal_curr"]
885
+ gl_item["fin_bal"]["bal_curr"] += ml["bal_curr"]
886
+ if ml_currency_id not in fin_bal_currency_ids:
887
+ fin_bal_currency_ids.append(ml_currency_id)
888
+ # If there is only 1 currency, we set that one as fin_bal_currency_id
889
+ # The use of different move lines with different currencies (EUR + GBP)
890
+ # will be excluded. We use a different field to avoid showing the initial
891
+ # balance and/or distorting data.
892
+ if not gl_item["currency_id"] and len(fin_bal_currency_ids) == 1:
893
+ fin_bal_currency_id = fin_bal_currency_ids[0]
894
+ gl_item["fin_bal_currency_id"] = fin_bal_currency_id
839
895
  return {
840
896
  "doc_ids": [wizard_id],
841
897
  "doc_model": "general.ledger.report.wizard",
@@ -357,10 +357,11 @@ class GeneralLedgerXslx(models.AbstractModel):
357
357
  "final_balance": account["fin_bal"]["balance"],
358
358
  }
359
359
  )
360
- if foreign_currency and account["currency_id"]:
360
+ if foreign_currency and account["fin_bal_currency_id"]:
361
361
  account.update(
362
362
  {
363
- "final_bal_curr": account["fin_bal"]["bal_curr"],
363
+ "final_bal_curr": total_bal_curr,
364
+ "currency_id": account["fin_bal_currency_id"],
364
365
  }
365
366
  )
366
367
  self.write_ending_balance_from_dict(account, report_data)
@@ -24,7 +24,7 @@
24
24
  <div class="row">
25
25
  <h4
26
26
  class="mt0"
27
- t-esc="title or 'Odoo Report'"
27
+ t-out="title or 'Odoo Report'"
28
28
  style="text-align: center;"
29
29
  />
30
30
  </div>
@@ -35,9 +35,9 @@
35
35
  <!-- Display account header -->
36
36
  <div class="act_as_table list_table" style="margin-top: 10px;" />
37
37
  <div class="act_as_caption account_title" style="width: 100%">
38
- <span t-esc="account['code']" />
38
+ <span t-out="account['code']" />
39
39
  -
40
- <span t-esc="account['name']" />
40
+ <span t-out="account['name']" />
41
41
  </div>
42
42
  <t t-if="'list_grouped' not in account">
43
43
  <!-- Display account move lines without partner regroup -->
@@ -62,7 +62,7 @@
62
62
  <div class="page_break">
63
63
  <!-- Display partner header -->
64
64
  <div class="act_as_caption account_title">
65
- <span t-esc="group_item['name']" />
65
+ <span t-out="group_item['name']" />
66
66
  </div>
67
67
  <!-- Display partner move lines -->
68
68
  <t
@@ -113,9 +113,9 @@
113
113
  <div class="act_as_row">
114
114
  <div class="act_as_cell">
115
115
  From:
116
- <span t-esc="date_from" />
116
+ <span t-out="date_from" />
117
117
  To:
118
- <span t-esc="date_to" />
118
+ <span t-out="date_to" />
119
119
  </div>
120
120
  <div class="act_as_cell">
121
121
  <t t-if="only_posted_moves">All posted entries</t>
@@ -381,7 +381,7 @@
381
381
  view-type="form"
382
382
  >
383
383
  <t
384
- t-esc="line['date']"
384
+ t-out="line['date']"
385
385
  t-options="{'widget': 'date'}"
386
386
  />
387
387
  </span>
@@ -390,7 +390,7 @@
390
390
  <span>
391
391
  <!--## We don't use t-field because it throws an error on click -->
392
392
  <t
393
- t-esc="line['date']"
393
+ t-out="line['date']"
394
394
  t-options="{'widget': 'date'}"
395
395
  />
396
396
  </span>
@@ -435,12 +435,12 @@
435
435
  <t t-if="taxes_data and line['tax_ids']">
436
436
  <t t-foreach="line['tax_ids']" t-as="tax_id">
437
437
  <span
438
- t-esc="o._get_atr_from_dict(tax_id, taxes_data, 'tax_name')"
438
+ t-out="o._get_atr_from_dict(tax_id, taxes_data, 'tax_name')"
439
439
  />
440
440
  </t>
441
441
  </t>
442
442
  <t t-if="line['tax_line_id']">
443
- <span t-esc="line['tax_line_id'][1]" />
443
+ <span t-out="line['tax_line_id'][1]" />
444
444
  </t>
445
445
  </div>
446
446
  <!--## partner-->
@@ -486,13 +486,13 @@
486
486
  view-type="form"
487
487
  >
488
488
  <t
489
- t-esc="o._get_atr_from_dict(int(analytic_id), analytic_data, 'name')"
489
+ t-out="o._get_atr_from_dict(int(analytic_id), analytic_data, 'name')"
490
490
  />
491
491
  <t
492
492
  t-if="int(line['analytic_distribution'][analytic_id]) &lt; 100"
493
493
  >
494
494
  <t
495
- t-esc="int(line['analytic_distribution'][analytic_id])"
495
+ t-out="int(line['analytic_distribution'][analytic_id])"
496
496
  />%
497
497
  </t>
498
498
  </span>
@@ -506,7 +506,7 @@
506
506
  <t t-if="line['tag_ids']">
507
507
  <t t-foreach="line['tag_ids']" t-as="tag_id">
508
508
  <span
509
- t-esc="o._get_atr_from_dict(tag_id, tags_data, 'name')"
509
+ t-out="o._get_atr_from_dict(tag_id, tags_data, 'name')"
510
510
  />
511
511
  </t>
512
512
  </t>
@@ -645,9 +645,9 @@
645
645
  <!--## date-->
646
646
  <t t-if='type == "account_type"'>
647
647
  <div class="act_as_cell first_column" style="width: 41.32%;">
648
- <span t-esc="account['code']" />
648
+ <span t-out="account['code']" />
649
649
  -
650
- <span t-esc="account['name']" />
650
+ <span t-out="account['name']" />
651
651
  </div>
652
652
  <div class="act_as_cell right" style="width: 16.9%;">Ending balance
653
653
  </div>
@@ -672,21 +672,21 @@
672
672
  <!--## debit-->
673
673
  <div class="act_as_cell amount" style="width: 8.02%;">
674
674
  <span
675
- t-esc="account_or_group_item_object['fin_bal']['debit']"
675
+ t-out="account_or_group_item_object['fin_bal']['debit']"
676
676
  t-options="{'widget': 'monetary', 'display_currency': company_currency}"
677
677
  />
678
678
  </div>
679
679
  <!--## credit-->
680
680
  <div class="act_as_cell amount" style="width: 8.02%;">
681
681
  <span
682
- t-esc="account_or_group_item_object['fin_bal']['credit']"
682
+ t-out="account_or_group_item_object['fin_bal']['credit']"
683
683
  t-options="{'widget': 'monetary', 'display_currency': company_currency}"
684
684
  />
685
685
  </div>
686
686
  <!--## balance cumulated-->
687
687
  <div class="act_as_cell amount" style="width: 8.02%;">
688
688
  <span
689
- t-esc="account_or_group_item_object['fin_bal']['balance']"
689
+ t-out="account_or_group_item_object['fin_bal']['balance']"
690
690
  t-options="{'widget': 'monetary', 'display_currency': company_currency}"
691
691
  />
692
692
  </div>
@@ -702,10 +702,10 @@
702
702
  />
703
703
  <t t-set="misc_grouped_domain" t-value="[]" t-else="" />
704
704
  <t t-if="foreign_currency">
705
- <t t-if="account['currency_id']">
705
+ <t t-if="account['fin_bal_currency_id']">
706
706
  <t
707
707
  t-set="account_currency"
708
- t-value="currency_model.browse(account['currency_id'])"
708
+ t-value="currency_model.browse(account['fin_bal_currency_id'])"
709
709
  />
710
710
  <div class="act_as_cell amount" style="width: 3.63%;">
711
711
  <t t-if="type == 'account_type'">