odoo-addon-account-reconcile-oca 18.0.1.0.9.2__py3-none-any.whl → 18.0.1.0.10__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:0b40eaa5ada9ccfe5d34c04635be9a951f8ff2a890065045b10fe9d15e1d4f3d
14
+ !! source digest: sha256:a24ed79f8c9d0906e6166fd1509aea72973e375f27b323e62f3751b9aabafed7
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": "18.0.1.0.9",
8
+ "version": "18.0.1.0.10",
9
9
  "license": "AGPL-3",
10
10
  "author": "CreuBlanca,Dixmit,Odoo Community Association (OCA)",
11
11
  "maintainers": ["etobella"],
@@ -758,7 +758,7 @@ class AccountBankStatementLine(models.Model):
758
758
  data += lines
759
759
  else:
760
760
  reconcile_auxiliary_id, lines = self._get_reconcile_line(
761
- line, "other", from_unreconcile=False
761
+ line, "other", from_unreconcile=False, is_reconciled=True
762
762
  )
763
763
  data += lines
764
764
 
@@ -1177,6 +1177,7 @@ class AccountBankStatementLine(models.Model):
1177
1177
  from_unreconcile=False,
1178
1178
  reconcile_auxiliary_id=False,
1179
1179
  move=False,
1180
+ is_reconciled=False,
1180
1181
  ):
1181
1182
  new_vals = super()._get_reconcile_line(
1182
1183
  line,
@@ -1185,6 +1186,7 @@ class AccountBankStatementLine(models.Model):
1185
1186
  max_amount=max_amount,
1186
1187
  from_unreconcile=from_unreconcile,
1187
1188
  move=move,
1189
+ is_reconciled=is_reconciled,
1188
1190
  )
1189
1191
  rates = []
1190
1192
  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:0b40eaa5ada9ccfe5d34c04635be9a951f8ff2a890065045b10fe9d15e1d4f3d
375
+ !! source digest: sha256:a24ed79f8c9d0906e6166fd1509aea72973e375f27b323e62f3751b9aabafed7
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/18.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-18-0/account-reconcile-18-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=18.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
@@ -157,6 +157,66 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
157
157
  self.assertEqual(receivable_line.amount_currency, -100)
158
158
  self.assertEqual(receivable_line.balance, -50)
159
159
 
160
+ def test_two_manual_lines_with_currency(self):
161
+ """We want to test the reconcile widget for bank statements
162
+ on manual lines with foreign currency.
163
+ We enforce the currency rate to be sure that the amounts are correct
164
+ """
165
+ self.env["res.currency.rate"].create(
166
+ {
167
+ "currency_id": self.env.ref("base.USD").id,
168
+ "name": time.strftime("%Y-07-15"),
169
+ "rate": 2,
170
+ }
171
+ )
172
+ bank_stmt = self.acc_bank_stmt_model.create(
173
+ {
174
+ "journal_id": self.bank_journal_euro.id,
175
+ "date": time.strftime("%Y-07-15"),
176
+ "name": "test",
177
+ }
178
+ )
179
+ bank_stmt_line = self.acc_bank_stmt_line_model.create(
180
+ {
181
+ "name": "testLine",
182
+ "journal_id": self.bank_journal_euro.id,
183
+ "statement_id": bank_stmt.id,
184
+ "amount": 50,
185
+ "amount_currency": 100,
186
+ "foreign_currency_id": self.currency_usd_id,
187
+ "date": time.strftime("%Y-07-15"),
188
+ }
189
+ )
190
+ receivable_acc = self.company_data["default_account_receivable"]
191
+ expense_acc = self.company_data["default_account_expense"]
192
+ with Form(
193
+ bank_stmt_line,
194
+ view="account_reconcile_oca.bank_statement_line_form_reconcile_view",
195
+ ) as f:
196
+ self.assertFalse(f.can_reconcile)
197
+ f.manual_reference = "reconcile_auxiliary;1"
198
+ f.manual_account_id = receivable_acc
199
+ f.manual_amount_in_currency = -40
200
+ self.assertFalse(f.can_reconcile)
201
+ f.manual_reference = "reconcile_auxiliary;2"
202
+ f.manual_account_id = expense_acc
203
+ self.assertTrue(f.can_reconcile)
204
+ bank_stmt_line.reconcile_bank_line()
205
+ receivable_line = bank_stmt_line.line_ids.filtered(
206
+ lambda line: line.account_id == receivable_acc
207
+ )
208
+ self.assertEqual(receivable_line.currency_id.id, self.currency_usd_id)
209
+ self.assertEqual(receivable_line.amount_currency, -40)
210
+ self.assertEqual(receivable_line.balance, -20)
211
+ matched_line = False
212
+ for line in bank_stmt_line.reconcile_data_info["data"]:
213
+ if line["id"] == receivable_line.id:
214
+ matched_line = True
215
+ self.assertEqual(line["currency_amount"], -40)
216
+ self.assertEqual(line["amount"], -20)
217
+ break
218
+ self.assertEqual(matched_line, True)
219
+
160
220
  def test_reconcile_invoice_reconcile_full(self):
