odoo-addon-account-reconcile-oca 16.0.2.3.0__py3-none-any.whl → 16.0.2.3.1__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.
- odoo/addons/account_reconcile_oca/README.rst +1 -1
- odoo/addons/account_reconcile_oca/__manifest__.py +1 -1
- odoo/addons/account_reconcile_oca/models/account_bank_statement_line.py +85 -1
- odoo/addons/account_reconcile_oca/static/description/index.html +1 -1
- odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py +13 -0
- {odoo_addon_account_reconcile_oca-16.0.2.3.0.dist-info → odoo_addon_account_reconcile_oca-16.0.2.3.1.dist-info}/METADATA +2 -2
- {odoo_addon_account_reconcile_oca-16.0.2.3.0.dist-info → odoo_addon_account_reconcile_oca-16.0.2.3.1.dist-info}/RECORD +9 -9
- {odoo_addon_account_reconcile_oca-16.0.2.3.0.dist-info → odoo_addon_account_reconcile_oca-16.0.2.3.1.dist-info}/WHEEL +0 -0
- {odoo_addon_account_reconcile_oca-16.0.2.3.0.dist-info → odoo_addon_account_reconcile_oca-16.0.2.3.1.dist-info}/top_level.txt +0 -0
@@ -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:
|
10
|
+
!! source digest: sha256:70964daffe4ca9515491c44f018e7e76789e8b3dcb44a38e86b1695ffcb8a2c4
|
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.3.
|
8
|
+
"version": "16.0.2.3.1",
|
9
9
|
"license": "AGPL-3",
|
10
10
|
"author": "CreuBlanca,Dixmit,Odoo Community Association (OCA)",
|
11
11
|
"maintainers": ["etobella"],
|
@@ -9,7 +9,7 @@ from dateutil.relativedelta import relativedelta
|
|
9
9
|
from odoo import Command, _, api, fields, models
|
10
10
|
from odoo.exceptions import UserError
|
11
11
|
from odoo.fields import first
|
12
|
-
from odoo.tools import float_is_zero
|
12
|
+
from odoo.tools import float_compare, float_is_zero
|
13
13
|
|
14
14
|
|
15
15
|
class AccountBankStatementLine(models.Model):
|
@@ -340,6 +340,28 @@ class AccountBankStatementLine(models.Model):
|
|
340
340
|
or self.analytic_distribution != line.get("analytic_distribution", False)
|
341
341
|
)
|
342
342
|
|
343
|
+
def _check_reconcile_data_changed(self):
|
344
|
+
self.ensure_one()
|
345
|
+
data = self.reconcile_data_info.get("data", [])
|
346
|
+
liquidity_lines, _suspense_lines, _other_lines = self._seek_for_lines()
|
347
|
+
move_amount_cur = sum(liquidity_lines.mapped("amount_currency"))
|
348
|
+
move_credit = sum(liquidity_lines.mapped("credit"))
|
349
|
+
move_debit = sum(liquidity_lines.mapped("debit"))
|
350
|
+
stmt_amount_curr = stmt_debit = stmt_credit = 0.0
|
351
|
+
for line_data in data:
|
352
|
+
if line_data["kind"] != "liquidity":
|
353
|
+
continue
|
354
|
+
stmt_amount_curr += line_data["currency_amount"]
|
355
|
+
stmt_debit += line_data["debit"]
|
356
|
+
stmt_credit += line_data["credit"]
|
357
|
+
prec = self.currency_id.rounding
|
358
|
+
return (
|
359
|
+
float_compare(move_amount_cur, move_amount_cur, precision_rounding=prec)
|
360
|
+
!= 0
|
361
|
+
or float_compare(move_credit, stmt_credit, precision_rounding=prec) != 0
|
362
|
+
or float_compare(move_debit, stmt_debit, precision_rounding=prec) != 0
|
363
|
+
)
|
364
|
+
|
343
365
|
def _get_manual_delete_vals(self):
|
344
366
|
return {
|
345
367
|
"manual_reference": False,
|
@@ -953,6 +975,68 @@ class AccountBankStatementLine(models.Model):
|
|
953
975
|
)(self._prepare_reconcile_line_data(data["data"]))
|
954
976
|
return result
|
955
977
|
|
978
|
+
def _synchronize_to_moves(self, changed_fields):
|
979
|
+
"""We want to avoid to change stuff (mainly amounts ) in accounting entries
|
980
|
+
when some changes happen in the reconciliation widget. The only change
|
981
|
+
(among the fields triggering the synchronization) possible from the
|
982
|
+
reconciliation widget is the partner_id field.
|
983
|
+
|
984
|
+
So, in case of change on partner_id field we do not call super but make
|
985
|
+
only the required change (relative to partner) on accounting entries.
|
986
|
+
|
987
|
+
And if something else changes, we then re-define reconcile_data_info to
|
988
|
+
make the data consistent (for example, if debit/credit has changed by
|
989
|
+
applying a different rate or even if there was a correction on statement
|
990
|
+
line amount).
|
991
|
+
"""
|
992
|
+
if self._context.get("skip_account_move_synchronization"):
|
993
|
+
return
|
994
|
+
if "partner_id" in changed_fields and not any(
|
995
|
+
field_name in changed_fields
|
996
|
+
for field_name in (
|
997
|
+
"payment_ref",
|
998
|
+
"amount",
|
999
|
+
"amount_currency",
|
1000
|
+
"foreign_currency_id",
|
1001
|
+
"currency_id",
|
1002
|
+
)
|
1003
|
+
):
|
1004
|
+
for st_line in self.with_context(skip_account_move_synchronization=True):
|
1005
|
+
|
1006
|
+
(
|
1007
|
+
liquidity_lines,
|
1008
|
+
suspense_lines,
|
1009
|
+
_other_lines,
|
1010
|
+
) = st_line._seek_for_lines()
|
1011
|
+
line_vals = {"partner_id": st_line.partner_id}
|
1012
|
+
line_ids_commands = [(1, liquidity_lines.id, line_vals)]
|
1013
|
+
if suspense_lines:
|
1014
|
+
line_ids_commands.append((1, suspense_lines.id, line_vals))
|
1015
|
+
st_line_vals = {"line_ids": line_ids_commands}
|
1016
|
+
if st_line.move_id.partner_id != st_line.partner_id:
|
1017
|
+
st_line_vals["partner_id"] = st_line.partner_id.id
|
1018
|
+
st_line.move_id.write(st_line_vals)
|
1019
|
+
else:
|
1020
|
+
super()._synchronize_to_moves(changed_fields=changed_fields)
|
1021
|
+
|
1022
|
+
if not any(
|
1023
|
+
field_name in changed_fields
|
1024
|
+
for field_name in (
|
1025
|
+
"payment_ref",
|
1026
|
+
"amount",
|
1027
|
+
"amount_currency",
|
1028
|
+
"foreign_currency_id",
|
1029
|
+
"currency_id",
|
1030
|
+
"partner_id",
|
1031
|
+
)
|
1032
|
+
):
|
1033
|
+
return
|
1034
|
+
# reset reconcile_data_info if amounts are not consistent anymore with the
|
1035
|
+
# amounts of the accounting entries
|
1036
|
+
for st_line in self:
|
1037
|
+
if st_line._check_reconcile_data_changed():
|
1038
|
+
st_line.reconcile_data_info = st_line._default_reconcile_data()
|
1039
|
+
|
956
1040
|
def _prepare_reconcile_line_data(self, lines):
|
957
1041
|
new_lines = []
|
958
1042
|
reverse_lines = {}
|
@@ -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:
|
370
|
+
!! source digest: sha256:70964daffe4ca9515491c44f018e7e76789e8b3dcb44a38e86b1695ffcb8a2c4
|
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&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>
|
@@ -892,6 +892,7 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
892
892
|
self.assertFalse(f.partner_id)
|
893
893
|
f.manual_reference = "account.move.line;%s" % liquidity_lines.id
|
894
894
|
f.manual_partner_id = inv1.partner_id
|
895
|
+
f.save()
|
895
896
|
self.assertEqual(f.partner_id, inv1.partner_id)
|
896
897
|
bank_stmt_line.clean_reconcile()
|
897
898
|
# As we have a set a partner, the cleaning should assign the invoice automatically
|
@@ -1296,6 +1297,7 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
1296
1297
|
"rate": 1.25,
|
1297
1298
|
}
|
1298
1299
|
)
|
1300
|
+
liquidity_lines, suspense_lines, other_lines = bank_stmt_line._seek_for_lines()
|
1299
1301
|
with Form(
|
1300
1302
|
bank_stmt_line,
|
1301
1303
|
view="account_reconcile_oca.bank_statement_line_form_reconcile_view",
|
@@ -1309,6 +1311,17 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
1309
1311
|
line["amount"],
|
1310
1312
|
83.33,
|
1311
1313
|
)
|
1314
|
+
# check that adding a partner does not recompute the amounts on accounting
|
1315
|
+
# entries, but is still synchronized with accounting entries
|
1316
|
+
f.manual_reference = "account.move.line;%s" % liquidity_lines.id
|
1317
|
+
f.manual_partner_id = inv1.partner_id
|
1318
|
+
self.assertEqual(f.partner_id, inv1.partner_id)
|
1319
|
+
self.assertEqual(liquidity_lines.debit, 83.33)
|
1320
|
+
f.save()
|
1321
|
+
# check liquidity line did not recompute debit with the new rate with
|
1322
|
+
# partner change
|
1323
|
+
self.assertEqual(liquidity_lines.debit, 83.33)
|
1324
|
+
self.assertEqual(liquidity_lines.partner_id, inv1.partner_id)
|
1312
1325
|
f.manual_reference = "account.move.line;%s" % line["id"]
|
1313
1326
|
# simulate click on statement line, check amount does not recompute
|
1314
1327
|
f.manual_partner_id = inv1.partner_id
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odoo-addon-account_reconcile_oca
|
3
|
-
Version: 16.0.2.3.
|
3
|
+
Version: 16.0.2.3.1
|
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:
|
26
|
+
!! source digest: sha256:70964daffe4ca9515491c44f018e7e76789e8b3dcb44a38e86b1695ffcb8a2c4
|
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=
|
1
|
+
odoo/addons/account_reconcile_oca/README.rst,sha256=OVt8vITwujoGstjkDIxtxEHMMhvjeg2n3uB-Tw8lmkA,3709
|
2
2
|
odoo/addons/account_reconcile_oca/__init__.py,sha256=vqRYeBgCVZMpZhYvILSxVsNLC9V7zDnvxMnKU8RQP94,55
|
3
|
-
odoo/addons/account_reconcile_oca/__manifest__.py,sha256=
|
3
|
+
odoo/addons/account_reconcile_oca/__manifest__.py,sha256=St1qGAeCbR_y6K5Pv6449XiLBXbk3uWuEAdhHENNiQU,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=
|
21
|
+
odoo/addons/account_reconcile_oca/models/account_bank_statement_line.py,sha256=Q_mCeYJynMM26YNYv9ZO4PFd7FpfyuMoIVdb7y9wJT0,51135
|
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=
|
33
|
+
odoo/addons/account_reconcile_oca/static/description/index.html,sha256=JdqL179kWWfXgjZoAbzVJcMy1H3FYqeXxCcm8652Pw4,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=
|
55
|
+
odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py,sha256=36vQlGdKlDTV6anNu3VA5HWTzqSiAUf7gQHdgx1AD3c,51426
|
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.3.
|
65
|
-
odoo_addon_account_reconcile_oca-16.0.2.3.
|
66
|
-
odoo_addon_account_reconcile_oca-16.0.2.3.
|
67
|
-
odoo_addon_account_reconcile_oca-16.0.2.3.
|
64
|
+
odoo_addon_account_reconcile_oca-16.0.2.3.1.dist-info/METADATA,sha256=by8fOeGFeWX8NPNbiOL_Sr5YPk0qCFH0kzA-_F0aAPo,4322
|
65
|
+
odoo_addon_account_reconcile_oca-16.0.2.3.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
66
|
+
odoo_addon_account_reconcile_oca-16.0.2.3.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
67
|
+
odoo_addon_account_reconcile_oca-16.0.2.3.1.dist-info/RECORD,,
|
File without changes
|