odoo-addon-account-financial-report 17.0.1.2.2.1__py3-none-any.whl → 17.0.1.3.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:2cfcb2789ca53b3e10e1577d755411be40b91c53c173201d09636390ee996722
10
+ !! source digest: sha256:b57b7189ea7d3362282f559f21ca4494dcb92e5790acedf8a713f6d07ea225d6
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.2.2",
9
+ "version": "17.0.1.3.0",
10
10
  "category": "Reporting",
11
11
  "summary": "OCA Financial Reports",
12
12
  "author": "Camptocamp,"
@@ -3,6 +3,7 @@
3
3
  from collections import defaultdict
4
4
 
5
5
  from odoo import api, fields, models
6
+ from odoo.fields import Command
6
7
 
7
8
 
8
9
  class AccountMoveLine(models.Model):
@@ -15,25 +16,25 @@ class AccountMoveLine(models.Model):
15
16
  @api.depends("analytic_distribution")
16
17
  def _compute_analytic_account_ids(self):
17
18
  # Prefetch all involved analytic accounts
18
- with_distribution = self.filtered("analytic_distribution")
19
- batch_by_analytic_account = defaultdict(list)
20
- for record in with_distribution:
21
- for account_id in map(int, record.analytic_distribution):
22
- batch_by_analytic_account[account_id].append(record.id)
19
+ batch_by_analytic_account = defaultdict(lambda: self.env["account.move.line"])
20
+ for record in self.filtered("analytic_distribution"):
21
+ # NB: ``analytic_distribution`` is a JSON field where keys can be either
22
+ # 'account.id' or 'account.id,account.id'
23
+ # Eg: https://github.com/odoo/odoo/blob/8479b4e/addons/sale/models/account_move_line.py#L158
24
+ for key in record.analytic_distribution:
25
+ for account_id in map(int, key.split(",")):
26
+ batch_by_analytic_account[account_id] += record
23
27
  existing_account_ids = set(
24
28
  self.env["account.analytic.account"]
25
- .browse(map(int, batch_by_analytic_account))
29
+ .browse(batch_by_analytic_account)
26
30
  .exists()
27
31
  .ids
28
32
  )
29
33
  # Store them
30
- self.analytic_account_ids = False
31
- for account_id, record_ids in batch_by_analytic_account.items():
32
- if account_id not in existing_account_ids:
33
- continue
34
- self.browse(record_ids).analytic_account_ids = [
35
- fields.Command.link(account_id)
36
- ]
34
+ self.analytic_account_ids = [Command.clear()]
35
+ for account_id, records in batch_by_analytic_account.items():
36
+ if account_id in existing_account_ids:
37
+ records.analytic_account_ids = [Command.link(account_id)]
37
38
 
38
39
  def init(self):
