odoo-addon-account-reconcile-oca 17.0.1.5.3__py3-none-any.whl → 17.0.1.5.5__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/i18n/account_reconcile_oca.pot +7 -0
- odoo/addons/account_reconcile_oca/i18n/es.po +8 -1
- odoo/addons/account_reconcile_oca/models/account_account_reconcile.py +21 -9
- odoo/addons/account_reconcile_oca/models/account_bank_statement_line.py +331 -52
- odoo/addons/account_reconcile_oca/models/account_reconcile_abstract.py +42 -14
- odoo/addons/account_reconcile_oca/static/description/index.html +1 -1
- odoo/addons/account_reconcile_oca/static/src/js/reconcile_move_line/reconcile_move_line_controller.esm.js +9 -0
- odoo/addons/account_reconcile_oca/static/src/js/reconcile_move_line/reconcile_move_line_view.esm.js +1 -0
- odoo/addons/account_reconcile_oca/static/src/js/widgets/reconcile_data_widget.esm.js +12 -0
- odoo/addons/account_reconcile_oca/static/src/js/widgets/reconcile_move_line_widget.esm.js +2 -1
- odoo/addons/account_reconcile_oca/static/src/xml/reconcile.xml +15 -1
- odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py +214 -47
- {odoo_addon_account_reconcile_oca-17.0.1.5.3.dist-info → odoo_addon_account_reconcile_oca-17.0.1.5.5.dist-info}/METADATA +2 -2
- {odoo_addon_account_reconcile_oca-17.0.1.5.3.dist-info → odoo_addon_account_reconcile_oca-17.0.1.5.5.dist-info}/RECORD +18 -18
- {odoo_addon_account_reconcile_oca-17.0.1.5.3.dist-info → odoo_addon_account_reconcile_oca-17.0.1.5.5.dist-info}/WHEEL +0 -0
- {odoo_addon_account_reconcile_oca-17.0.1.5.3.dist-info → odoo_addon_account_reconcile_oca-17.0.1.5.5.dist-info}/top_level.txt +0 -0
@@ -91,7 +91,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
91
91
|
inv1 = self.create_invoice(currency_id=self.currency_usd_id, invoice_amount=100)
|
92
92
|
bank_stmt = self.acc_bank_stmt_model.create(
|
93
93
|
{
|
94
|
-
"company_id": self.env.ref("base.main_company").id,
|
95
94
|
"journal_id": self.bank_journal_euro.id,
|
96
95
|
"date": time.strftime("%Y-07-15"),
|
97
96
|
"name": "test",
|
@@ -119,6 +118,42 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
119
118
|
self.assertFalse(f.add_account_move_line_id)
|
120
119
|
self.assertTrue(f.can_reconcile)
|
121
120
|
|
121
|
+
def test_manual_line_with_currency(self):
|
122
|
+
bank_stmt = self.acc_bank_stmt_model.create(
|
123
|
+
{
|
124
|
+
"journal_id": self.bank_journal_euro.id,
|
125
|
+
"date": time.strftime("%Y-07-15"),
|
126
|
+
"name": "test",
|
127
|
+
}
|
128
|
+
)
|
129
|
+
bank_stmt_line = self.acc_bank_stmt_line_model.create(
|
130
|
+
{
|
131
|
+
"name": "testLine",
|
132
|
+
"journal_id": self.bank_journal_euro.id,
|
133
|
+
"statement_id": bank_stmt.id,
|
134
|
+
"amount": 50,
|
135
|
+
"amount_currency": 100,
|
136
|
+
"foreign_currency_id": self.currency_usd_id,
|
137
|
+
"date": time.strftime("%Y-07-15"),
|
138
|
+
}
|
139
|
+
)
|
140
|
+
receivable_acc = self.company_data["default_account_receivable"]
|
141
|
+
with Form(
|
142
|
+
bank_stmt_line,
|
143
|
+
view="account_reconcile_oca.bank_statement_line_form_reconcile_view",
|
144
|
+
) as f:
|
145
|
+
self.assertFalse(f.can_reconcile)
|
146
|
+
f.manual_reference = "reconcile_auxiliary;1"
|
147
|
+
f.manual_account_id = receivable_acc
|
148
|
+
self.assertTrue(f.can_reconcile)
|
149
|
+
bank_stmt_line.reconcile_bank_line()
|
150
|
+
receivable_line = bank_stmt_line.line_ids.filtered(
|
151
|
+
lambda line: line.account_id == receivable_acc
|
152
|
+
)
|
153
|
+
self.assertEqual(receivable_line.currency_id.id, self.currency_usd_id)
|
154
|
+
self.assertEqual(receivable_line.amount_currency, -100)
|
155
|
+
self.assertEqual(receivable_line.balance, -50)
|
156
|
+
|
122
157
|
def test_reconcile_invoice_reconcile_full(self):
|
123
158
|
"""
|
124
159
|
We want to test the reconcile widget for bank statements on invoices.
|
@@ -130,7 +165,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
130
165
|
)
|
131
166
|
bank_stmt = self.acc_bank_stmt_model.create(
|
132
167
|
{
|
133
|
-
"company_id": self.env.ref("base.main_company").id,
|
134
168
|
"journal_id": self.bank_journal_euro.id,
|
135
169
|
"date": time.strftime("%Y-07-15"),
|
136
170
|
"name": "test",
|
@@ -179,7 +213,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
179
213
|
)
|
180
214
|
bank_stmt = self.acc_bank_stmt_model.create(
|
181
215
|
{
|
182
|
-
"company_id": self.env.ref("base.main_company").id,
|
183
216
|
"journal_id": self.bank_journal_euro.id,
|
184
217
|
"date": time.strftime("%Y-07-15"),
|
185
218
|
"name": "test",
|
@@ -242,7 +275,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
242
275
|
)
|
243
276
|
bank_stmt = self.acc_bank_stmt_model.create(
|
244
277
|
{
|
245
|
-
"company_id": self.env.ref("base.main_company").id,
|
246
278
|
"journal_id": self.bank_journal_euro.id,
|
247
279
|
"date": time.strftime("%Y-07-15"),
|
248
280
|
"name": "test",
|
@@ -306,7 +338,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
306
338
|
)
|
307
339
|
bank_stmt = self.acc_bank_stmt_model.create(
|
308
340
|
{
|
309
|
-
"company_id": self.env.ref("base.main_company").id,
|
310
341
|
"journal_id": self.bank_journal_euro.id,
|
311
342
|
"date": time.strftime("%Y-07-15"),
|
312
343
|
"name": "test",
|
@@ -360,7 +391,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
360
391
|
"""
|
361
392
|
bank_stmt = self.acc_bank_stmt_model.create(
|
362
393
|
{
|
363
|
-
"company_id": self.env.ref("base.main_company").id,
|
364
394
|
"journal_id": self.bank_journal_euro.id,
|
365
395
|
"date": time.strftime("%Y-07-15"),
|
366
396
|
"name": "test",
|
@@ -404,7 +434,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
404
434
|
)
|
405
435
|
bank_stmt = self.acc_bank_stmt_model.create(
|
406
436
|
{
|
407
|
-
"company_id": self.env.ref("base.main_company").id,
|
408
437
|
"journal_id": self.bank_journal_euro.id,
|
409
438
|
"date": time.strftime("%Y-07-15"),
|
410
439
|
"name": "test",
|
@@ -459,7 +488,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
459
488
|
)
|
460
489
|
bank_stmt = self.acc_bank_stmt_model.create(
|
461
490
|
{
|
462
|
-
"company_id": self.env.ref("base.main_company").id,
|
463
491
|
"journal_id": self.bank_journal_euro.id,
|
464
492
|
"date": time.strftime("%Y-07-15"),
|
465
493
|
"name": "test",
|
@@ -519,7 +547,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
519
547
|
|
520
548
|
bank_stmt = self.acc_bank_stmt_model.create(
|
521
549
|
{
|
522
|
-
"company_id": self.env.ref("base.main_company").id,
|
523
550
|
"journal_id": self.bank_journal_euro.id,
|
524
551
|
"date": time.strftime("%Y-07-15"),
|
525
552
|
"name": "test",
|
@@ -549,7 +576,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
549
576
|
)
|
550
577
|
bank_stmt = self.acc_bank_stmt_model.create(
|
551
578
|
{
|
552
|
-
"company_id": self.env.ref("base.main_company").id,
|
553
579
|
"journal_id": self.bank_journal_euro.id,
|
554
580
|
"date": time.strftime("%Y-07-15"),
|
555
581
|
"name": "test",
|
@@ -594,6 +620,57 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
594
620
|
self.assertTrue(reconcile_move.reversal_move_id)
|
595
621
|
self.assertFalse(bank_stmt_line.is_reconciled)
|
596
622
|
|
623
|
+
def test_reconcile_model_with_foreign_currency(self):
|
624
|
+
"""
|
625
|
+
We want to test what happens when we select a reconcile model to fill a
|
626
|
+
bank statement with a foreign currency.
|
627
|
+
"""
|
628
|
+
bank_stmt = self.acc_bank_stmt_model.create(
|
629
|
+
{
|
630
|
+
"journal_id": self.bank_journal_usd.id,
|
631
|
+
"date": time.strftime("%Y-07-15"),
|
632
|
+
"name": "test",
|
633
|
+
}
|
634
|
+
)
|
635
|
+
bank_stmt_line = self.acc_bank_stmt_line_model.create(
|
636
|
+
{
|
637
|
+
"name": "testLine",
|
638
|
+
"journal_id": self.bank_journal_usd.id,
|
639
|
+
"statement_id": bank_stmt.id,
|
640
|
+
"amount": 100,
|
641
|
+
"date": time.strftime("%Y-07-15"),
|
642
|
+
}
|
643
|
+
)
|
644
|
+
with Form(
|
645
|
+
bank_stmt_line,
|
646
|
+
view="account_reconcile_oca.bank_statement_line_form_reconcile_view",
|
647
|
+
) as f:
|
648
|
+
self.assertFalse(f.can_reconcile)
|
649
|
+
f.manual_model_id = self.rule
|
650
|
+
self.assertTrue(f.can_reconcile)
|
651
|
+
number_of_lines = len(bank_stmt_line.reconcile_data_info["data"])
|
652
|
+
bank_stmt_line.reconcile_bank_line()
|
653
|
+
self.assertEqual(
|
654
|
+
number_of_lines, len(bank_stmt_line.reconcile_data_info["data"])
|
655
|
+
)
|
656
|
+
self.assertEqual(2, len(bank_stmt_line.move_id.line_ids))
|
657
|
+
self.assertTrue(
|
658
|
+
bank_stmt_line.move_id.line_ids.filtered(
|
659
|
+
lambda r: r.account_id == self.current_assets_account
|
660
|
+
)
|
661
|
+
)
|
662
|
+
expected_amount = bank_stmt_line._get_reconcile_currency()._convert(
|
663
|
+
bank_stmt_line.amount,
|
664
|
+
bank_stmt_line.company_id.currency_id,
|
665
|
+
bank_stmt_line.company_id,
|
666
|
+
bank_stmt_line.date,
|
667
|
+
)
|
668
|
+
self.assertEqual(
|
669
|
+
bank_stmt_line.move_id.line_ids[0].amount_currency, bank_stmt_line.amount
|
670
|
+
)
|
671
|
+
self.assertEqual(bank_stmt_line.move_id.line_ids[0].debit, expected_amount)
|
672
|
+
self.assertEqual(bank_stmt_line.move_id.line_ids[1].credit, expected_amount)
|
673
|
+
|
597
674
|
# Testing to check functionality
|
598
675
|
|
599
676
|
def test_reconcile_invoice_to_check_reconciled(self):
|
@@ -607,7 +684,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
607
684
|
)
|
608
685
|
bank_stmt = self.acc_bank_stmt_model.create(
|
609
686
|
{
|
610
|
-
"company_id": self.env.ref("base.main_company").id,
|
611
687
|
"journal_id": self.bank_journal_euro.id,
|
612
688
|
"date": time.strftime("%Y-07-15"),
|
613
689
|
"name": "test",
|
@@ -649,7 +725,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
649
725
|
"""
|
650
726
|
bank_stmt = self.acc_bank_stmt_model.create(
|
651
727
|
{
|
652
|
-
"company_id": self.env.ref("base.main_company").id,
|
653
728
|
"journal_id": self.bank_journal_euro.id,
|
654
729
|
"date": time.strftime("%Y-07-15"),
|
655
730
|
"name": "test",
|
@@ -684,7 +759,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
684
759
|
)
|
685
760
|
bank_stmt = self.acc_bank_stmt_model.create(
|
686
761
|
{
|
687
|
-
"company_id": self.env.ref("base.main_company").id,
|
688
762
|
"journal_id": self.bank_journal_euro.id,
|
689
763
|
"date": time.strftime("%Y-07-15"),
|
690
764
|
"name": "test",
|
@@ -722,7 +796,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
722
796
|
)
|
723
797
|
bank_stmt = self.acc_bank_stmt_model.create(
|
724
798
|
{
|
725
|
-
"company_id": self.env.ref("base.main_company").id,
|
726
799
|
"journal_id": self.bank_journal_euro.id,
|
727
800
|
"date": time.strftime("%Y-07-15"),
|
728
801
|
"name": "test",
|
@@ -763,7 +836,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
763
836
|
)
|
764
837
|
bank_stmt = self.acc_bank_stmt_model.create(
|
765
838
|
{
|
766
|
-
"company_id": self.env.ref("base.main_company").id,
|
767
839
|
"journal_id": self.bank_journal_euro.id,
|
768
840
|
"date": time.strftime("%Y-07-15"),
|
769
841
|
"name": "test",
|
@@ -804,7 +876,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
804
876
|
)
|
805
877
|
bank_stmt = self.acc_bank_stmt_model.create(
|
806
878
|
{
|
807
|
-
"company_id": self.env.ref("base.main_company").id,
|
808
879
|
"journal_id": self.bank_journal_euro.id,
|
809
880
|
"date": time.strftime("%Y-07-15"),
|
810
881
|
"name": "test",
|
@@ -828,6 +899,7 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
828
899
|
self.assertFalse(f.partner_id)
|
829
900
|
f.manual_reference = "account.move.line;%s" % liquidity_lines.id
|
830
901
|
f.manual_partner_id = inv1.partner_id
|
902
|
+
f.save()
|
831
903
|
self.assertEqual(f.partner_id, inv1.partner_id)
|
832
904
|
bank_stmt_line.clean_reconcile()
|
833
905
|
# As we have set a partner, the cleaning should assign the invoice automatically
|
@@ -840,7 +912,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
840
912
|
"""
|
841
913
|
bank_stmt = self.acc_bank_stmt_model.create(
|
842
914
|
{
|
843
|
-
"company_id": self.env.ref("base.main_company").id,
|
844
915
|
"journal_id": self.bank_journal_euro.id,
|
845
916
|
"date": time.strftime("%Y-07-15"),
|
846
917
|
"name": "test",
|
@@ -891,7 +962,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
891
962
|
"""
|
892
963
|
bank_stmt = self.acc_bank_stmt_model.create(
|
893
964
|
{
|
894
|
-
"company_id": self.env.ref("base.main_company").id,
|
895
965
|
"journal_id": self.bank_journal_euro.id,
|
896
966
|
"date": time.strftime("%Y-07-15"),
|
897
967
|
"name": "test",
|
@@ -934,7 +1004,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
934
1004
|
|
935
1005
|
bank_stmt = self.acc_bank_stmt_model.create(
|
936
1006
|
{
|
937
|
-
"company_id": self.env.ref("base.main_company").id,
|
938
1007
|
"journal_id": self.bank_journal_euro.id,
|
939
1008
|
"date": time.strftime("%Y-07-15"),
|
940
1009
|
"name": "test",
|
@@ -998,7 +1067,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
998
1067
|
|
999
1068
|
bank_stmt = self.acc_bank_stmt_model.create(
|
1000
1069
|
{
|
1001
|
-
"company_id": self.env.ref("base.main_company").id,
|
1002
1070
|
"journal_id": self.bank_journal_euro.id,
|
1003
1071
|
"date": time.strftime("%Y-07-15"),
|
1004
1072
|
"name": "test",
|
@@ -1032,7 +1100,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
1032
1100
|
inv1 = self.create_invoice(currency_id=self.currency_usd_id, invoice_amount=100)
|
1033
1101
|
bank_stmt = self.acc_bank_stmt_model.create(
|
1034
1102
|
{
|
1035
|
-
"company_id": self.env.ref("base.main_company").id,
|
1036
1103
|
"journal_id": self.bank_journal_usd.id,
|
1037
1104
|
"date": time.strftime("%Y-07-15"),
|
1038
1105
|
"name": "test",
|
@@ -1071,45 +1138,50 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
1071
1138
|
)
|
1072
1139
|
|
1073
1140
|
def test_journal_foreign_currency_change(self):
|
1141
|
+
cny = self.env.ref("base.CNY")
|
1142
|
+
cny.write({"active": True})
|
1143
|
+
cny_journal = self.env["account.journal"].create(
|
1144
|
+
{
|
1145
|
+
"name": "Bank CNY",
|
1146
|
+
"type": "bank",
|
1147
|
+
"currency_id": cny.id,
|
1148
|
+
}
|
1149
|
+
)
|
1074
1150
|
self.env["res.currency.rate"].create(
|
1075
1151
|
{
|
1076
|
-
"
|
1077
|
-
"
|
1078
|
-
"
|
1152
|
+
"name": time.strftime("%Y-09-10"),
|
1153
|
+
"currency_id": cny.id,
|
1154
|
+
"inverse_company_rate": 0.125989013758,
|
1155
|
+
}
|
1156
|
+
)
|
1157
|
+
self.env["res.currency.rate"].create(
|
1158
|
+
{
|
1159
|
+
"name": time.strftime("%Y-09-09"),
|
1160
|
+
"currency_id": cny.id,
|
1161
|
+
"inverse_company_rate": 0.126225969731,
|
1079
1162
|
}
|
1080
1163
|
)
|
1081
1164
|
bank_stmt = self.acc_bank_stmt_model.create(
|
1082
1165
|
{
|
1083
|
-
"
|
1084
|
-
"
|
1085
|
-
"date": time.strftime("%Y-07-15"),
|
1166
|
+
"journal_id": cny_journal.id,
|
1167
|
+
"date": time.strftime("%Y-09-10"),
|
1086
1168
|
"name": "test",
|
1087
1169
|
}
|
1088
1170
|
)
|
1089
1171
|
bank_stmt_line = self.acc_bank_stmt_line_model.create(
|
1090
1172
|
{
|
1091
1173
|
"name": "testLine",
|
1092
|
-
"journal_id":
|
1174
|
+
"journal_id": cny_journal.id,
|
1093
1175
|
"statement_id": bank_stmt.id,
|
1094
|
-
"amount":
|
1095
|
-
"date": time.strftime("%Y-
|
1176
|
+
"amount": 259200,
|
1177
|
+
"date": time.strftime("%Y-09-10"),
|
1096
1178
|
}
|
1097
1179
|
)
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
self.assertEqual(
|
1104
|
-
line["currency_amount"],
|
1105
|
-
100,
|
1106
|
-
)
|
1107
|
-
self.env["res.currency.rate"].create(
|
1108
|
-
{
|
1109
|
-
"currency_id": self.env.ref("base.EUR").id,
|
1110
|
-
"name": time.strftime("%Y-07-15"),
|
1111
|
-
"rate": 1.2,
|
1112
|
-
}
|
1180
|
+
inv1 = self._create_invoice(
|
1181
|
+
currency_id=cny.id,
|
1182
|
+
invoice_amount=259200,
|
1183
|
+
date_invoice=time.strftime("%Y-09-09"),
|
1184
|
+
auto_validate=True,
|
1113
1185
|
)
|
1114
1186
|
with Form(
|
1115
1187
|
bank_stmt_line,
|
@@ -1118,8 +1190,17 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
1118
1190
|
line = f.reconcile_data_info["data"][0]
|
1119
1191
|
self.assertEqual(
|
1120
1192
|
line["currency_amount"],
|
1121
|
-
|
1193
|
+
259200,
|
1122
1194
|
)
|
1195
|
+
f.add_account_move_line_id = inv1.line_ids.filtered(
|
1196
|
+
lambda line: line.account_id.account_type == "asset_receivable"
|
1197
|
+
)
|
1198
|
+
self.assertTrue(f.can_reconcile)
|
1199
|
+
self.assertEqual(len(bank_stmt_line.reconcile_data_info["data"]), 3)
|
1200
|
+
exchange_line = bank_stmt_line.reconcile_data_info["data"][-1]
|
1201
|
+
self.assertEqual(exchange_line["amount"], 61.42)
|
1202
|
+
bank_stmt_line.reconcile_bank_line()
|
1203
|
+
self.assertEqual(inv1.payment_state, "paid")
|
1123
1204
|
|
1124
1205
|
def test_invoice_foreign_currency_change(self):
|
1125
1206
|
self.env["res.currency.rate"].create(
|
@@ -1144,7 +1225,6 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
1144
1225
|
)
|
1145
1226
|
bank_stmt = self.acc_bank_stmt_model.create(
|
1146
1227
|
{
|
1147
|
-
"company_id": self.env.ref("base.main_company").id,
|
1148
1228
|
"journal_id": self.bank_journal_usd.id,
|
1149
1229
|
"date": time.strftime("%Y-07-15"),
|
1150
1230
|
"name": "test",
|
@@ -1222,3 +1302,90 @@ class TestReconciliationWidget(TestAccountReconciliationCommon):
|
|
1222
1302
|
.account_type,
|
1223
1303
|
"liability_payable",
|
1224
1304
|
)
|
1305
|
+
|
1306
|
+
def test_invoice_foreign_currency_late_change_of_rate(self):
|
1307
|
+
# Test we can reconcile lines in foreign currency even if the rate was updated
|
1308
|
+
# late in odoo, meaning the statement line was created and the rate was updated
|
1309
|
+
# in odoo after that.
|
1310
|
+
self.env["res.currency.rate"].create(
|
1311
|
+
{
|
1312
|
+
"currency_id": self.env.ref("base.USD").id,
|
1313
|
+
"name": time.strftime("%Y-07-14"),
|
1314
|
+
"rate": 1.15,
|
1315
|
+
}
|
1316
|
+
)
|
1317
|
+
self.env["res.currency.rate"].create(
|
1318
|
+
{
|
1319
|
+
"currency_id": self.env.ref("base.USD").id,
|
1320
|
+
"name": time.strftime("%Y-07-15"),
|
1321
|
+
"rate": 1.2,
|
1322
|
+
}
|
1323
|
+
)
|
1324
|
+
inv1 = self._create_invoice(
|
1325
|
+
currency_id=self.currency_usd_id,
|
1326
|
+
invoice_amount=100,
|
1327
|
+
date_invoice=time.strftime("%Y-07-14"),
|
1328
|
+
auto_validate=True,
|
1329
|
+
)
|
1330
|
+
bank_stmt = self.acc_bank_stmt_model.create(
|
1331
|
+
{
|
1332
|
+
"journal_id": self.bank_journal_usd.id,
|
1333
|
+
"date": time.strftime("%Y-07-15"),
|
1334
|
+
"name": "test",
|
1335
|
+
}
|
1336
|
+
)
|
1337
|
+
bank_stmt_line = self.acc_bank_stmt_line_model.create(
|
1338
|
+
{
|
1339
|
+
"name": "testLine",
|
1340
|
+
"journal_id": self.bank_journal_usd.id,
|
1341
|
+
"statement_id": bank_stmt.id,
|
1342
|
+
"amount": 100,
|
1343
|
+
"date": time.strftime("%Y-07-16"),
|
1344
|
+
}
|
1345
|
+
)
|
1346
|
+
# rate of 07-16 is create after the statement line, meaning the rate of the
|
1347
|
+
# statement line is the one of the 07-15
|
1348
|
+
self.env["res.currency.rate"].create(
|
1349
|
+
{
|
1350
|
+
"currency_id": self.env.ref("base.USD").id,
|
1351
|
+
"name": time.strftime("%Y-07-16"),
|
1352
|
+
"rate": 1.25,
|
1353
|
+
}
|
1354
|
+
)
|
1355
|
+
liquidity_lines, suspense_lines, other_lines = bank_stmt_line._seek_for_lines()
|
1356
|
+
with Form(
|
1357
|
+
bank_stmt_line,
|
1358
|
+
view="account_reconcile_oca.bank_statement_line_form_reconcile_view",
|
1359
|
+
) as f:
|
1360
|
+
line = f.reconcile_data_info["data"][0]
|
1361
|
+
self.assertEqual(
|
1362
|
+
line["currency_amount"],
|
1363
|
+
100,
|
1364
|
+
)
|
1365
|
+
self.assertEqual(
|
1366
|
+
line["amount"],
|
1367
|
+
83.33,
|
1368
|
+
)
|
1369
|
+
# check that adding a partner does not recompute the amounts on accounting
|
1370
|
+
# entries, but is still synchronized with accounting entries
|
1371
|
+
f.manual_reference = "account.move.line;%s" % liquidity_lines.id
|
1372
|
+
f.manual_partner_id = inv1.partner_id
|
1373
|
+
self.assertEqual(f.partner_id, inv1.partner_id)
|
1374
|
+
self.assertEqual(liquidity_lines.debit, 83.33)
|
1375
|
+
f.save()
|
1376
|
+
# check liquidity line did not recompute debit with the new rate with
|
1377
|
+
# partner change
|
1378
|
+
self.assertEqual(liquidity_lines.debit, 83.33)
|
1379
|
+
self.assertEqual(liquidity_lines.partner_id, inv1.partner_id)
|
1380
|
+
f.manual_reference = "account.move.line;%s" % line["id"]
|
1381
|
+
# simulate click on statement line, check amount does not recompute
|
1382
|
+
f.manual_partner_id = inv1.partner_id
|
1383
|
+
self.assertEqual(f.manual_amount, 83.33)
|
1384
|
+
# check currency amount is still fine
|
1385
|
+
self.assertEqual(f.reconcile_data_info["data"][0]["currency_amount"], 100)
|
1386
|
+
f.add_account_move_line_id = inv1.line_ids.filtered(
|
1387
|
+
lambda line: line.account_id.account_type == "asset_receivable"
|
1388
|
+
)
|
1389
|
+
self.assertEqual(3, len(f.reconcile_data_info["data"]))
|
1390
|
+
self.assertTrue(f.can_reconcile)
|
1391
|
+
self.assertEqual(f.reconcile_data_info["data"][-1]["amount"], 3.63)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odoo-addon-account_reconcile_oca
|
3
|
-
Version: 17.0.1.5.
|
3
|
+
Version: 17.0.1.5.5
|
4
4
|
Requires-Python: >=3.10
|
5
5
|
Requires-Dist: odoo-addon-account_reconcile_model_oca>=17.0dev,<17.1dev
|
6
6
|
Requires-Dist: odoo-addon-account_statement_base>=17.0dev,<17.1dev
|
@@ -24,7 +24,7 @@ Account Reconcile Oca
|
|
24
24
|
!! This file is generated by oca-gen-addon-readme !!
|
25
25
|
!! changes will be overwritten. !!
|
26
26
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
27
|
-
!! source digest: sha256:
|
27
|
+
!! source digest: sha256:cf0d778067ac722c5a6d7f65f8fa4b0766076829ba9c9c147cc3718782cc85b0
|
28
28
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
29
29
|
|
30
30
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
@@ -1,11 +1,11 @@
|
|
1
|
-
odoo/addons/account_reconcile_oca/README.rst,sha256=
|
1
|
+
odoo/addons/account_reconcile_oca/README.rst,sha256=jbOPi-2QEfjKMaUX22DiotISMY_RTwmf3mtF8VwM0qM,3703
|
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=qBF4NpXJS6J9H8OUbaXL0DXRE1ejZYh5-8v8K7p7tYI,1865
|
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=6k0uK-H1aBiyogVNhQMQfFGL5zUfUGV2M-sSV6LHeUs,204
|
6
|
-
odoo/addons/account_reconcile_oca/i18n/account_reconcile_oca.pot,sha256=
|
6
|
+
odoo/addons/account_reconcile_oca/i18n/account_reconcile_oca.pot,sha256=vlHVCktaX5SroaT7L5nLHEXHkronUJWhXo5iF0U9eX4,25864
|
7
7
|
odoo/addons/account_reconcile_oca/i18n/ca.po,sha256=VieXzJBnsCZFMkFtMHnOZ9TdkAM7PFvdUfb1y8EOWHM,27750
|
8
|
-
odoo/addons/account_reconcile_oca/i18n/es.po,sha256=
|
8
|
+
odoo/addons/account_reconcile_oca/i18n/es.po,sha256=kmNZdQsnSQRgILsasQ-xwDD-UIYfkql_v_AFdVI9tMY,28785
|
9
9
|
odoo/addons/account_reconcile_oca/i18n/fr.po,sha256=g-PLDgIlvOZUoJpmUXPwPBO7WnJ_J4mPxbgB5VlQNes,27979
|
10
10
|
odoo/addons/account_reconcile_oca/i18n/hr.po,sha256=SyjIq5gCcSflt9TbGxGBqQFRV5rTYfN67jSGR2_l0PM,27179
|
11
11
|
odoo/addons/account_reconcile_oca/i18n/it.po,sha256=EA7cGFuC4ztU8g6TXOQgIteMC1sC-FgOFDJkT0Bt5-I,28419
|
@@ -17,12 +17,12 @@ odoo/addons/account_reconcile_oca/i18n/tr.po,sha256=jdrItgYAt4JAEpwbuSuy2vAq-Si_
|
|
17
17
|
odoo/addons/account_reconcile_oca/i18n/zh.po,sha256=i7HjN44XrHzZ-qIG994NXgaEvjYU10Cw0Jcp7HQGAWk,25765
|
18
18
|
odoo/addons/account_reconcile_oca/i18n/zh_CN.po,sha256=gHrxzsXR_B6rbs_0iU8_-9doeTZwiy-HmPtFoiiZJ3s,27504
|
19
19
|
odoo/addons/account_reconcile_oca/models/__init__.py,sha256=28wbZjUZa30uHQY10BMJtKQ_BqJgwLQMQvB9uv0H_fY,282
|
20
|
-
odoo/addons/account_reconcile_oca/models/account_account_reconcile.py,sha256=
|
20
|
+
odoo/addons/account_reconcile_oca/models/account_account_reconcile.py,sha256=ytgriYp_tkxeU0TN3_UHMqE6b4wXc0uqGiBjTqKXxVk,7111
|
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=
|
22
|
+
odoo/addons/account_reconcile_oca/models/account_bank_statement_line.py,sha256=6HDmhBoFXZFvWMsNNeEIeL924ZW8GjUXxuwHiSCDykw,52075
|
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=
|
25
|
+
odoo/addons/account_reconcile_oca/models/account_reconcile_abstract.py,sha256=oQO0dGk4BfQpR3uCAfL5IEUgv-94Blyw9lPRqrzNaDs,5080
|
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
|
@@ -31,7 +31,7 @@ odoo/addons/account_reconcile_oca/readme/ROADMAP.md,sha256=fxR8QnC8BkHyODdPScpgJ
|
|
31
31
|
odoo/addons/account_reconcile_oca/readme/USAGE.md,sha256=yNLGo35X7TW2TLyJqHU-gdQiXazW8Iu59rI0dpa4WjM,365
|
32
32
|
odoo/addons/account_reconcile_oca/security/ir.model.access.csv,sha256=XfN2EKOoChlEDonVd5DtodVAQyRbShiJ8nrXx6EwNmM,339
|
33
33
|
odoo/addons/account_reconcile_oca/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
34
|
-
odoo/addons/account_reconcile_oca/static/description/index.html,sha256=
|
34
|
+
odoo/addons/account_reconcile_oca/static/description/index.html,sha256=5laYl8gi3_Bf4nVuM5va-aWOtoHHmFRyQdYVTyrD-4E,13790
|
35
35
|
odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_controller.esm.js,sha256=k85Scd4skR5y56TvFVEqB_uf7vCD9Y7RpInETuNBAc8,4891
|
36
36
|
odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_kanban_record.esm.js,sha256=ewNK1VQgFZWccTiyJMKYkOG6KtbHHVnI2pdNy9kjkig,467
|
37
37
|
odoo/addons/account_reconcile_oca/static/src/js/reconcile/reconcile_renderer.esm.js,sha256=9NSr3iZ7H_QGTpixW5D4WEJuD_u4KRpdYwRmKqcML_k,2117
|
@@ -42,18 +42,18 @@ odoo/addons/account_reconcile_oca/static/src/js/reconcile_form/reconcile_form_re
|
|
42
42
|
odoo/addons/account_reconcile_oca/static/src/js/reconcile_form/reconcile_form_view.esm.js,sha256=tG43BF1TUtYmCdc89OKnma5210UvIjvomcuxDJ9_8hY,470
|
43
43
|
odoo/addons/account_reconcile_oca/static/src/js/reconcile_manual/reconcile_manual_controller.esm.js,sha256=JQeFCL7UxM4AhF9LZZAiLGUnHf--ftbS9E4T5CxswDU,1188
|
44
44
|
odoo/addons/account_reconcile_oca/static/src/js/reconcile_manual/reconcile_manual_view.esm.js,sha256=GXC6xTc3VYTXEZvX-bn9SH2ylQbN_4gXiLeIwuMIfxI,381
|
45
|
-
odoo/addons/account_reconcile_oca/static/src/js/reconcile_move_line/reconcile_move_line_controller.esm.js,sha256=
|
45
|
+
odoo/addons/account_reconcile_oca/static/src/js/reconcile_move_line/reconcile_move_line_controller.esm.js,sha256=3mApRNQb-3CXWRkLjjFMiFngTjonx6TPh_E7P2iZH3U,948
|
46
46
|
odoo/addons/account_reconcile_oca/static/src/js/reconcile_move_line/reconcile_move_line_renderer.esm.js,sha256=TwiLpAbPJtr9VDZs8ZDIVFoieiogueHnpw0n0a1P_Kk,605
|
47
|
-
odoo/addons/account_reconcile_oca/static/src/js/reconcile_move_line/reconcile_move_line_view.esm.js,sha256=
|
47
|
+
odoo/addons/account_reconcile_oca/static/src/js/reconcile_move_line/reconcile_move_line_view.esm.js,sha256=lWr_tCa44oMioQ2iXMhteGoxQOrrY6GxBp4wTnFGlrw,570
|
48
48
|
odoo/addons/account_reconcile_oca/static/src/js/widgets/reconcile_chatter_field.esm.js,sha256=w8vDPCCovRJRKYZtp1XnlWGNGXDfvoJYuttKF-jpTHw,902
|
49
|
-
odoo/addons/account_reconcile_oca/static/src/js/widgets/reconcile_data_widget.esm.js,sha256
|
50
|
-
odoo/addons/account_reconcile_oca/static/src/js/widgets/reconcile_move_line_widget.esm.js,sha256=
|
49
|
+
odoo/addons/account_reconcile_oca/static/src/js/widgets/reconcile_data_widget.esm.js,sha256=-m-It4krr0hLeRoM7VtiOdy7ZsutJPxokCY7HZRjfD8,3335
|
50
|
+
odoo/addons/account_reconcile_oca/static/src/js/widgets/reconcile_move_line_widget.esm.js,sha256=GnKtD-OhQRKuueaK0kcC4XzSYPPNlDqcARQNeJUS3cM,3803
|
51
51
|
odoo/addons/account_reconcile_oca/static/src/js/widgets/selection_badge_uncheck.esm.js,sha256=yFqG5t4wKA47k-wUMzPuDZ1AvILft6_hucGOz2YHWGE,836
|
52
52
|
odoo/addons/account_reconcile_oca/static/src/scss/reconcile.scss,sha256=b6clO2yWT91dEdTE3RcdORFE6dNqqzsXz3S0Rc5afZU,2318
|
53
|
-
odoo/addons/account_reconcile_oca/static/src/xml/reconcile.xml,sha256=
|
53
|
+
odoo/addons/account_reconcile_oca/static/src/xml/reconcile.xml,sha256=oTMZ-vgK_9-7uISjRTrfQeEjo95NbCCSN18uRYFHFkc,9411
|
54
54
|
odoo/addons/account_reconcile_oca/tests/__init__.py,sha256=8JhP4auByShS8Z_Ik5dShMuWdh1kBlYP_DLI4Ku8XWA,79
|
55
55
|
odoo/addons/account_reconcile_oca/tests/test_account_reconcile.py,sha256=MP5M-NsVhMoYiU675hr1nsvZRRK-4e5KUYMCCKTUHB8,10807
|
56
|
-
odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py,sha256=
|
56
|
+
odoo/addons/account_reconcile_oca/tests/test_bank_account_reconcile.py,sha256=km7zs8uO6wabfryrsg8VLd5yT0AhkRaI0nI_MHOx-Es,53449
|
57
57
|
odoo/addons/account_reconcile_oca/views/account_account.xml,sha256=0RiPmzfRUj54oMYKWM7mLnZL-5IhI5W8fiRruHL0SYc,866
|
58
58
|
odoo/addons/account_reconcile_oca/views/account_account_reconcile.xml,sha256=2FKosNTl4hVC_yVq8uRzZvMMrXyEttK_YTsdnV8o0NI,7016
|
59
59
|
odoo/addons/account_reconcile_oca/views/account_bank_statement.xml,sha256=QrjQZ3OTsnbopdLnnsFaZ0f7ncLkOUbtVj9osXdxw5k,2436
|
@@ -62,7 +62,7 @@ odoo/addons/account_reconcile_oca/views/account_journal.xml,sha256=T5tZ5Ev0psYp7
|
|
62
62
|
odoo/addons/account_reconcile_oca/views/account_move.xml,sha256=BnvchVpOJ31M-kCoe6AHDxHMfrEEgJTPPysxguX3xgE,975
|
63
63
|
odoo/addons/account_reconcile_oca/views/account_move_line.xml,sha256=Kr_ET1IAat3B8UoW6VPQO3q88JLVdE5-5jpb13ioCbY,5405
|
64
64
|
odoo/addons/account_reconcile_oca/views/res_config_settings.xml,sha256=PxIqWILg_L_ahR-SDlDWEqWDJKNumPRifFAGF0BG57E,807
|
65
|
-
odoo_addon_account_reconcile_oca-17.0.1.5.
|
66
|
-
odoo_addon_account_reconcile_oca-17.0.1.5.
|
67
|
-
odoo_addon_account_reconcile_oca-17.0.1.5.
|
68
|
-
odoo_addon_account_reconcile_oca-17.0.1.5.
|
65
|
+
odoo_addon_account_reconcile_oca-17.0.1.5.5.dist-info/METADATA,sha256=EPb_h79TRCFhoHvAp9R1ZRTvXx7Cpn4tMmhTf_tLuPc,4388
|
66
|
+
odoo_addon_account_reconcile_oca-17.0.1.5.5.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
|
67
|
+
odoo_addon_account_reconcile_oca-17.0.1.5.5.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
68
|
+
odoo_addon_account_reconcile_oca-17.0.1.5.5.dist-info/RECORD,,
|
File without changes
|