odoo-addon-account-reconcile-oca 16.0.2.4.5__py3-none-any.whl → 16.0.2.4.7__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.
@@ -11,7 +11,7 @@ Account Reconcile Oca
11
11
  !! This file is generated by oca-gen-addon-readme !!
12
12
  !! changes will be overwritten. !!
13
13
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
- !! source digest: sha256:7f43bb2d4ad1d32679e7ea973dbe721fc6bebc7e94b4b13f34077b3de87fc9fa
14
+ !! source digest: sha256:13312c9fbbfc16a8a59f7d6184b57e9b3ddc28b0a61fe5ae280f99e5cf8d2940
15
15
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
16
 
17
17
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -93,6 +93,11 @@ Contributors
93
93
 
94
94
  * Enric Tobella
95
95
 
96
+ Other credits
97
+ ~~~~~~~~~~~~~
98
+
99
+ The system has been improved to handle currency amounts more effectively with the financial support of Sygel Technology.
100
+
96
101
  Maintainers
97
102
  ~~~~~~~~~~~
98
103
 
@@ -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.4.5",
8
+ "version": "16.0.2.4.7",
9
9
  "license": "AGPL-3",
10
10
  "author": "CreuBlanca,Dixmit,Odoo Community Association (OCA)",
11
11
  "maintainers": ["etobella"],
@@ -554,7 +554,7 @@ class AccountBankStatementLine(models.Model):
554
554
  @api.depends("reconcile_data", "is_reconciled")
555
555
  def _compute_reconcile_data_info(self):
556
556
  for record in self:
557
- if record.reconcile_data:
557
+ if record.reconcile_data and not record.is_reconciled:
558
558
  record.reconcile_data_info = record.reconcile_data
559
559
  else:
560
560
  record.reconcile_data_info = record._default_reconcile_data(
@@ -713,6 +713,7 @@ class AccountBankStatementLine(models.Model):
713
713
  "other",
714
714
  from_unreconcile=False,
715
715
  move=True,
716
+ is_reconciled=self.is_reconciled,
716
717
  )
717
718
  data += lines
718
719
  continue
@@ -752,7 +753,10 @@ class AccountBankStatementLine(models.Model):
752
753
  data += lines
753
754
  else:
754
755
  reconcile_auxiliary_id, lines = self._get_reconcile_line(
755
- line, "other", from_unreconcile=False
756
+ line,
757
+ "other",
758
+ from_unreconcile=False,
759
+ is_reconciled=self.is_reconciled,
756
760
  )
757
761
  data += lines
758
762
 
@@ -1162,6 +1166,7 @@ class AccountBankStatementLine(models.Model):
1162
1166
  from_unreconcile=False,
1163
1167
  reconcile_auxiliary_id=False,
1164
1168
  move=False,
1169
+ is_reconciled=False,
1165
1170
  ):
1166
1171
  new_vals = super()._get_reconcile_line(
1167
1172
  line,
@@ -1170,6 +1175,7 @@ class AccountBankStatementLine(models.Model):
1170
1175
  max_amount=max_amount,
1171
1176
  from_unreconcile=from_unreconcile,
1172
1177
  move=move,
1178
+ is_reconciled=is_reconciled,
1173
1179
  )
1174
1180
  rates = []
1175
1181
  for vals in new_vals:
@@ -44,6 +44,7 @@ class AccountReconcileAbstract(models.AbstractModel):
44
44
  max_amount=False,
45
45
  from_unreconcile=False,
46
46
  move=False,
47
+ is_reconciled=False,
47
48
  ):
48
49
  date = self.date if "date" in self._fields else line.date
49
50
  original_amount = amount = net_amount = line.debit - line.credit
@@ -82,6 +83,8 @@ class AccountReconcileAbstract(models.AbstractModel):
82
83
  self.company_id,
83
84
  date,
84
85
  )
86
+ elif is_reconciled:
87
+ currency_amount = line.amount_currency
85
88
  else:
86
89
  currency_amount = self.amount_currency or self.amount
87
90
  line_currency = self._get_reconcile_currency()
