odoo-addon-account-financial-report 16.0.1.14.0.1__py3-none-any.whl → 16.0.1.14.2__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:de08cf8b5635cf6e82fc7bfedbd1948446bc88b70b00a819f157d2af20dc5e47
10
+ !! source digest: sha256:518c6d66054b73ed60d8739dc0db6f558d419aeb5a477e4a0527a778eb9dfbf7
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -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": "16.0.1.14.0",
9
+ "version": "16.0.1.14.2",
10
10
  "category": "Reporting",
11
11
  "summary": "OCA Financial Reports",
12
12
  "author": "Camptocamp,"
@@ -1775,6 +1775,15 @@ msgstr ""
1775
1775
  msgid "The hierarchy level to filter on must be greater than 0."
1776
1776
  msgstr ""
1777
1777
 
1778
+ #. module: account_financial_report
1779
+ #. odoo-python
1780
+ #: code:addons/account_financial_report/report/trial_balance.py:0
1781
+ #, python-format
1782
+ msgid ""
1783
+ "There is a problem in the structure of the account groups. You may need to "
1784
+ "create some child group of %s."
1785
+ msgstr ""
1786
+
1778
1787
  #. module: account_financial_report
1779
1788
  #: model:ir.model.fields,help:account_financial_report.field_general_ledger_report_wizard__domain
1780
1789
  msgid "This domain will be used to select specific domain for Journal Items"
@@ -3,6 +3,7 @@
3
3
 
4
4
  import itertools
5
5
  import operator
6
+ from collections import defaultdict
6
7
 
7
8
  from odoo import models
8
9
 
@@ -181,13 +182,23 @@ class JournalLedgerReport(models.AbstractModel):
181
182
  return {"move_line_ids": tuple(move_lines.ids)}
182
183
 
183
184
  def _get_move_lines(self, move_ids, wizard, journal_ids):
