odoo-addon-account-reconcile-oca 16.0.2.2.4.2__py3-none-any.whl → 16.0.2.2.5__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.
@@ -7,7 +7,7 @@ Account Reconcile Oca
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:f1380712a90ddc273dc735f694fa67586b925e76a980c6a740cfc77dec728814
10
+ !! source digest: sha256:1efc41a850db55e548b628c0fe82f9c6ced51095d7a8057ab7e85a5436294945
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -5,7 +5,7 @@
5
5
  "name": "Account Reconcile Oca",
6
6
  "summary": """
7
7
  Reconcile addons for Odoo CE accounting""",
8
- "version": "16.0.2.2.4",
8
+ "version": "16.0.2.2.5",
9
9
  "license": "AGPL-3",
10
10
  "author": "CreuBlanca,Dixmit,Odoo Community Association (OCA)",
11
11
  "maintainers": ["etobella"],
@@ -537,6 +537,8 @@ class AccountBankStatementLine(models.Model):
537
537
  def _reconcile_data_by_model(self, data, reconcile_model, reconcile_auxiliary_id):
538
538
  new_data = []
539
539
  liquidity_amount = 0.0
540
+ currency = self._get_reconcile_currency()
541
+ currency_amount = False
540
542
  default_name = ""
541
543
  for line_data in data:
542
544
  if line_data["kind"] == "suspense":
@@ -555,6 +557,13 @@ class AccountBankStatementLine(models.Model):
555
557
  amount = self.foreign_currency_id.compute(
556
558
  amount, self.journal_id.currency_id or self.company_currency_id
557
559
  )
560
+ if currency != self.company_id.currency_id:
561
+ currency_amount = self.company_id.currency_id._convert(
562
+ amount,
563
+ currency,
564
+ self.company_id,
565
+ self.date,
566
+ )
558
567
  new_line.update(
559
568
  {
560
569
  "reference": "reconcile_auxiliary;%s" % reconcile_auxiliary_id,
@@ -567,9 +576,9 @@ class AccountBankStatementLine(models.Model):
567
576
  .browse(line["account_id"])
568
577
  .name_get()[0],
569
578
  "date": fields.Date.to_string(self.date),
570
- "line_currency_id": self.company_id.currency_id.id,
579
+ "line_currency_id": currency.id,
571
580
  "currency_id": self.company_id.currency_id.id,
572
- "currency_amount": amount,
581
+ "currency_amount": currency_amount or amount,
573
582
  "name": line.get("name") or self.payment_ref,
574
583
  }
575
584
  )
@@ -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:f1380712a90ddc273dc735f694fa67586b925e76a980c6a740cfc77dec728814
370
+ !! source digest: sha256:1efc41a850db55e548b628c0fe82f9c6ced51095d7a8057ab7e85a5436294945
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-reconcile/tree/16.0/account_reconcile_oca"><img alt="OCA/account-reconcile" src="https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_reconcile_oca"><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-reconcile&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 addon allows to reconcile bank statements and account marked as <cite>reconcile</cite>.</p>
@@ -613,6 +613,57 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
613
613
  self.assertTrue(reconcile_move.reversal_move_id)
614
614
  self.assertFalse(bank_stmt_line.is_reconciled)
615
615
 
616
+ def test_reconcile_model_with_foreign_currency(self):
617
+ """
618
+ We want to test what happens when we select a reconcile model to fill a
619
+ bank statement with a foreign currency.
620
+ """
621
+ bank_stmt = self.acc_bank_stmt_model.create(
622
+ {
623
+ "journal_id": self.bank_journal_usd.id,
624
+ "date": time.strftime("%Y-07-15"),
625
+ "name": "test",
626
+ }
627
+ )
628
+ bank_stmt_line = self.acc_bank_stmt_line_model.create(
629
+ {
630
+ "name": "testLine",
631
+ "journal_id": self.bank_journal_usd.id,
632
+ "statement_id": bank_stmt.id,
633
+ "amount": 100,
634
+ "date": time.strftime("%Y-07-15"),
635
+ }
636
+ )
637
+ with Form(
638
+ bank_stmt_line,
639
+ view="account_reconcile_oca.bank_statement_line_form_reconcile_view",
640
+ ) as f:
641
+ self.assertFalse(f.can_reconcile)
642
+ f.manual_model_id = self.rule
643
+ self.assertTrue(f.can_reconcile)
644
+ number_of_lines = len(bank_stmt_line.reconcile_data_info["data"])
645
+ bank_stmt_line.reconcile_bank_line()
646
+ self.assertEqual(
647
+ number_of_lines, len(bank_stmt_line.reconcile_data_info["data"])
648
+ )
649
+ self.assertEqual(2, len(bank_stmt_line.move_id.line_ids))
650
+ self.assertTrue(
651
+ bank_stmt_line.move_id.line_ids.filtered(
652
+ lambda r: r.account_id == self.current_assets_account
653
+ )
654
+ )
655
+ expected_amount = bank_stmt_line._get_reconcile_currency()._convert(
656
+ bank_stmt_line.amount,
657
+ bank_stmt_line.company_id.currency_id,
658
+ bank_stmt_line.company_id,
659
+ bank_stmt_line.date,
660
+ )
661
+ self.assertEqual(
662
+ bank_stmt_line.move_id.line_ids[0].amount_currency, bank_stmt_line.amount
663
+ )
664
+ self.assertEqual(bank_stmt_line.move_id.line_ids[0].debit, expected_amount)
665
+ self.assertEqual(bank_stmt_line.move_id.line_ids[1].credit, expected_amount)
666
+
616
667
  # Testing to check functionality
