odoo-addon-account-reconcile-oca 16.0.2.0.10__py3-none-any.whl → 16.0.2.0.12__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:ad9ff54d8570f63151c6f78de071d8152d8011f5fc605206a1382e0ba5b35b23
10
+ !! source digest: sha256:57146c81c00126d519793a3149f4a98383900249f9dd2525aa71b551bde4ec02
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.0.10",
8
+ "version": "16.0.2.0.12",
9
9
  "license": "AGPL-3",
10
10
  "author": "CreuBlanca,Dixmit,Odoo Community Association (OCA)",
11
11
  "maintainers": ["etobella"],
@@ -296,6 +296,46 @@ class AccountBankStatementLine(models.Model):
296
296
  != line.get("partner_id")
297
297
  )
298
298
 
299
+ def _get_manual_delete_vals(self):
300
+ return {
301
+ "manual_reference": False,
302
+ "manual_account_id": False,
303
+ "manual_amount": False,
304
+ "manual_exchange_counterpart": False,
305
+ "manual_in_currency_id": False,
306
+ "manual_in_currency": False,
307
+ "manual_name": False,
308
+ "manual_partner_id": False,
309
+ "manual_line_id": False,
310
+ "manual_move_id": False,
311
+ "manual_move_type": False,
312
+ "manual_kind": False,
313
+ "manual_original_amount": False,
314
+ "manual_currency_id": False,
315
+ "analytic_distribution": False,
316
+ }
317
+
318
+ def _process_manual_reconcile_from_line(self, line):
319
+ self.manual_account_id = line["account_id"][0]
320
+ self.manual_amount = line["amount"]
321
+ self.manual_currency_id = line["currency_id"]
322
+ self.manual_in_currency_id = line.get("line_currency_id")
323
+ self.manual_in_currency = line.get("line_currency_id") and line[
324
+ "currency_id"
325
+ ] != line.get("line_currency_id")
326
+ self.manual_amount_in_currency = line.get("currency_amount")
327
+ self.manual_name = line["name"]
328
+ self.manual_exchange_counterpart = line.get("is_exchange_counterpart", False)
329
+ self.manual_partner_id = line.get("partner_id") and line["partner_id"][0]
330
+ manual_line = self.env["account.move.line"].browse(line["id"]).exists()
331
+ self.manual_line_id = manual_line
332
+ self.analytic_distribution = line.get("analytic_distribution", {})
333
+ if self.manual_line_id:
334
+ self.manual_move_id = self.manual_line_id.move_id
335
+ self.manual_move_type = self.manual_line_id.move_id.move_type
336
+ self.manual_kind = line["kind"]
337
+ self.manual_original_amount = line.get("original_amount", 0.0)
338
+
299
339
  @api.onchange("manual_reference", "manual_delete")
300
340
  def _onchange_manual_reconcile_reference(self):
301
341
  self.ensure_one()
@@ -316,53 +356,10 @@ class AccountBankStatementLine(models.Model):
316
356
  continue
317
357
  if line["reference"] == self.manual_reference:
318
358
  if self.manual_delete:
319
- self.update(
320
- {
321
- "manual_reference": False,
322
- "manual_account_id": False,
323
- "manual_amount": False,
324
- "manual_exchange_counterpart": False,
325
- "manual_in_currency_id": False,
326
- "manual_in_currency": False,
327
- "manual_name": False,
328
- "manual_partner_id": False,
329
- "manual_line_id": False,
330
- "manual_move_id": False,
331
- "manual_move_type": False,
332
- "manual_kind": False,
333
- "manual_original_amount": False,
334
- "manual_currency_id": False,
335
- "analytic_distribution": False,
336
- "manual_amount_in_currency": False,
337
- }
338
- )
359
+ self.update(self._get_manual_delete_vals())
339
360
  continue
340
361
  else:
341
- self.manual_account_id = line["account_id"][0]
342
- self.manual_amount = line["amount"]
343
- self.manual_currency_id = line["currency_id"]
344
- self.manual_in_currency_id = line.get("line_currency_id")
345
- self.manual_in_currency = line.get("line_currency_id") and line[
346
- "currency_id"
347
- ] != line.get("line_currency_id")
348
- self.manual_amount_in_currency = line.get("currency_amount")
349
- self.manual_name = line["name"]
350
- self.manual_exchange_counterpart = line.get(
351
- "is_exchange_counterpart", False
352
- )
353
- self.manual_partner_id = (
354
- line.get("partner_id") and line["partner_id"][0]
355
- )
356
- manual_line = (
357
- self.env["account.move.line"].browse(line["id"]).exists()
358
- )
359
- self.manual_line_id = manual_line
360
- self.analytic_distribution = line.get("analytic_distribution", {})
361
- if self.manual_line_id:
362
- self.manual_move_id = self.manual_line_id.move_id
363
- self.manual_move_type = self.manual_line_id.move_id.move_type
364
- self.manual_kind = line["kind"]
365
- self.manual_original_amount = line.get("original_amount", 0.0)
362
+ self._process_manual_reconcile_from_line(line)
366
363
  new_data.append(line)
