odoo-addon-account-financial-report 17.0.1.6.6__py3-none-any.whl → 17.0.1.6.8__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:095191b4030b181c9fb148a9b3be2229096a6e5dcff42cf19b2f5e6b41589562
10
+ !! source digest: sha256:7983a6a081357cca806fed7fb508c599bd9f281f66387c402dced6d083684c9f
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": "17.0.1.6.6",
9
+ "version": "17.0.1.6.8",
10
10
  "category": "Reporting",
11
11
  "summary": "OCA Financial Reports",
12
12
  "author": "Camptocamp,"
@@ -195,16 +195,18 @@ class GeneralLedgerXslx(models.AbstractModel):
195
195
  taxes_description += taxes_data[tax_id]["tax_name"] + " "
196
196
  if line["tax_line_id"]:
197
197
  taxes_description += line["tax_line_id"][1]
198
- for account_id, value in line["analytic_distribution"].items():
199
- if value < 100:
200
- analytic_distribution += "%s %d%% " % (
201
- analytic_data[int(account_id)]["name"],
202
- value,
203
- )
204
- else:
205
- analytic_distribution += (
206
- "%s " % analytic_data[int(account_id)]["name"]
207
- )
198
+ analytic_list = []
199
+ for account_ids, percentage in line[
200
+ "analytic_distribution"
201
+ ].items():
202
+ for account_id in account_ids.split(","):
203
+ name = analytic_data[int(account_id)]["name"]
204
+ if percentage < 100:
205
+ analytic_list.append(f"{name} {int(percentage)}%")
206
+ else:
207
+ analytic_list.append(name)
208
+ analytic_distribution = ", ".join(analytic_list)
209
+
208
210
  line.update(
209
211
  {
210
212
  "taxes_description": taxes_description,
@@ -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,
@@ -475,29 +475,47 @@
475
475
  <!--## cost_center-->
476
476
  <t t-if="show_cost_center">
477
477
  <div class="act_as_cell left">
478
- <t
479
- t-foreach="line['analytic_distribution']"
480
- t-as="analytic_id"
481
- >
482
- <div>
483
- <span
484
- t-att-res-id="analytic_id"
485
- res-model="account.analytic.account"
486
- view-type="form"
478
+ <ul style="list-style: none; padding: 0; margin: 0;">
479
+ <t
480
+ t-foreach="line['analytic_distribution'].items()"
481
+ t-as="analytic_entry"
482
+ >
483
+ <t
484
+ t-set="analytic_ids"
485
+ t-value="analytic_entry[0]"
486
+ />
487
+ <t t-set="percentage" t-value="analytic_entry[1]" />
488
+ <t
489
+ t-foreach="analytic_ids.split(',')"
490
+ t-as="analytic_id"
487
491
  >
488
- <t
489
- t-out="o._get_atr_from_dict(int(analytic_id), analytic_data, 'name')"
490
- />
491
- <t
492
- t-if="int(line['analytic_distribution'][analytic_id]) &lt; 100"
493
- >
494
- <t
495
- t-out="int(line['analytic_distribution'][analytic_id])"
496
- />%
497
- </t>
498
- </span>
499
- </div>
500
- </t>
492
+ <li style="padding: 2px 0;">
493
+ <span
494
+ t-att-res-id="analytic_id"
495
+ res-model="account.analytic.account"
496
+ view-type="form"
497
+ >
498
+ <t
499
+ t-set="analytic_id"
500
+ t-value="analytic_id.strip()"
501
+ />
502
+ <t
503
+ t-set="account_name"
504
+ t-value="o._get_atr_from_dict(int(analytic_id), analytic_data, 'name')"
505
+ />
506
+ <t t-if="percentage &lt; 100">
507
+ <t
508
+ t-out="account_name + ' (' + str(percentage) + '%)'"
509
+ />
510
+ </t>
511
+ <t t-else="">
512
+ <t t-out="account_name" />
513
+ </t>
514
+ </span>
515
+ </li>
516
+ </t>
517
+ </t>
518
+ </ul>
501
519
  </div>
502
520
  </t>
503
521
  <t t-if="show_analytic_tags">
@@ -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:095191b4030b181c9fb148a9b3be2229096a6e5dcff42cf19b2f5e6b41589562
370
+ !! source digest: sha256:7983a6a081357cca806fed7fb508c599bd9f281f66387c402dced6d083684c9f
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/17.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-17-0/account-financial-reporting-17-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=17.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: 17.0.1.6.6
3
+ Version: 17.0.1.6.8
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo-addon-date_range>=17.0dev,<17.1dev
6
6
  Requires-Dist: odoo-addon-report_xlsx>=17.0dev,<17.1dev
@@ -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:095191b4030b181c9fb148a9b3be2229096a6e5dcff42cf19b2f5e6b41589562
27
+ !! source digest: sha256:7983a6a081357cca806fed7fb508c599bd9f281f66387c402dced6d083684c9f
28
28
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29
29
 
30
30
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,6 +1,6 @@
1
- odoo/addons/account_financial_report/README.rst,sha256=NCSddI_3a0AZTZGHGf5XabV3ZchsGDwxQ_MhwxAs1qk,6888
1
+ odoo/addons/account_financial_report/README.rst,sha256=HYgZodMVi5otWwXOycqEXKzs5OXUoJCx453cOHv9hA0,6888
2
2
  odoo/addons/account_financial_report/__init__.py,sha256=YoL8hk5QxSifbFJL7gPzpOSk-3zB1OSHJBXyZK25G6Q,187
3
- odoo/addons/account_financial_report/__manifest__.py,sha256=pBH8Clevkdq2rJw6TBMbuOe-qzmg71Gus2OVc_k8EZ8,2061
3
+ odoo/addons/account_financial_report/__manifest__.py,sha256=QHZJY93GIUosfCliXnBJY2rRqIW1z5vnsK5_fkhHJR4,2061
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
6
  odoo/addons/account_financial_report/i18n/account_financial_report.pot,sha256=937vhbW5GlT13iSsN4_5r6S5601H3s8di7Yy1s2O558,83068
@@ -42,8 +42,8 @@ odoo/addons/account_financial_report/report/abstract_report_xlsx.py,sha256=QILq6
42
42
  odoo/addons/account_financial_report/report/aged_partner_balance.py,sha256=gyCJ4lEROzfDjsgFi7fGan2XTxLmDhKOj5ta9qXVXtk,19979
43
43
  odoo/addons/account_financial_report/report/aged_partner_balance_xlsx.py,sha256=DzOfIfKJ7a6lExmjACLN0JI0t1nEtsCY-N0HHbv_5Nw,14276
44
44
  odoo/addons/account_financial_report/report/general_ledger.py,sha256=HoT57umaM5gVDMu8cf3cdKwkIFJ_tggsPF_016kdca4,38201
45
- odoo/addons/account_financial_report/report/general_ledger_xlsx.py,sha256=k7kitd8kUmvunYucjEjGoA4a2pyPV9BflwMeCS-0nt8,17339
46
- odoo/addons/account_financial_report/report/journal_ledger.py,sha256=5_w9CmKy_eZNgJsSL1TFTTe5b3DBBEY1qmseI1RuGPI,15424
45
+ odoo/addons/account_financial_report/report/general_ledger_xlsx.py,sha256=qXDm9V1XyLtwUYp_4i-p4mCG6ZEuMwcrFLuPhu1Exhw,17426
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=kY6c-56HHauIyHAc7q5iNerz0gJQrp4ahI4OB1XeCT8,10060
48
48
  odoo/addons/account_financial_report/report/open_items.py,sha256=kRM1kI17LI_LUj3zDFf4zxMtrqDXZAO9fbBAczr04PA,12218
49
49
  odoo/addons/account_financial_report/report/open_items_xlsx.py,sha256=ERlxxsY2ERTimVEpskyp_XdsNuRW0XcFih7pJ2VF914,8366
@@ -52,7 +52,7 @@ odoo/addons/account_financial_report/report/trial_balance_xlsx.py,sha256=3wpHQ5J
52
52
  odoo/addons/account_financial_report/report/vat_report.py,sha256=eLWr9mk1bOQUPH4FEGDssfhqEfAeZUJV5ryCf8YYea0,10117
53
53
  odoo/addons/account_financial_report/report/vat_report_xlsx.py,sha256=ksdmiHDQZBBtk8fqkxSAS6-nFIyhT-wue4OTSV6xW9c,2307
54
54
  odoo/addons/account_financial_report/report/templates/aged_partner_balance.xml,sha256=IfeLCmOIFqyaEsRnRihb0pXo-deJD41id5qgjE3_Ftw,41020
55
- odoo/addons/account_financial_report/report/templates/general_ledger.xml,sha256=FuzRQvPRrYfhlKC3vbgTig0YCICgQU_dbZ4j_LJIU8I,39142
55
+ odoo/addons/account_financial_report/report/templates/general_ledger.xml,sha256=CK6qMzaH0WTUdN5NDzUgGMzuMROGz4sLcQwK-hR6b-A,40387
56
56
  odoo/addons/account_financial_report/report/templates/journal_ledger.xml,sha256=egiOr0CBtt7c4dY0Ghtf44LxF-ounCUjg77CUDUTpX0,21574
57
57
  odoo/addons/account_financial_report/report/templates/layouts.xml,sha256=gCejPAn8GLrySSve8pGcs0fY5nr48C3mmyuoEJVZkJ4,1526
58
58
  odoo/addons/account_financial_report/report/templates/open_items.xml,sha256=ku84beB5mDed_np9YhZuNygaUsdl1E-_AnlUQpq4Yy4,14834
@@ -61,7 +61,7 @@ odoo/addons/account_financial_report/report/templates/vat_report.xml,sha256=2WeL
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=YQCXbOuTGHCWGYwGnXMie_0tnWG5zYJGdoeey3o1xaw,382
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=tzDlN4FkJ_I8HbLbNJ-HeJtXdoD0NjVPsAMBqtbw7zM,19748
64
+ odoo/addons/account_financial_report/static/description/index.html,sha256=r5ui6b-UHiJTa-54ZS0G2dwHLL0S6mYvCqENohL7KzM,19748
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=YdJr9
98
98
  odoo/addons/account_financial_report/wizard/trial_balance_wizard_view.xml,sha256=io5d8plYx9YktR79IJMoENQU1CV1HPwdBVamAN4zt7Y,7277
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-17.0.1.6.6.dist-info/METADATA,sha256=M84ePwmlJlhTLit7SO1giaGmnE-ib05CYPowa4OjsTA,7565
102
- odoo_addon_account_financial_report-17.0.1.6.6.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
103
- odoo_addon_account_financial_report-17.0.1.6.6.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
104
- odoo_addon_account_financial_report-17.0.1.6.6.dist-info/RECORD,,
101
+ odoo_addon_account_financial_report-17.0.1.6.8.dist-info/METADATA,sha256=0OrsiMVBjDVbBRTp2VZ8Jjldve2dakCulF9RtCkbMS4,7565
102
+ odoo_addon_account_financial_report-17.0.1.6.8.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
103
+ odoo_addon_account_financial_report-17.0.1.6.8.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
104
+ odoo_addon_account_financial_report-17.0.1.6.8.dist-info/RECORD,,