617
668
 
618
669
  def test_reconcile_invoice_to_check_reconciled(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-account_reconcile_oca
3
- Version: 16.0.2.2.4.2
3
+ Version: 16.0.2.2.5
4
4
  Summary: Reconcile addons for Odoo CE accounting
5
5
  Home-page: https://github.com/OCA/account-reconcile
6
6
  Author: CreuBlanca,Dixmit,Odoo Community Association (OCA)
@@ -23,7 +23,7 @@ Account Reconcile Oca
23
23
  !! This file is generated by oca-gen-addon-readme !!
24
24
  !! changes will be overwritten. !!
25
25
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
26
- !! source digest: sha256:f1380712a90ddc273dc735f694fa67586b925e76a980c6a740cfc77dec728814
26
+ !! source digest: sha256:1efc41a850db55e548b628c0fe82f9c6ced51095d7a8057ab7e85a5436294945
27
27
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28
28
 
29
29
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,6 +1,6 @@
1
- odoo/addons/account_reconcile_oca/README.rst,sha256=on5GVO1vh-PdltBPF5mruiWlPR67PVQxobTxQMGQ7v4,3709
1
+ odoo/addons/account_reconcile_oca/README.rst,sha256=FciE2aqGy_IXmCPxNl8aAIAWFSz9jLgLRH9HTUxvK_o,3709
2
2
  odoo/addons/account_reconcile_oca/__init__.py,sha256=vqRYeBgCVZMpZhYvILSxVsNLC9V7zDnvxMnKU8RQP94,55
3
- odoo/addons/account_reconcile_oca/__manifest__.py,sha256=C9Kqrs7ZxBiFLcOBdvoYe1U9wqSTi-45JUT9BXWESKk,1826
3
+ odoo/addons/account_reconcile_oca/__manifest__.py,sha256=srTl7F1qbweUBgPc97c8ZJ1TU0SUjSUqHMF8gLuXhmk,1826
4
4
  odoo/addons/account_reconcile_oca/hooks.py,sha256=l2-vYiPh-Wu_4Hi3GvfoUmc527S-Jozb07-DbP6LzDA,187
5
5
  odoo/addons/account_reconcile_oca/demo/demo.xml,sha256=6k0uK-H1aBiyogVNhQMQfFGL5zUfUGV2M-sSV6LHeUs,204
6
6
  odoo/addons/account_reconcile_oca/i18n/account_reconcile_oca.pot,sha256=UOXZfULkd2lLxY1q6OJb-D4C8KqXV1U-7eG_52CP5lU,26737
@@ -18,7 +18,7 @@ odoo/addons/account_reconcile_oca/migrations/16.0.1.2.0/pre-migration.py,sha256=
18
18
  odoo/addons/account_reconcile_oca/models/__init__.py,sha256=28wbZjUZa30uHQY10BMJtKQ_BqJgwLQMQvB9uv0H_fY,282
19
19
  odoo/addons/account_reconcile_oca/models/account_account_reconcile.py,sha256=XGTsmZSUVyxp4XAjE2Q7f6nNAdONUOQS6GrCKI0pG7g,6882
20
20
  odoo/addons/account_reconcile_oca/models/account_bank_statement.py,sha256=CFqlLLtmTqmt5yH3v_pkUfkZezSb1nEhBTu2J5gCjxM,1034
21
- odoo/addons/account_reconcile_oca/models/account_bank_statement_line.py,sha256=WnKMzr6w8xlmpLzCMp6x98AjEAnHZVYNJyTbWecgECI,47029
21
+ odoo/addons/account_reconcile_oca/models/account_bank_statement_line.py,sha256=hUs7RhKD_rYl3pmyIVBcU6oWM4_ATgTOTzVaUJOsNyk,47383
22
22
  odoo/addons/account_reconcile_oca/models/account_journal.py,sha256=8vluuQ0q0rGmVnJWyaSOAhTD0WZQuawKNqhUCEEYRvo,1306
23
23
  odoo/addons/account_reconcile_oca/models/account_move_line.py,sha256=yLNHitduzhS5ShrWWw31S5zirIadFsG8ga1gtXehRTc,1213
24
24
  odoo/addons/account_reconcile_oca/models/account_reconcile_abstract.py,sha256=Q4TRiGluDU_t-oXfgEeNh9FbLqBoEDvAT0SH_5jIJ7U,4944
@@ -30,7 +30,7 @@ odoo/addons/account_reconcile_oca/readme/ROADMAP.rst,sha256=MlQ8cFQmu5MzBoFW2WP_
30
30
  odoo/addons/account_reconcile_oca/readme/USAGE.rst,sha256=npPsx_C8T-JuCEJiTK4V44_5Io1j4ltO831T3yHFuCs,396
31
31
  odoo/addons/account_reconcile_oca/security/ir.model.access.csv,sha256=XfN2EKOoChlEDonVd5DtodVAQyRbShiJ8nrXx6EwNmM,339
32
32
  odoo/addons/account_reconcile_oca/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
33
- odoo/addons/account_reconcile_oca/static/description/index.html,sha256=-xplFcW3z455IhbJiJjcGh-0Do68UkQQ0M6m-LRwXTQ,13829
33
+ odoo/addons/account_reconcile_oca/static/description/index.html,sha256=dAeDxaRgzfZZVZbUAtSHD7VfuzAftQ7kb6aejZ_MIWE,13829
34
34
  odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_controller.esm.js,sha256=4bw-Dc1pmVx6sv-fBzyPfBj-rZrqFUVZ8C19n9Pfpi0,4880
35
35
  odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_kanban_record.esm.js,sha256=ewNK1VQgFZWccTiyJMKYkOG6KtbHHVnI2pdNy9kjkig,467
36
36
  odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_renderer.esm.js,sha256=jm7p1yKiSw7oz32IZ_uwjFOMMz77sxicv-zPomVVt4U,2157
@@ -52,7 +52,7 @@ odoo/addons/account_reconcile_oca/static/src/scss/reconcile.scss,sha256=cQoernco
52
52
  odoo/addons/account_reconcile_oca/static/src/xml/reconcile.xml,sha256=0ohTUpO2Jpo4Je-tsq2HCYMoRRukAz5kWlan_sWXgts,9327
53
53
  odoo/addons/account_reconcile_oca/tests/__init__.py,sha256=8JhP4auByShS8Z_Ik5dShMuWdh1kBlYP_DLI4Ku8XWA,79
54
54
  odoo/addons/account_reconcile_oca/tests/test_account_reconcile.py,sha256=opQs4FgChPdphc25Jzs07TuYxoVGBCj6IAPueMLNkH0,10576
55
- odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py,sha256=OicOa6O23KT8IsWlRKnXcoE4LAB-Iu-Udh2r3pQzFeQ,48599
55
+ odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py,sha256=kVdthue1OS9O5gXWaPZbAbNBrf0k8aQUJTcQcpvlucU,50646
56
56
  odoo/addons/account_reconcile_oca/views/account_account.xml,sha256=Z6S9dDF2CnaSl8CYw69dxJiuVznJZzZX2BrhaDeMP3c,916
57
57
  odoo/addons/account_reconcile_oca/views/account_account_reconcile.xml,sha256=yGOV7nOj5dVwp09ItOIfvNiBQrO_FpAC36gcnjI98JE,7066
58
58
  odoo/addons/account_reconcile_oca/views/account_bank_statement.xml,sha256=e8ojLqYeZaMdTj-F0QdmFST4ICAlaKV66SJPkHXCdEU,2473
@@ -61,7 +61,7 @@ odoo/addons/account_reconcile_oca/views/account_journal.xml,sha256=WQGxMPgl4Um-I
61
61
  odoo/addons/account_reconcile_oca/views/account_move.xml,sha256=qMXpycJJfaztyToulMmLY1NF2UDL2lcZM-m1tTiAoRY,995
62
62
  odoo/addons/account_reconcile_oca/views/account_move_line.xml,sha256=BfObEwM6vXHMtxOFMOGDdCPOWO4ybz3w1_fm4_ufqM0,5274
63
63
  odoo/addons/account_reconcile_oca/views/res_config_settings.xml,sha256=hL06Z_0Eg96LU6ta7VHRaheUDehJ6tVexBjU6X52Vng,1412
64
- odoo_addon_account_reconcile_oca-16.0.2.2.4.2.dist-info/METADATA,sha256=P5OUge6mdqUvDPFbH9-EvXR5TeXyJDm69L8F5JthZSg,4324
65
- odoo_addon_account_reconcile_oca-16.0.2.2.4.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
66
- odoo_addon_account_reconcile_oca-16.0.2.2.4.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
67
- odoo_addon_account_reconcile_oca-16.0.2.2.4.2.dist-info/RECORD,,
64
+ odoo_addon_account_reconcile_oca-16.0.2.2.5.dist-info/METADATA,sha256=LGNEevLx5g2cuMajP0eE1QlXO2VL5NrdddP-BTo1wds,4322
65
+ odoo_addon_account_reconcile_oca-16.0.2.2.5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
66
+ odoo_addon_account_reconcile_oca-16.0.2.2.5.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
67
+ odoo_addon_account_reconcile_oca-16.0.2.2.5.dist-info/RECORD,,