184
- move_lines = self.env["account.move.line"].search(
185
- self._get_move_lines_domain(move_ids, wizard, journal_ids),
186
- order=self._get_move_lines_order(move_ids, wizard, journal_ids),
185
+ move_lines = (
186
+ self.env["account.move.line"]
187
+ .with_context(prefetch_fields=False)
188
+ .search(
189
+ self._get_move_lines_domain(move_ids, wizard, journal_ids),
190
+ order=self._get_move_lines_order(move_ids, wizard, journal_ids),
191
+ )
187
192
  )
188
- move_lines_exigible = self.env["account.move.line"].search(
189
- self._get_move_lines_domain(move_ids, wizard, journal_ids)
190
- + self.env["account.move.line"]._get_tax_exigible_domain(),
193
+ # Get the exigible move lines ids instead of the recordset to increase
194
+ # performance with a large number of journal items
195
+ move_lines_exigible_ids = set(
196
+ self.env["account.move.line"]
197
+ .search(
198
+ self._get_move_lines_domain(move_ids, wizard, journal_ids)
199
+ + self.env["account.move.line"]._get_tax_exigible_domain(),
200
+ )
201
+ .ids
191
202
  )
192
203
  move_line_ids_taxes_data = {}
193
204
  if move_lines:
@@ -209,36 +220,24 @@ class JournalLedgerReport(models.AbstractModel):
209
220
  "description": tax_description,
210
221
  }
211
222
  Move_Lines = {}
212
- accounts = self.env["account.account"]
213
- partners = self.env["res.partner"]
214
- currencies = self.env["res.currency"]
215
- tax_lines = self.env["account.tax"]
216
223
  auto_sequence = len(move_ids)
224
+ Move_Lines = defaultdict(list)
217
225
  for ml in move_lines:
218
- if ml.account_id not in accounts:
219
- accounts |= ml.account_id
220
- if ml.partner_id not in partners:
221
- partners |= ml.partner_id
222
- if ml.currency_id not in currencies:
223
- currencies |= ml.currency_id
224
- if ml.tax_line_id not in tax_lines:
225
- tax_lines |= ml.tax_line_id
226
- if ml.move_id.id not in Move_Lines.keys():
227
- Move_Lines[ml.move_id.id] = []
226
+ move_id = ml.move_id.id
227
+ if move_id not in Move_Lines:
228
228
  auto_sequence -= 1
229
- taxes = (
230
- ml.id in move_line_ids_taxes_data.keys()
231
- and move_line_ids_taxes_data[ml.id]
232
- or {}
233
- )
234
- exigible = ml in move_lines_exigible
235
- Move_Lines[ml.move_id.id].append(
229
+ taxes = move_line_ids_taxes_data.get(ml.id, {})
230
+ # Check the exigibility of the move line by id
231
+ # this way we avoid the recreation of the recordset which affects to the
232
+ # performance in the case of a large number of journal items
233
+ exigible = ml.id in move_lines_exigible_ids
234
+ Move_Lines[move_id].append(
236
235
  self._get_move_lines_data(ml, wizard, taxes, auto_sequence, exigible)
237
236
  )
238
- account_ids_data = self._get_account_data(accounts)
239
- partner_ids_data = self._get_partner_data(partners)
240
- currency_ids_data = self._get_currency_data(currencies)
241
- tax_line_ids_data = self._get_tax_line_data(tax_lines)
237
+ account_ids_data = self._get_account_data(move_lines.account_id)
238
+ partner_ids_data = self._get_partner_data(move_lines.partner_id)
239
+ currency_ids_data = self._get_currency_data(move_lines.currency_id)
240
+ tax_line_ids_data = self._get_tax_line_data(move_lines.tax_line_id)
242
241
  return (
243
242
  move_lines.ids,
244
243
  Move_Lines,
@@ -5,6 +5,7 @@
5
5
 
6
6
 
7
7
  from odoo import _, api, models
8
+ from odoo.exceptions import UserError
8
9
  from odoo.tools.float_utils import float_is_zero
9
10
 
10
11
 
@@ -687,8 +688,26 @@ class TrialBalanceReport(models.AbstractModel):
687
688
  return trial_balance, total_amount_grouped
688
689
 
689
690
  def _get_hierarchy_groups(self, group_ids, groups_data, foreign_currency):
690
- for group_id in group_ids:
691
+ processed_groups = []
692
+ # Sort groups so that parent groups are processed before child groups
693
+ groups = (
694
+ self.env["account.group"]
695
+ .browse(group_ids)
696
+ .sorted(key=lambda x: x.complete_code)
697
+ )
698
+ for group in groups:
699
+ group_id = group.id
691
700
  parent_id = groups_data[group_id]["parent_id"]
701
+ if group_id in processed_groups:
702
+ raise UserError(
703
+ _(
704
+ "There is a problem in the structure of the account groups. "
705
+ "You may need to create some child group of %s."
706
+ )
707
+ % groups_data[group_id]["name"]
708
+ )
709
+ else:
710
+ processed_groups.append(parent_id)
692
711
  while parent_id:
693
712
  if parent_id not in groups_data.keys():
694
713
  group = self.env["account.group"].browse(parent_id)
@@ -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:de08cf8b5635cf6e82fc7bfedbd1948446bc88b70b00a819f157d2af20dc5e47
370
+ !! source digest: sha256:518c6d66054b73ed60d8739dc0db6f558d419aeb5a477e4a0527a778eb9dfbf7
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/16.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-16-0/account-financial-reporting-16-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&amp;target_branch=16.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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-account_financial_report
3
- Version: 16.0.1.14.0.1
3
+ Version: 16.0.1.14.2
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:de08cf8b5635cf6e82fc7bfedbd1948446bc88b70b00a819f157d2af20dc5e47
27
+ !! source digest: sha256:518c6d66054b73ed60d8739dc0db6f558d419aeb5a477e4a0527a778eb9dfbf7
28
28
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29
29
 
30
30
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,9 +1,9 @@
1
- odoo/addons/account_financial_report/README.rst,sha256=LgU3uZWqGpzHZbX0gSr1N0kZTXnKrTmt-EXcyrPs-14,6972
1
+ odoo/addons/account_financial_report/README.rst,sha256=2U_71CwWq4u0U4kxxyvMssiLNRzrTf6wszJQ6qZkrkY,6972
2
2
  odoo/addons/account_financial_report/__init__.py,sha256=YoL8hk5QxSifbFJL7gPzpOSk-3zB1OSHJBXyZK25G6Q,187
3
- odoo/addons/account_financial_report/__manifest__.py,sha256=7dobnKCglI7kAGXddFE_CGkHCXA3Tc-M_AAaZir49PU,2062
3
+ odoo/addons/account_financial_report/__manifest__.py,sha256=fnWLWU7BMacxCkB7nwBHe26G3OoNHHutmBjrc2wbg3g,2062
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=2jjhyadpZASX28px_xh7BjqdaScc-UDoGmgcxuyfS1c,84840
6
+ odoo/addons/account_financial_report/i18n/account_financial_report.pot,sha256=fzgNZKKBxIk7c01RI7Je7rty7C4M9rdM3o34n7HH1Vk,85105
7
7
  odoo/addons/account_financial_report/i18n/ar.po,sha256=otrz1Lzbrz0FcL8lI-AdOuOLam-uEllwcUDrJiIB0s8,92756
8
8
  odoo/addons/account_financial_report/i18n/ca.po,sha256=VklHZSRvOV3JqLq0MokaahWvlmlvrJlJWeJOxciwPts,91841
9
9
  odoo/addons/account_financial_report/i18n/de.po,sha256=wHMLCSCm1OJ8Yt2HjBmKeHCG-gnaFcJiqeC1WPFXS_k,95443
@@ -43,11 +43,11 @@ odoo/addons/account_financial_report/report/aged_partner_balance.py,sha256=gRk0y
43
43
  odoo/addons/account_financial_report/report/aged_partner_balance_xlsx.py,sha256=h_z-Jw_k46SBp5tWJh8iZU83-PGmKwGDZIyFRV--FNc,14334
44
44
  odoo/addons/account_financial_report/report/general_ledger.py,sha256=RdHeQguzm-6LAyleDmqFzKI80gIHSNyDI7BvU3adV9U,38218
45
45
  odoo/addons/account_financial_report/report/general_ledger_xlsx.py,sha256=t66UFbyoes_kIPoo5xFG7__WdpPPBR8yxQMZRkMcJuE,17349
46
- odoo/addons/account_financial_report/report/journal_ledger.py,sha256=5_w9CmKy_eZNgJsSL1TFTTe5b3DBBEY1qmseI1RuGPI,15424
46
+ odoo/addons/account_financial_report/report/journal_ledger.py,sha256=7pVowtuVNyxE4AOmCkfQrKllziVJdxS3mJ0Tfu8S_W0,15404
47
47
  odoo/addons/account_financial_report/report/journal_ledger_xlsx.py,sha256=Pp7iDkBjSk0BqZkSPAiKI2hBHNcjKYjZoBxuL_ENz5E,10126
48
48
  odoo/addons/account_financial_report/report/open_items.py,sha256=JjPpILfCbXf1Dx8JB_K8Muy2uGkfchh802Ghr2EoN0c,12561
49
49
  odoo/addons/account_financial_report/report/open_items_xlsx.py,sha256=iv32561UaRppS5XyclMnYwLHJ2icYUA1hNeUOkcl8ng,14960
50
- odoo/addons/account_financial_report/report/trial_balance.py,sha256=8LZzdyv_udBdE4JiUtRYm4cGj_hf7mcVDnaxZJWMpqc,41724
50
+ odoo/addons/account_financial_report/report/trial_balance.py,sha256=de7eH62Imh01OHGEOA0mkAA8xuAETQdIN9rxqDhbxMA,42466
51
51
  odoo/addons/account_financial_report/report/trial_balance_xlsx.py,sha256=iGn0bVz63eMNL6Xdnjk8r4JdZrX2ojnEm9E0BaOcDoY,13278
52
52
  odoo/addons/account_financial_report/report/vat_report.py,sha256=pDwcCqbWTOveJD6GbOwJxU35kt8gMnzZ0rbRu2_h3KI,10317
53
53
  odoo/addons/account_financial_report/report/vat_report_xlsx.py,sha256=aa0dLzYdywjmO63ONRYUBTpSGmsPfEjX60CkUbULuo8,2317
@@ -61,7 +61,7 @@ odoo/addons/account_financial_report/report/templates/vat_report.xml,sha256=-xlv
61
61
  odoo/addons/account_financial_report/security/ir.model.access.csv,sha256=S1VQLLwLeaOeAMYGqtoOqHUaZVrvDUVE4Z-0-SRjSGQ,1134
62
62
  odoo/addons/account_financial_report/security/security.xml,sha256=gpNJnzruXfeYskn26FqY9U04FiuTf8vgLCKEGY8PADM,422
63
63
  odoo/addons/account_financial_report/static/description/icon.png,sha256=WW-eOIjW5-jo7tgBieNv6K2DUKMoHFSVctnp0htstHI,15230
64
- odoo/addons/account_financial_report/static/description/index.html,sha256=crD2D9AX-mZk-OnNVxdYKbUjNwZ643YIf0AWdtQu-1c,20035
64
+ odoo/addons/account_financial_report/static/description/index.html,sha256=bVDYpnpq7fGQ6lB-7TJ5fwiA4jMnU3t-HwPaFbfzn2c,20035
65
65
  odoo/addons/account_financial_report/static/src/css/report.css,sha256=Cu4VmyY5tVXIddaojFDsg0Ute2qPCvKbLiimak_X9ik,2361
66
66
  odoo/addons/account_financial_report/static/src/css/report_html.css,sha256=I1kX1RsThtjGNLOaNJEWCvMnB9iAFW6nGkcyFYZzJoA,135
67
67
  odoo/addons/account_financial_report/static/src/js/report.esm.js,sha256=He488vLRaLv6IIuVaNSnNl8kJMIwJmMIv7GkmXyPJZs,2475
@@ -98,7 +98,7 @@ odoo/addons/account_financial_report/wizard/trial_balance_wizard.py,sha256=ej-W_
98
98
  odoo/addons/account_financial_report/wizard/trial_balance_wizard_view.xml,sha256=5c2fn2T-rVoj_VYbibKphXVWh78ia-m4MoZW6P1hM8A,7904
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-16.0.1.14.0.1.dist-info/METADATA,sha256=ze68Np2KY2zb1MjIGyWRUtrE8uh-ScgRYGyL6nYiMwg,7652
102
- odoo_addon_account_financial_report-16.0.1.14.0.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
103
- odoo_addon_account_financial_report-16.0.1.14.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
104
- odoo_addon_account_financial_report-16.0.1.14.0.1.dist-info/RECORD,,
101
+ odoo_addon_account_financial_report-16.0.1.14.2.dist-info/METADATA,sha256=8k3s2GAsuBzLkyojHMyDA9gPen1iGXIq49CZUyxxOZc,7650
102
+ odoo_addon_account_financial_report-16.0.1.14.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
103
+ odoo_addon_account_financial_report-16.0.1.14.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
104
+ odoo_addon_account_financial_report-16.0.1.14.2.dist-info/RECORD,,