39
40
  """
@@ -142,10 +142,11 @@ class GeneralLedgerXslx(models.AbstractModel):
142
142
  analytic_data = res_data["analytic_data"]
143
143
  filter_partner_ids = res_data["filter_partner_ids"]
144
144
  foreign_currency = res_data["foreign_currency"]
145
+ company_currency = res_data["company_currency"]
145
146
  # For each account
146
147
  for account in general_ledger:
147
148
  # Write account title
148
- total_bal_curr = account["init_bal"].get("bal_curr", 0)
149
+ total_bal_curr = 0
149
150
  self.write_array_title(
150
151
  account["code"] + " - " + accounts_data[account["id"]]["name"],
151
152
  report_data,
@@ -163,7 +164,7 @@ class GeneralLedgerXslx(models.AbstractModel):
163
164
  "initial_balance": account["init_bal"]["balance"],
164
165
  }
165
166
  )
166
- if foreign_currency:
167
+ if foreign_currency and account["currency_id"]:
167
168
  account.update(
168
169
  {"initial_bal_curr": account["init_bal"]["bal_curr"]}
169
170
  )
@@ -177,7 +178,10 @@ class GeneralLedgerXslx(models.AbstractModel):
177
178
  "journal": journals_data[line["journal_id"]]["code"],
178
179
  }
179
180
  )
180
- if line["currency_id"]:
181
+ line_currency_id = (
182
+ line["currency_id"][0] if line["currency_id"] else False
183
+ )
184
+ if line_currency_id and line_currency_id != company_currency.id:
181
185
  line.update(
182
186
  {
183
187
  "currency_name": line["currency_id"][1],
@@ -207,7 +211,11 @@ class GeneralLedgerXslx(models.AbstractModel):
207
211
  "analytic_distribution": analytic_distribution,
208
212
  }
209
213
  )
210
- if foreign_currency:
214
+ if (
215
+ foreign_currency
216
+ and line_currency_id
217
+ and line_currency_id != company_currency.id
218
+ ):
211
219
  total_bal_curr += line["bal_curr"]
212
220
  line.update({"total_bal_curr": total_bal_curr})
213
221
  self.write_line_from_dict(line, report_data)
@@ -219,7 +227,7 @@ class GeneralLedgerXslx(models.AbstractModel):
219
227
  "final_balance": account["fin_bal"]["balance"],
220
228
  }
221
229
  )
222
- if foreign_currency:
230
+ if foreign_currency and account["currency_id"]:
223
231
  account.update(
224
232
  {
225
233
  "final_bal_curr": account["fin_bal"]["bal_curr"],
@@ -262,7 +270,7 @@ class GeneralLedgerXslx(models.AbstractModel):
262
270
  ],
263
271
  }
264
272
  )
265
- if foreign_currency:
273
+ if foreign_currency and account["currency_id"]:
266
274
  group_item.update(
267
275
  {
268
276
  "initial_bal_curr": group_item["init_bal"]["bal_curr"],
@@ -278,7 +286,10 @@ class GeneralLedgerXslx(models.AbstractModel):
278
286
  "journal": journals_data[line["journal_id"]]["code"],
279
287
  }
280
288
  )
281
- if line["currency_id"]:
289
+ line_currency_id = (
290
+ line["currency_id"][0] if line["currency_id"] else False
291
+ )
292
+ if line_currency_id and line_currency_id != company_currency.id:
282
293
  line.update(
283
294
  {
284
295
  "currency_name": line["currency_id"][1],
@@ -310,7 +321,11 @@ class GeneralLedgerXslx(models.AbstractModel):
310
321
  "analytic_distribution": analytic_distribution,
311
322
  }
312
323
  )
313
- if foreign_currency:
324
+ if (
325
+ foreign_currency
326
+ and line_currency_id
327
+ and line_currency_id != company_currency.id
328
+ ):
314
329
  total_bal_curr += line["bal_curr"]
315
330
  line.update({"total_bal_curr": total_bal_curr})
316
331
  self.write_line_from_dict(line, report_data)
@@ -367,10 +367,7 @@
367
367
  </t>
368
368
  </div>
369
369
  <!-- Display each lines -->
370
- <t
371
- t-set="total_bal_curr"
372
- t-value="account_or_group_item_object['init_bal'].get('bal_curr', 0)"
373
- />
370
+ <t t-set="total_bal_curr" t-value="0" />
374
371
  <t t-foreach="account_or_group_item_object['move_lines']" t-as="line">
375
372
  <!-- # lines or centralized lines -->
376
373
  <div class="act_as_row lines">
@@ -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:2cfcb2789ca53b3e10e1577d755411be40b91c53c173201d09636390ee996722
370
+ !! source digest: sha256:b57b7189ea7d3362282f559f21ca4494dcb92e5790acedf8a713f6d07ea225d6
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.2.2.1
3
+ Version: 17.0.1.3.0
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:2cfcb2789ca53b3e10e1577d755411be40b91c53c173201d09636390ee996722
27
+ !! source digest: sha256:b57b7189ea7d3362282f559f21ca4494dcb92e5790acedf8a713f6d07ea225d6
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=Soot57KoFz9dx52Vh0-lG9oGAD4hjNRGd0P5Yji_ON0,6949
1
+ odoo/addons/account_financial_report/README.rst,sha256=v52RHplucHdzVBWxNwfWNNoK1kVY9VQmKBRkvVTDVew,6949
2
2
  odoo/addons/account_financial_report/__init__.py,sha256=YoL8hk5QxSifbFJL7gPzpOSk-3zB1OSHJBXyZK25G6Q,187
3
- odoo/addons/account_financial_report/__manifest__.py,sha256=lnXzZoEUqeeLX4m-jcIdzxC9kFsIPhRDoOjzb2v3OMY,2061
3
+ odoo/addons/account_financial_report/__manifest__.py,sha256=uwyqgMgaNfKKA2oqBK1I_nE8gqPGgpKiQAJtImvh9dk,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=3u0yX4w7rqGFyV0MgNO0c3GW8PwiSoezcKTTS4OUT_g,81933
@@ -28,7 +28,7 @@ odoo/addons/account_financial_report/models/__init__.py,sha256=KCE4mRzM1HSu4Mjg3
28
28
  odoo/addons/account_financial_report/models/account.py,sha256=OCWn264dEtfxbV0rVKR1dqz38Jy3SoS_9XZ0ChK_7eA,422
29
29
  odoo/addons/account_financial_report/models/account_age_report_configuration.py,sha256=U5Xr0uAD696TohTCkKsY3HZDYAfVrlocTIGYzr2JlkA,1664
30
30
  odoo/addons/account_financial_report/models/account_group.py,sha256=q0RpVwqZQiSFoQ03ltTe6XEokIa2f1qLAfuPCJgQ_iY,2385
31
- odoo/addons/account_financial_report/models/account_move_line.py,sha256=LNjmv_T5jhmiuVxMlNrEMKSULDGfJ0kznsYo1UJ-x1A,2705
31
+ odoo/addons/account_financial_report/models/account_move_line.py,sha256=TabkIR2E0YSPkc_jgCKz6_7UOuZ0ryjYWXSwS4Ofwn0,2928
32
32
  odoo/addons/account_financial_report/models/ir_actions_report.py,sha256=wq-rx2bpI6odJ4-PQR5aellrM9740n5WN4tf1IKdlj0,1074
33
33
  odoo/addons/account_financial_report/models/res_config_settings.py,sha256=7b6qOl9jmC-eJF8vTA9wbefs6C8cn_Jp8hJBq_o6mvk,443
34
34
  odoo/addons/account_financial_report/readme/CONFIGURE.md,sha256=gTsDroUsSEy4stKQpIO7Y3inHh8YClbJ634HY7vREUg,901
@@ -42,7 +42,7 @@ odoo/addons/account_financial_report/report/abstract_report_xlsx.py,sha256=-T02-
42
42
  odoo/addons/account_financial_report/report/aged_partner_balance.py,sha256=OdmuOt05QpJ8FOG0DC_LeMCGdqArAQ4ndGSFuEMOEmw,19959
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=GM_RoxP_7p4lXDVJxqx6s6g8N_8bSY49MXs7gkXAcus,34835
45
- odoo/addons/account_financial_report/report/general_ledger_xlsx.py,sha256=afGxtz9wHTBQ3awcDSBPxOL7eI2pejIEnIoIET8UPzw,16448
45
+ odoo/addons/account_financial_report/report/general_ledger_xlsx.py,sha256=qn89GrGmpsEQoC6eBFbXImYfxQq-_OpgzXL5hF1LgqM,17268
46
46
  odoo/addons/account_financial_report/report/journal_ledger.py,sha256=5_w9CmKy_eZNgJsSL1TFTTe5b3DBBEY1qmseI1RuGPI,15424
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=WFM3dCgM2iPpsfV80mbY4wtW0aZHvM9vmQviz97-ItQ,11915
@@ -52,7 +52,7 @@ odoo/addons/account_financial_report/report/trial_balance_xlsx.py,sha256=-DcUdiC
52
52
  odoo/addons/account_financial_report/report/vat_report.py,sha256=H0k2uhDK_X3el1gVXA_lBUoj2dO1u104rjaWBcWLpnk,10131
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=ne1YtEyTqvTV4Oxu54L1vVOheBOtcPGl-R_pVUD7Rlc,39228
55
+ odoo/addons/account_financial_report/report/templates/general_ledger.xml,sha256=a6uJkXdcFJNiQ2cCTtFXsarYppAjP9HYRjzTRVZbLOo,39126
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=npTZgmgkcngN3tD_cj8j2KIaour2HNm08wRMcvxIXLg,19748
64
+ odoo/addons/account_financial_report/static/description/index.html,sha256=jZPXARQel0lR1fL0fRzkgfO8pElay1LK99LEDhF-r7k,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=zTC-j
98
98
  odoo/addons/account_financial_report/wizard/trial_balance_wizard_view.xml,sha256=HmwfFnzmQvw0wOILH2J1kY3aM8IGZKMBa7CHmMOigiQ,6577
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.2.2.1.dist-info/METADATA,sha256=jL-yMdZZXvtTYeZxZSf_7Kr0GaACaSbi6tzzIcNkQLg,7628
102
- odoo_addon_account_financial_report-17.0.1.2.2.1.dist-info/WHEEL,sha256=8Rd4enx1PCuyDWP4SABqO5Fv8rpaknqp3VzjoFFLa6c,83
103
- odoo_addon_account_financial_report-17.0.1.2.2.1.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
104
- odoo_addon_account_financial_report-17.0.1.2.2.1.dist-info/RECORD,,
101
+ odoo_addon_account_financial_report-17.0.1.3.0.dist-info/METADATA,sha256=TSUBPI4yBhHg-dNUPT9K7FJ5TiRuRrzZlbTlLknuGIk,7626
102
+ odoo_addon_account_financial_report-17.0.1.3.0.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
103
+ odoo_addon_account_financial_report-17.0.1.3.0.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
104
+ odoo_addon_account_financial_report-17.0.1.3.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: Whool 1.0.1
2
+ Generator: Whool 1.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5