@@ -0,0 +1 @@
1
+ The system has been improved to handle currency amounts more effectively with the financial support of Sygel Technology.
@@ -372,7 +372,7 @@ ul.auto-toc {
372
372
  !! This file is generated by oca-gen-addon-readme !!
373
373
  !! changes will be overwritten. !!
374
374
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
- !! source digest: sha256:7f43bb2d4ad1d32679e7ea973dbe721fc6bebc7e94b4b13f34077b3de87fc9fa
375
+ !! source digest: sha256:13312c9fbbfc16a8a59f7d6184b57e9b3ddc28b0a61fe5ae280f99e5cf8d2940
376
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
377
  <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/license-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>
378
378
  <p>This addon allows to reconcile bank statements and account marked as <cite>reconcile</cite>.</p>
@@ -389,7 +389,8 @@ ul.auto-toc {
389
389
  <li><a class="reference internal" href="#credits" id="toc-entry-6">Credits</a><ul>
390
390
  <li><a class="reference internal" href="#authors" id="toc-entry-7">Authors</a></li>
391
391
  <li><a class="reference internal" href="#contributors" id="toc-entry-8">Contributors</a></li>
392
- <li><a class="reference internal" href="#maintainers" id="toc-entry-9">Maintainers</a></li>
392
+ <li><a class="reference internal" href="#other-credits" id="toc-entry-9">Other credits</a></li>
393
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-10">Maintainers</a></li>
393
394
  </ul>
394
395
  </li>
395
396
  </ul>
@@ -441,8 +442,12 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
441
442
  <li>Enric Tobella</li>
442
443
  </ul>
443
444
  </div>
445
+ <div class="section" id="other-credits">
446
+ <h3><a class="toc-backref" href="#toc-entry-9">Other credits</a></h3>
447
+ <p>The system has been improved to handle currency amounts more effectively with the financial support of Sygel Technology.</p>
448
+ </div>
444
449
  <div class="section" id="maintainers">
445
- <h3><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h3>
450
+ <h3><a class="toc-backref" href="#toc-entry-10">Maintainers</a></h3>
446
451
  <p>This module is maintained by the OCA.</p>
447
452
  <a class="reference external image-reference" href="https://odoo-community.org">
448
453
  <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
@@ -147,6 +147,66 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
147
147
  self.assertEqual(receivable_line.amount_currency, -100)
148
148
  self.assertEqual(receivable_line.balance, -50)
149
149
 
150
+ def test_two_manual_lines_with_currency(self):
151
+ """We want to test the reconcile widget for bank statements
152
+ on manual lines with foreign currency.
153
+ We enforce the currency rate to be sure that the amounts are correct
154
+ """
155
+ self.env["res.currency.rate"].create(
156
+ {
157
+ "currency_id": self.env.ref("base.USD").id,
158
+ "name": time.strftime("%Y-07-15"),
159
+ "rate": 2,
160
+ }
161
+ )
162
+ bank_stmt = self.acc_bank_stmt_model.create(
163
+ {
164
+ "journal_id": self.bank_journal_euro.id,
165
+ "date": time.strftime("%Y-07-15"),
166
+ "name": "test",
167
+ }
168
+ )
169
+ bank_stmt_line = self.acc_bank_stmt_line_model.create(
170
+ {
171
+ "name": "testLine",
172
+ "journal_id": self.bank_journal_euro.id,
173
+ "statement_id": bank_stmt.id,
174
+ "amount": 50,
175
+ "amount_currency": 100,
176
+ "foreign_currency_id": self.currency_usd_id,
177
+ "date": time.strftime("%Y-07-15"),
178
+ }
179
+ )
180
+ receivable_acc = self.company_data["default_account_receivable"]
181
+ expense_acc = self.company_data["default_account_expense"]
182
+ with Form(
183
+ bank_stmt_line,
184
+ view="account_reconcile_oca.bank_statement_line_form_reconcile_view",
185
+ ) as f:
186
+ self.assertFalse(f.can_reconcile)
187
+ f.manual_reference = "reconcile_auxiliary;1"
188
+ f.manual_account_id = receivable_acc
189
+ f.manual_amount_in_currency = -40
190
+ self.assertFalse(f.can_reconcile)
191
+ f.manual_reference = "reconcile_auxiliary;2"
192
+ f.manual_account_id = expense_acc
193
+ self.assertTrue(f.can_reconcile)
194
+ bank_stmt_line.reconcile_bank_line()
195
+ receivable_line = bank_stmt_line.line_ids.filtered(
196
+ lambda line: line.account_id == receivable_acc
197
+ )
198
+ self.assertEqual(receivable_line.currency_id.id, self.currency_usd_id)
199
+ self.assertEqual(receivable_line.amount_currency, -40)
200
+ self.assertEqual(receivable_line.balance, -20)
201
+ matched_line = False
202
+ for line in bank_stmt_line.reconcile_data_info["data"]:
203
+ if line["id"] == receivable_line.id:
204
+ matched_line = True
205
+ self.assertEqual(line["currency_amount"], -40)
206
+ self.assertEqual(line["amount"], -20)
207
+ break
208
+ self.assertEqual(matched_line, True)
209
+
150
210
  def test_reconcile_invoice_reconcile_full(self):
151
211
  """
152
212
  We want to test the reconcile widget for bank statements on invoices.
@@ -1192,8 +1252,12 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
1192
1252
  self.assertEqual(len(bank_stmt_line.reconcile_data_info["data"]), 3)
1193
1253
  exchange_line = bank_stmt_line.reconcile_data_info["data"][-1]
1194
1254
  self.assertEqual(exchange_line["amount"], 61.42)
1255
+ self.assertEqual(exchange_line["currency_amount"], 0)
1195
1256
  bank_stmt_line.reconcile_bank_line()
1196
1257
  self.assertEqual(inv1.payment_state, "paid")
1258
+ exchange_line = bank_stmt_line.reconcile_data_info["data"][-1]
1259
+ self.assertEqual(exchange_line["amount"], 61.42)
1260
+ self.assertEqual(exchange_line["currency_amount"], 0)
1197
1261
 
1198
1262
  def test_invoice_foreign_currency_change(self):
1199
1263
  self.env["res.currency.rate"].create(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-account_reconcile_oca
3
- Version: 16.0.2.4.5
3
+ Version: 16.0.2.4.7
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)
@@ -27,7 +27,7 @@ Account Reconcile Oca
27
27
  !! This file is generated by oca-gen-addon-readme !!
28
28
  !! changes will be overwritten. !!
29
29
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30
- !! source digest: sha256:7f43bb2d4ad1d32679e7ea973dbe721fc6bebc7e94b4b13f34077b3de87fc9fa
30
+ !! source digest: sha256:13312c9fbbfc16a8a59f7d6184b57e9b3ddc28b0a61fe5ae280f99e5cf8d2940
31
31
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
32
32
 
33
33
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -109,6 +109,11 @@ Contributors
109
109
 
110
110
  * Enric Tobella
111
111
 
112
+ Other credits
113
+ ~~~~~~~~~~~~~
114
+
115
+ The system has been improved to handle currency amounts more effectively with the financial support of Sygel Technology.
116
+
112
117
  Maintainers
113
118
  ~~~~~~~~~~~
114
119
 
@@ -1,6 +1,6 @@
1
- odoo/addons/account_reconcile_oca/README.rst,sha256=8fv79qeEtqi5BQ4nEsWsspF3M8Z23YB1J5q0EWZz4V8,4210
1
+ odoo/addons/account_reconcile_oca/README.rst,sha256=c5z5T3vxVp5BIP_6ly4OXSptFtDuK-GbyXghXSq81ww,4361
2
2
  odoo/addons/account_reconcile_oca/__init__.py,sha256=vqRYeBgCVZMpZhYvILSxVsNLC9V7zDnvxMnKU8RQP94,55
3
- odoo/addons/account_reconcile_oca/__manifest__.py,sha256=C_oY41PGvqRc6sTqD0-CMzoKT1hQlqTjQJMIazAarfY,1859
3
+ odoo/addons/account_reconcile_oca/__manifest__.py,sha256=85zXrn8R3543yDPojW7qPlLnLaPbbAcnt50-ZS_aHX4,1859
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=U3FnhiYPGvtS34Pj9ukKklmAgC5ie3Ywb0br8u6FN9k,27287
@@ -19,20 +19,21 @@ odoo/addons/account_reconcile_oca/migrations/16.0.1.2.0/pre-migration.py,sha256=
19
19
  odoo/addons/account_reconcile_oca/models/__init__.py,sha256=28wbZjUZa30uHQY10BMJtKQ_BqJgwLQMQvB9uv0H_fY,282
20
20
  odoo/addons/account_reconcile_oca/models/account_account_reconcile.py,sha256=kO8O0cfsxwXc--MbaJ12sc9QhOIVMVrl5rYpmnrVO-0,7523
21
21
  odoo/addons/account_reconcile_oca/models/account_bank_statement.py,sha256=CFqlLLtmTqmt5yH3v_pkUfkZezSb1nEhBTu2J5gCjxM,1034
22
- odoo/addons/account_reconcile_oca/models/account_bank_statement_line.py,sha256=DqD1MtRMWgHHweOQqePcdJOAJv3yuODI9ybHyBAiOQo,52954
22
+ odoo/addons/account_reconcile_oca/models/account_bank_statement_line.py,sha256=rI4Un-UQzT7tEmSmNj5gX17EfK_ijRZeEd1pnyHXQrY,53214
23
23
  odoo/addons/account_reconcile_oca/models/account_journal.py,sha256=_nEkPbyL_osFfl-cCXJieLCWv60aPR1QjIc_7kpKaeM,1462
24
24
  odoo/addons/account_reconcile_oca/models/account_move_line.py,sha256=yLNHitduzhS5ShrWWw31S5zirIadFsG8ga1gtXehRTc,1213
25
- odoo/addons/account_reconcile_oca/models/account_reconcile_abstract.py,sha256=ByjBoDd9EECUZNfFGZ1d57QZjnYS8OkKrULNW6zkyg4,5034
25
+ odoo/addons/account_reconcile_oca/models/account_reconcile_abstract.py,sha256=OOzCKZgs_wMHJm1pvzgO5p3paemlLC4Dt4tYtUfClNA,5142
26
26
  odoo/addons/account_reconcile_oca/models/res_company.py,sha256=IlB-zFZnnaNFzeFFQn70qDUCcNXSHvVVlJ7PUneOcjc,1391
27
27
  odoo/addons/account_reconcile_oca/models/res_config_settings.py,sha256=AuenxX0UfqYWWP-QvtB0irSf_JuWVh4a9QylPfl-Lxc,325
28
28
  odoo/addons/account_reconcile_oca/readme/CONTRIBUTORS.rst,sha256=GAYxzAZEN5wTBewMNx4PD2y_QoI-dzpokacQ9NnaEso,16
29
+ odoo/addons/account_reconcile_oca/readme/CREDITS.rst,sha256=zJiSNYKRLokLvhGSsm8yNj5yg74DREisdz1ovGnY_mI,121
29
30
  odoo/addons/account_reconcile_oca/readme/DESCRIPTION.rst,sha256=nc8nUT3VmwXIXvJXpq_hj2MeJzNnpsByDS4G3elJsrU,82
30
31
  odoo/addons/account_reconcile_oca/readme/ROADMAP.rst,sha256=MlQ8cFQmu5MzBoFW2WP_WGKVTLQK-9RCMgCjGT-TAJU,104
31
32
  odoo/addons/account_reconcile_oca/readme/USAGE.rst,sha256=Vr2Odh3VlB7F-pWq5CqnP5kihsCPVWnEhd7EtQfISfg,732
32
33
  odoo/addons/account_reconcile_oca/security/ir.model.access.csv,sha256=XfN2EKOoChlEDonVd5DtodVAQyRbShiJ8nrXx6EwNmM,339
33
34
  odoo/addons/account_reconcile_oca/security/security.xml,sha256=i978n9S9IyLCKqJRvw4gBy8mQBf2-QTPyVu8cRyDuVc,385
34
35
  odoo/addons/account_reconcile_oca/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
35
- odoo/addons/account_reconcile_oca/static/description/index.html,sha256=H-g_z9C8sfjUGd8C9gtBQgD2Te71H-MShICkRLGhV7g,14397
36
+ odoo/addons/account_reconcile_oca/static/description/index.html,sha256=Ni-iiLi4XjL1BXvIqJAT55M8lp8CgxcxzIRpaWe-pnk,14741
36
37
  odoo/addons/account_reconcile_oca/static/description/reconcile-model-full.png,sha256=gzF5JHp5XjYi7VWFIknCzEIYDlfUKkeeH0nCFR2KLNU,135838
37
38
  odoo/addons/account_reconcile_oca/static/description/reconcile-model-partial.png,sha256=YXlvsPVtDcHZvwv5yZfHGeyMvmxngzGsQWPicrLpFds,137158
38
39
  odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_controller.esm.js,sha256=4bw-Dc1pmVx6sv-fBzyPfBj-rZrqFUVZ8C19n9Pfpi0,4880
@@ -56,7 +57,7 @@ odoo/addons/account_reconcile_oca/static/src/scss/reconcile.scss,sha256=cQoernco
56
57
  odoo/addons/account_reconcile_oca/static/src/xml/reconcile.xml,sha256=aBm6PxYfEciRO8tmtoj955h8pDzKFjFN_0MXWbaAZSY,9671
57
58
  odoo/addons/account_reconcile_oca/tests/__init__.py,sha256=8JhP4auByShS8Z_Ik5dShMuWdh1kBlYP_DLI4Ku8XWA,79
58
59
  odoo/addons/account_reconcile_oca/tests/test_account_reconcile.py,sha256=opQs4FgChPdphc25Jzs07TuYxoVGBCj6IAPueMLNkH0,10576
59
- odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py,sha256=36vQlGdKlDTV6anNu3VA5HWTzqSiAUf7gQHdgx1AD3c,51426
60
+ odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py,sha256=0fkG-qHgWosiERv6sz6mz4Z0qYg4JUzTBiEBGF6dxkI,54219
60
61
  odoo/addons/account_reconcile_oca/views/account_account.xml,sha256=Z6S9dDF2CnaSl8CYw69dxJiuVznJZzZX2BrhaDeMP3c,916
61
62
  odoo/addons/account_reconcile_oca/views/account_account_reconcile.xml,sha256=yGOV7nOj5dVwp09ItOIfvNiBQrO_FpAC36gcnjI98JE,7066
62
63
  odoo/addons/account_reconcile_oca/views/account_bank_statement.xml,sha256=e8ojLqYeZaMdTj-F0QdmFST4ICAlaKV66SJPkHXCdEU,2473
@@ -65,7 +66,7 @@ odoo/addons/account_reconcile_oca/views/account_journal.xml,sha256=WQGxMPgl4Um-I
65
66
  odoo/addons/account_reconcile_oca/views/account_move.xml,sha256=qMXpycJJfaztyToulMmLY1NF2UDL2lcZM-m1tTiAoRY,995
66
67
  odoo/addons/account_reconcile_oca/views/account_move_line.xml,sha256=BfObEwM6vXHMtxOFMOGDdCPOWO4ybz3w1_fm4_ufqM0,5274
67
68
  odoo/addons/account_reconcile_oca/views/res_config_settings.xml,sha256=hL06Z_0Eg96LU6ta7VHRaheUDehJ6tVexBjU6X52Vng,1412
68
- odoo_addon_account_reconcile_oca-16.0.2.4.5.dist-info/METADATA,sha256=Gd1leycvlUj-5ng9y3c7BXgNYT4sGPU4s4QCDBoNlvg,4823
69
- odoo_addon_account_reconcile_oca-16.0.2.4.5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
70
- odoo_addon_account_reconcile_oca-16.0.2.4.5.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
71
- odoo_addon_account_reconcile_oca-16.0.2.4.5.dist-info/RECORD,,
69
+ odoo_addon_account_reconcile_oca-16.0.2.4.7.dist-info/METADATA,sha256=YlL6ZF3Y0itCjb4rCum4H0rJdzboW3QqyEq82t3YEis,4974
70
+ odoo_addon_account_reconcile_oca-16.0.2.4.7.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
71
+ odoo_addon_account_reconcile_oca-16.0.2.4.7.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
72
+ odoo_addon_account_reconcile_oca-16.0.2.4.7.dist-info/RECORD,,