161
221
  """
162
222
  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: 18.0.1.0.9.2
3
+ Version: 18.0.1.0.10
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo-addon-account_reconcile_model_oca==18.0.*
6
6
  Requires-Dist: odoo-addon-account_statement_base==18.0.*
@@ -29,7 +29,7 @@ Account Reconcile Oca
29
29
  !! This file is generated by oca-gen-addon-readme !!
30
30
  !! changes will be overwritten. !!
31
31
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
32
- !! source digest: sha256:0b40eaa5ada9ccfe5d34c04635be9a951f8ff2a890065045b10fe9d15e1d4f3d
32
+ !! source digest: sha256:a24ed79f8c9d0906e6166fd1509aea72973e375f27b323e62f3751b9aabafed7
33
33
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
34
34
 
35
35
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,6 +1,6 @@
1
- odoo/addons/account_reconcile_oca/README.rst,sha256=XYybIEL43ydC5l4jxtOm6UONc1GRJHxkF7HI_a-xynM,3868
1
+ odoo/addons/account_reconcile_oca/README.rst,sha256=n-MRell-qj7R2oO_AlEvQeuNVTeTDAF42x6jm6IRIRs,3868
2
2
  odoo/addons/account_reconcile_oca/__init__.py,sha256=vqRYeBgCVZMpZhYvILSxVsNLC9V7zDnvxMnKU8RQP94,55
3
- odoo/addons/account_reconcile_oca/__manifest__.py,sha256=fUCjrngnsXXI_zejz2M2qbWwj7yptJfsw0SvYwtFnPA,1821
3
+ odoo/addons/account_reconcile_oca/__manifest__.py,sha256=p5d7HYiu67NPaLJZZNvIyhZWUsuz2RvZsj7vKZvPVUE,1822
4
4
  odoo/addons/account_reconcile_oca/hooks.py,sha256=SfJ-GlIGYL1kf8xhQs5qDqwNnE8S9Gs-5dP3vOD-IMM,182
5
5
  odoo/addons/account_reconcile_oca/demo/demo.xml,sha256=UKHgUXdDr54NsxdYk5czOdD-kmJas-8zlq5D7VQtIh4,203
6
6
  odoo/addons/account_reconcile_oca/i18n/account_reconcile_oca.pot,sha256=ErwPUWEze4aziwjVIEpJ8aVXtGy8a0pfaPxCma9ncB0,25814
@@ -19,10 +19,10 @@ odoo/addons/account_reconcile_oca/i18n/zh_CN.po,sha256=ZYGDwC6AY1GPpVSju7XP0IwKD
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=ngJzOnYFdsTrK51r8Gz7aTLqVSHQcPnTZVAw0slah3Y,7429
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=CxnyOCKcNoddPxwi-e1XXIdO2Wcaep_N4gy9H-HNFf8,53850
22
+ odoo/addons/account_reconcile_oca/models/account_bank_statement_line.py,sha256=0pWgCRm1GlF6p_i9mTFdIr9uyKKnyUXCmc56VwlDVlQ,53940
23
23
  odoo/addons/account_reconcile_oca/models/account_journal.py,sha256=PXXoGnByO7ve9_G09tnn95HKJoLvXM1pDxHDdd7bpU4,1359
24
24
  odoo/addons/account_reconcile_oca/models/account_move_line.py,sha256=PfdU6cfrKjKMqL_qGqNdyPUWg-frGQ6nR5uCoYtW38M,1212
25
- odoo/addons/account_reconcile_oca/models/account_reconcile_abstract.py,sha256=4YUkMb3HZA7fj1YuojLh4RNzn8AW36I1G_CJuEKbRaA,5099
25
+ odoo/addons/account_reconcile_oca/models/account_reconcile_abstract.py,sha256=epeCQ8MAg56Ntq8fqXwCYe5oAlOOASlUfp-w8bCWm2U,5241
26
26
  odoo/addons/account_reconcile_oca/models/res_company.py,sha256=IaSLPwHJZre5RYPVW8V6mnSoxltS_w0GUN1Ev-cfcB4,354
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.md,sha256=subC7gWq_kRC_nJfLRfrI_IXlNoGgWaq9Es5qXuMa1w,16
@@ -32,7 +32,7 @@ odoo/addons/account_reconcile_oca/readme/USAGE.md,sha256=yNLGo35X7TW2TLyJqHU-gdQ
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=rh0rCe_ppH7QsRvrwxAHPvyc2HVPW7QlKx2RONmN9E0,14006
35
+ odoo/addons/account_reconcile_oca/static/description/index.html,sha256=Rew5VdHM-Fc0P1xxHEPmnNTkkyOzwNNnDRwBGdiFjd0,14006
36
36
  odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_controller.esm.js,sha256=Zyk9E7M_dpuqXyB8-TQhRFPGozQA9dCyEsht4_UJWbM,4871
37
37
  odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_kanban_record.esm.js,sha256=8kQb0XINafwaiW3jaogkqIijYChliJHXPj0Kr6Sp6Vk,446
38
38
  odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_renderer.esm.js,sha256=SjwJu1wXFRJ_-fIOFqG0DO0KfkErSTVoW1uFHzsKoP0,2096
@@ -52,7 +52,7 @@ odoo/addons/account_reconcile_oca/static/src/scss/reconcile.scss,sha256=b6clO2yW
52
52
  odoo/addons/account_reconcile_oca/static/src/xml/reconcile.xml,sha256=ypOz0PapRFo_Y7IM8JifJFjpligoc4LGIWmeZeJhOfA,9434
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=Q8gaZDJyyzDSzlSe_4UOroCHI_HzWdz19i0C2eLJ7Mg,10310
55
- odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py,sha256=Vub7ic9_8ciwNbBOmosUT0MVt5MKgmd3UYUkHSDqDeQ,53552
55
+ odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py,sha256=y22FH6hZnomxxUdJqkJa0D3o2nlM8Gzx_CU6xackXRQ,56093
56
56
  odoo/addons/account_reconcile_oca/views/account_account.xml,sha256=-2UyFKoQI1ec5YYzz8prYQPrKwZTvFqTTbnloNPP-jE,864
57
57
  odoo/addons/account_reconcile_oca/views/account_account_reconcile.xml,sha256=Oq1OEMyZDbvKs8kuFl5sL-c__ih2PNa0StfnfizGd68,6765
58
58
  odoo/addons/account_reconcile_oca/views/account_bank_statement.xml,sha256=NI1z1pi23hYawhLCzRL9ZRIWxwWM4BfyY49kv188XzM,2434
@@ -61,7 +61,7 @@ odoo/addons/account_reconcile_oca/views/account_journal.xml,sha256=kO9TjjowUBV-4
61
61
  odoo/addons/account_reconcile_oca/views/account_move.xml,sha256=DmtEGKT5R8QwI_xEAZH1l8tC6pe-GlIQtb4tikHK3z0,971
62
62
  odoo/addons/account_reconcile_oca/views/account_move_line.xml,sha256=a1AqrG0ppplhiAWXabwjbLrvFCatBHys2xNoHxtTgCE,5324
63
63
  odoo/addons/account_reconcile_oca/views/res_config_settings.xml,sha256=uO3fyDQanxF_UfJ2ggc4H9t6gO2cKGMh08IOQemoudc,803
64
- odoo_addon_account_reconcile_oca-18.0.1.0.9.2.dist-info/METADATA,sha256=-QC5NCtLvynfNK03-lXqCuR77_WslztCdBR69Q35JN4,4564
65
- odoo_addon_account_reconcile_oca-18.0.1.0.9.2.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
66
- odoo_addon_account_reconcile_oca-18.0.1.0.9.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
67
- odoo_addon_account_reconcile_oca-18.0.1.0.9.2.dist-info/RECORD,,
64
+ odoo_addon_account_reconcile_oca-18.0.1.0.10.dist-info/METADATA,sha256=JMz_hF6FaWwXJ_6s7Xqiwc3E7xvTgeqnC_XmDSujYk8,4563
65
+ odoo_addon_account_reconcile_oca-18.0.1.0.10.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
66
+ odoo_addon_account_reconcile_oca-18.0.1.0.10.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
67
+ odoo_addon_account_reconcile_oca-18.0.1.0.10.dist-info/RECORD,,