367
364
  self.update({"manual_delete": False})
368
365
  self.reconcile_data_info = self._recompute_suspense_line(
@@ -383,6 +380,21 @@ class AccountBankStatementLine(models.Model):
383
380
  )
384
381
  self._onchange_manual_reconcile_vals()
385
382
 
383
+ def _get_manual_reconcile_vals(self):
384
+ return {
385
+ "name": self.manual_name,
386
+ "partner_id": self.manual_partner_id
387
+ and self.manual_partner_id.name_get()[0]
388
+ or (False, self.partner_name),
389
+ "account_id": self.manual_account_id.name_get()[0]
390
+ if self.manual_account_id
391
+ else [False, _("Undefined")],
392
+ "amount": self.manual_amount,
393
+ "credit": -self.manual_amount if self.manual_amount < 0 else 0.0,
394
+ "debit": self.manual_amount if self.manual_amount > 0 else 0.0,
395
+ "analytic_distribution": self.analytic_distribution,
396
+ }
397
+
386
398
  @api.onchange(
387
399
  "manual_account_id",
388
400
  "manual_partner_id",
@@ -397,28 +409,11 @@ class AccountBankStatementLine(models.Model):
397
409
  for line in data:
398
410
  if line["reference"] == self.manual_reference:
399
411
  if self._check_line_changed(line):
400
- line.update(
401
- {
402
- "name": self.manual_name,
403
- "partner_id": self.manual_partner_id
404
- and self.manual_partner_id.name_get()[0]
405
- or (False, self.partner_name),
406
- "account_id": self.manual_account_id.name_get()[0]
407
- if self.manual_account_id
408
- else [False, _("Undefined")],
409
- "amount": self.manual_amount,
410
- "credit": -self.manual_amount
411
- if self.manual_amount < 0
412
- else 0.0,
413
- "debit": self.manual_amount
414
- if self.manual_amount > 0
415
- else 0.0,
416
- "analytic_distribution": self.analytic_distribution,
417
- "kind": line["kind"]
418
- if line["kind"] != "suspense"
419
- else "other",
420
- }
412
+ line_vals = self._get_manual_reconcile_vals()
413
+ line_vals["kind"] = (
414
+ line["kind"] if line["kind"] != "suspense" else "other"
421
415
  )
416
+ line.update(line_vals)
422
417
  if line["kind"] == "liquidity":
423
418
  self._update_move_partner()
424
419
  if self.manual_line_id and self.manual_line_id.id == line.get(
@@ -537,7 +532,14 @@ class AccountBankStatementLine(models.Model):
537
532
  res = (
538
533
  self.env["account.reconcile.model"]
539
534
  .search(
540
- [("rule_type", "in", ["invoice_matching", "writeoff_suggestion"])]
535
+ [
536
+ (
537
+ "rule_type",
538
+ "in",
539
+ ["invoice_matching", "writeoff_suggestion"],
540
+ ),
541
+ ("company_id", "=", self.company_id.id),
542
+ ]
541
543
  )
542
544
  ._apply_rules(self, self._retrieve_partner())
543
545
  )
@@ -560,6 +562,8 @@ class AccountBankStatementLine(models.Model):
560
562
  )
561
563
  amount -= sum(line.get("amount") for line in line_data)
562
564
  data += line_data
565
+ if res.get("auto_reconcile"):
566
+ self.reconcile_bank_line()
563
567
  return self._recompute_suspense_line(
564
568
  data,
565
569
  reconcile_auxiliary_id,
@@ -750,6 +754,7 @@ class AccountBankStatementLine(models.Model):
750
754
  models = self.env["account.reconcile.model"].search(
751
755
  [
752
756
  ("rule_type", "in", ["invoice_matching", "writeoff_suggestion"]),
757
+ ("company_id", "in", result.company_id.ids),
753
758
  ("auto_reconcile", "=", True),
754
759
  ]
755
760
  )
@@ -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:ad9ff54d8570f63151c6f78de071d8152d8011f5fc605206a1382e0ba5b35b23
370
+ !! source digest: sha256:57146c81c00126d519793a3149f4a98383900249f9dd2525aa71b551bde4ec02
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>
@@ -10,6 +10,16 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
10
10
  @classmethod
11
11
  def setUpClass(cls, chart_template_ref=None):
12
12
  super().setUpClass(chart_template_ref=chart_template_ref)
13
+ # Auto-disable reconciliation model created automatically with
14
+ # generate_account_reconcile_model() to avoid side effects in tests
15
+ cls.invoice_matching_models = cls.env["account.reconcile.model"].search(
16
+ [
17
+ ("rule_type", "=", "invoice_matching"),
18
+ ("auto_reconcile", "=", True),
19
+ ("company_id", "=", cls.company.id),
20
+ ]
21
+ )
22
+ cls.invoice_matching_models.active = False
13
23
 
14
24
  cls.acc_bank_stmt_model = cls.env["account.bank.statement"]
15
25
  cls.acc_bank_stmt_line_model = cls.env["account.bank.statement.line"]
@@ -988,6 +998,8 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
988
998
  }
989
999
  )
990
1000
 
1001
+ self.invoice_matching_models.active = True
1002
+ self.invoice_matching_models.match_text_location_label = False
991
1003
  bank_stmt_line = self.acc_bank_stmt_line_model.create(
992
1004
  {
993
1005
  "name": "testLine",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-account_reconcile_oca
3
- Version: 16.0.2.0.10
3
+ Version: 16.0.2.0.12
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:ad9ff54d8570f63151c6f78de071d8152d8011f5fc605206a1382e0ba5b35b23
26
+ !! source digest: sha256:57146c81c00126d519793a3149f4a98383900249f9dd2525aa71b551bde4ec02
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=PiHT2DPyltzkO_Gs3SasKQqnGNKfBq-xQk42SAVJ7qo,3709
1
+ odoo/addons/account_reconcile_oca/README.rst,sha256=-IvPfOXnhsy5BfQQG2E1XA6-19LShQVqsErWEORuKsc,3709
2
2
  odoo/addons/account_reconcile_oca/__init__.py,sha256=vqRYeBgCVZMpZhYvILSxVsNLC9V7zDnvxMnKU8RQP94,55
3
- odoo/addons/account_reconcile_oca/__manifest__.py,sha256=-RrKvYUD1nAau2o7R_oMmCscH5YJSQFXum-Fw4Qwr-8,1827
3
+ odoo/addons/account_reconcile_oca/__manifest__.py,sha256=sWiE9HIZKw2BVpmwID3TkB-zrk8H5j7KDO2sYNyRKfI,1827
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=Bgp4aHX6nSjm8OaRn380Bf5LcQ-Yo4nFt9CzzlExykc,6780
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=vDJynIUcYCuMrqyZA1LU7dx8Qlgusa-0qpYbjYFXNLs,39557
21
+ odoo/addons/account_reconcile_oca/models/account_bank_statement_line.py,sha256=OMKOf2bgD__HfghDi9XLxlrKY_v7lJdrTqdz4rN0Eek,39188
22
22
  odoo/addons/account_reconcile_oca/models/account_journal.py,sha256=prdylwu2cX8MQUCRUGJfPWeCu8R6MNgLvHqPscqwloQ,995
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=jRboiVtRZmFBoZB2OQU4FOK4wwv7WLwjtX00XUO3FzA,3916
@@ -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=AwaFLqX7oyeReb6yYRrWtEyXLCP1hIp6vj0RSBvtTVs,13829
33
+ odoo/addons/account_reconcile_oca/static/description/index.html,sha256=ECGl2p3vP-cB6BSVpPQmB9tG8GSaHIPJRSXD8ZgXA9U,13829
34
34
  odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_controller.esm.js,sha256=Q_WFfEwl2q0Nr6cugeIt0ziVTZ7oFxM7UdcPzFP6FEs,4856
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=sLoq3aN8Rs4Ex9dyEqENhRU9FYT9Cm1R_KrI4zk7FJY,8698
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=gEtAaYvbUB4KyKtIkPEVv4RGdJZkO5MCdkrC_niAvGA,44435
55
+ odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py,sha256=BVNygNLWcehjLuTiYrNuOaIHYvJHsdOjbMpi9Q_AFRA,45030
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.0.10.dist-info/METADATA,sha256=UxIwYqJdVF0OHCbkS_sjqwlir2__8xOZx8mpXjCQ0R4,4323
65
- odoo_addon_account_reconcile_oca-16.0.2.0.10.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
66
- odoo_addon_account_reconcile_oca-16.0.2.0.10.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
67
- odoo_addon_account_reconcile_oca-16.0.2.0.10.dist-info/RECORD,,
64
+ odoo_addon_account_reconcile_oca-16.0.2.0.12.dist-info/METADATA,sha256=oX7aUpSsU3wg_5QWNYOGm9tdAHKbEZmk2bGZ1J1KpOE,4323
65
+ odoo_addon_account_reconcile_oca-16.0.2.0.12.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
66
+ odoo_addon_account_reconcile_oca-16.0.2.0.12.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
67
+ odoo_addon_account_reconcile_oca-16.0.2.0.12.dist-info/RECORD,,