odoo-addon-account-reconcile-oca 16.0.2.4.5__py3-none-any.whl → 16.0.2.4.6__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:d7b62bcfd1d952ceafbb837b69fc28ffc0361bf1bdbb82e86b293dbb02247582
15
15
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
16
 
17
17
  .. |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.4.5",
8
+ "version": "16.0.2.4.6",
9
9
  "license": "AGPL-3",
10
10
  "author": "CreuBlanca,Dixmit,Odoo Community Association (OCA)",
11
11
  "maintainers": ["etobella"],
@@ -752,7 +752,7 @@ class AccountBankStatementLine(models.Model):
752
752
  data += lines
753
753
  else:
754
754
  reconcile_auxiliary_id, lines = self._get_reconcile_line(
755
- line, "other", from_unreconcile=False
755
+ line, "other", from_unreconcile=False, is_reconciled=True
756
756
  )
757
757
  data += lines
758
758
 
@@ -1162,6 +1162,7 @@ class AccountBankStatementLine(models.Model):
1162
1162
  from_unreconcile=False,
1163
1163
  reconcile_auxiliary_id=False,
1164
1164
  move=False,
1165
+ is_reconciled=False,
1165
1166
  ):
1166
1167
  new_vals = super()._get_reconcile_line(
1167
1168
  line,
@@ -1170,6 +1171,7 @@ class AccountBankStatementLine(models.Model):
1170
1171
  max_amount=max_amount,
1171
1172
  from_unreconcile=from_unreconcile,
1172
1173
  move=move,
1174
+ is_reconciled=is_reconciled,
1173
1175
  )
1174
1176
  rates = []
1175
1177
  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_residual_currency or -line.amount_residual
85
88
  else:
86
89
  currency_amount = self.amount_currency or self.amount
87
90
  line_currency = self._get_reconcile_currency()
@@ -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:d7b62bcfd1d952ceafbb837b69fc28ffc0361bf1bdbb82e86b293dbb02247582
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>
@@ -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.
@@ -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.6
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:d7b62bcfd1d952ceafbb837b69fc28ffc0361bf1bdbb82e86b293dbb02247582
31
31
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
32
32
 
33
33
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,6 +1,6 @@
1
- odoo/addons/account_reconcile_oca/README.rst,sha256=8fv79qeEtqi5BQ4nEsWsspF3M8Z23YB1J5q0EWZz4V8,4210
1
+ odoo/addons/account_reconcile_oca/README.rst,sha256=nrDQTSgCFB0xUU0Wxosxl8A4cW78rzWRkEsscF-ulek,4210
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=vqH7V2u0g5TJz4q2qaZReFgDupZcuHgAwkAarEkVGEg,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,10 +19,10 @@ 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=50dnhSPUE0oGCUWQn9Hx_4CnlxuSs9I--70N4AAAggE,53044
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=Mcgzu6E2HZ5tySABMFXquMYMs6OiGq6wqEuTbBFFRp0,5176
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
@@ -32,7 +32,7 @@ odoo/addons/account_reconcile_oca/readme/USAGE.rst,sha256=Vr2Odh3VlB7F-pWq5CqnP5
32
32
  odoo/addons/account_reconcile_oca/security/ir.model.access.csv,sha256=XfN2EKOoChlEDonVd5DtodVAQyRbShiJ8nrXx6EwNmM,339
33
33
  odoo/addons/account_reconcile_oca/security/security.xml,sha256=i978n9S9IyLCKqJRvw4gBy8mQBf2-QTPyVu8cRyDuVc,385
34
34
  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
35
+ odoo/addons/account_reconcile_oca/static/description/index.html,sha256=sIqkBvkAZjAV7ol3tRlWKbeTrnvmfsdrvrn51bEU5PY,14397
36
36
  odoo/addons/account_reconcile_oca/static/description/reconcile-model-full.png,sha256=gzF5JHp5XjYi7VWFIknCzEIYDlfUKkeeH0nCFR2KLNU,135838
37
37
  odoo/addons/account_reconcile_oca/static/description/reconcile-model-partial.png,sha256=YXlvsPVtDcHZvwv5yZfHGeyMvmxngzGsQWPicrLpFds,137158
38
38
  odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_controller.esm.js,sha256=4bw-Dc1pmVx6sv-fBzyPfBj-rZrqFUVZ8C19n9Pfpi0,4880
@@ -56,7 +56,7 @@ odoo/addons/account_reconcile_oca/static/src/scss/reconcile.scss,sha256=cQoernco
56
56
  odoo/addons/account_reconcile_oca/static/src/xml/reconcile.xml,sha256=aBm6PxYfEciRO8tmtoj955h8pDzKFjFN_0MXWbaAZSY,9671
57
57
  odoo/addons/account_reconcile_oca/tests/__init__.py,sha256=8JhP4auByShS8Z_Ik5dShMuWdh1kBlYP_DLI4Ku8XWA,79
58
58
  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
59
+ odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py,sha256=bTCdra7YSdNl16XpoktTaltFYlu2T1L7B2uiF7gvdys,53967
60
60
  odoo/addons/account_reconcile_oca/views/account_account.xml,sha256=Z6S9dDF2CnaSl8CYw69dxJiuVznJZzZX2BrhaDeMP3c,916
61
61
  odoo/addons/account_reconcile_oca/views/account_account_reconcile.xml,sha256=yGOV7nOj5dVwp09ItOIfvNiBQrO_FpAC36gcnjI98JE,7066
62
62
  odoo/addons/account_reconcile_oca/views/account_bank_statement.xml,sha256=e8ojLqYeZaMdTj-F0QdmFST4ICAlaKV66SJPkHXCdEU,2473
@@ -65,7 +65,7 @@ odoo/addons/account_reconcile_oca/views/account_journal.xml,sha256=WQGxMPgl4Um-I
65
65
  odoo/addons/account_reconcile_oca/views/account_move.xml,sha256=qMXpycJJfaztyToulMmLY1NF2UDL2lcZM-m1tTiAoRY,995
66
66
  odoo/addons/account_reconcile_oca/views/account_move_line.xml,sha256=BfObEwM6vXHMtxOFMOGDdCPOWO4ybz3w1_fm4_ufqM0,5274
67
67
  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,,
68
+ odoo_addon_account_reconcile_oca-16.0.2.4.6.dist-info/METADATA,sha256=u7qYfGGxzLB5akkrMynrB4fk9gzUa66fGL2od__NmA8,4823
69
+ odoo_addon_account_reconcile_oca-16.0.2.4.6.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
70
+ odoo_addon_account_reconcile_oca-16.0.2.4.6.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
71
+ odoo_addon_account_reconcile_oca-16.0.2.4.6.dist-info/RECORD,,