odoo-addon-account-banking-mandate 16.0.1.3.2.2__py3-none-any.whl → 16.0.1.3.4__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_banking_mandate/README.rst +1 -1
- odoo/addons/account_banking_mandate/__manifest__.py +1 -1
- odoo/addons/account_banking_mandate/static/description/index.html +1 -1
- odoo/addons/account_banking_mandate/tests/test_invoice_mandate.py +53 -48
- odoo/addons/account_banking_mandate/tests/test_mandate.py +26 -11
- {odoo_addon_account_banking_mandate-16.0.1.3.2.2.dist-info → odoo_addon_account_banking_mandate-16.0.1.3.4.dist-info}/METADATA +4 -4
- {odoo_addon_account_banking_mandate-16.0.1.3.2.2.dist-info → odoo_addon_account_banking_mandate-16.0.1.3.4.dist-info}/RECORD +9 -9
- {odoo_addon_account_banking_mandate-16.0.1.3.2.2.dist-info → odoo_addon_account_banking_mandate-16.0.1.3.4.dist-info}/WHEEL +1 -1
- {odoo_addon_account_banking_mandate-16.0.1.3.2.2.dist-info → odoo_addon_account_banking_mandate-16.0.1.3.4.dist-info}/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ Account Banking Mandate
|
|
|
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:3601215eba30294d27cc9f7354971231ba35c0590892640eabdc73468fe40405
|
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
12
|
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
|
@@ -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:3601215eba30294d27cc9f7354971231ba35c0590892640eabdc73468fe40405
|
|
371
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
372
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/bank-payment/tree/16.0/account_banking_mandate"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_mandate"><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/bank-payment&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 module adds a generic model for banking mandates.
|
|
@@ -5,11 +5,13 @@ from unittest.mock import patch
|
|
|
5
5
|
|
|
6
6
|
from odoo import fields
|
|
7
7
|
from odoo.exceptions import UserError
|
|
8
|
-
from odoo.tests.common import TransactionCase
|
|
8
|
+
from odoo.tests.common import TransactionCase, tagged
|
|
9
9
|
|
|
10
10
|
from odoo.addons.account.models.account_payment_method import AccountPaymentMethod
|
|
11
|
+
from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
|
|
11
12
|
|
|
12
13
|
|
|
14
|
+
@tagged("post_install", "-at_install")
|
|
13
15
|
class TestInvoiceMandate(TransactionCase):
|
|
14
16
|
def test_post_invoice_01(self):
|
|
15
17
|
self.assertEqual(self.invoice.mandate_id, self.mandate)
|
|
@@ -192,112 +194,115 @@ class TestInvoiceMandate(TransactionCase):
|
|
|
192
194
|
with self.assertRaises(UserError):
|
|
193
195
|
invoice.mandate_id = mandate_2
|
|
194
196
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
@classmethod
|
|
198
|
+
def _create_res_partner(cls, name):
|
|
199
|
+
return cls.env["res.partner"].create({"name": name})
|
|
197
200
|
|
|
198
|
-
|
|
199
|
-
|
|
201
|
+
@classmethod
|
|
202
|
+
def _create_res_bank(cls, name, bic, city, country):
|
|
203
|
+
return cls.env["res.bank"].create(
|
|
200
204
|
{"name": name, "bic": bic, "city": city, "country": country.id}
|
|
201
205
|
)
|
|
202
206
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
207
|
+
@classmethod
|
|
208
|
+
def setUpClass(cls):
|
|
209
|
+
res = super().setUpClass()
|
|
210
|
+
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
|
|
211
|
+
cls.company = cls.env.ref("base.main_company")
|
|
212
|
+
if not cls.company.chart_template_id:
|
|
213
|
+
# Load a CoA if there's none in the company
|
|
214
|
+
coa = cls.env.ref("l10n_generic_coa.configurable_chart_template", False)
|
|
215
|
+
if not coa:
|
|
216
|
+
# Load the first available CoA
|
|
217
|
+
coa = cls.env["account.chart.template"].search(
|
|
218
|
+
[("visible", "=", True)], limit=1
|
|
219
|
+
)
|
|
220
|
+
coa.try_loading(company=cls.company, install_demo=False)
|
|
206
221
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
"ACME Bank", "GEBABEBB03B", "Charleroi",
|
|
222
|
+
cls.partner = cls._create_res_partner("Peter with ACME Bank")
|
|
223
|
+
cls.acme_bank = cls._create_res_bank(
|
|
224
|
+
"ACME Bank", "GEBABEBB03B", "Charleroi", cls.env.ref("base.be")
|
|
210
225
|
)
|
|
211
|
-
|
|
212
|
-
bank_account = self.env["res.partner.bank"].create(
|
|
226
|
+
bank_account = cls.env["res.partner.bank"].create(
|
|
213
227
|
{
|
|
214
228
|
"acc_number": "0023032234211123",
|
|
215
|
-
"partner_id":
|
|
216
|
-
"bank_id":
|
|
217
|
-
"company_id":
|
|
229
|
+
"partner_id": cls.partner.id,
|
|
230
|
+
"bank_id": cls.acme_bank.id,
|
|
231
|
+
"company_id": cls.company.id,
|
|
218
232
|
}
|
|
219
233
|
)
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
self.mandate = self.env["account.banking.mandate"].create(
|
|
234
|
+
cls.company_2 = cls.env["res.company"].create({"name": "Company 2"})
|
|
235
|
+
cls.mandate = cls.env["account.banking.mandate"].create(
|
|
224
236
|
{
|
|
225
237
|
"partner_bank_id": bank_account.id,
|
|
226
238
|
"signature_date": "2015-01-01",
|
|
227
|
-
"company_id":
|
|
239
|
+
"company_id": cls.company.id,
|
|
228
240
|
}
|
|
229
241
|
)
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
self.mode_inbound_acme = self.env["account.payment.mode"].create(
|
|
242
|
+
cls.mandate.validate()
|
|
243
|
+
cls.mode_inbound_acme = cls.env["account.payment.mode"].create(
|
|
234
244
|
{
|
|
235
245
|
"name": "Inbound Credit ACME Bank",
|
|
236
|
-
"company_id":
|
|
246
|
+
"company_id": cls.company.id,
|
|
237
247
|
"bank_account_link": "variable",
|
|
238
|
-
"payment_method_id":
|
|
248
|
+
"payment_method_id": cls.env.ref(
|
|
239
249
|
"account.account_payment_method_manual_in"
|
|
240
250
|
).id,
|
|
241
251
|
}
|
|
242
252
|
)
|
|
243
|
-
bank_journal =
|
|
253
|
+
bank_journal = cls.env["account.journal"].search(
|
|
244
254
|
[
|
|
245
255
|
("type", "=", "bank"),
|
|
246
|
-
("company_id", "=",
|
|
256
|
+
("company_id", "=", cls.company.id),
|
|
247
257
|
],
|
|
248
258
|
limit=1,
|
|
249
259
|
)
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
self.invoice_account = self.env["account.account"].search(
|
|
260
|
+
cls.mode_inbound_acme.variable_journal_ids = bank_journal
|
|
261
|
+
cls.mode_inbound_acme.payment_method_id.mandate_required = True
|
|
262
|
+
cls.mode_inbound_acme.payment_order_ok = True
|
|
263
|
+
cls.partner.customer_payment_mode_id = cls.mode_inbound_acme
|
|
264
|
+
cls.invoice_account = cls.env["account.account"].search(
|
|
257
265
|
[
|
|
258
266
|
("account_type", "=", "asset_receivable"),
|
|
259
|
-
("company_id", "=",
|
|
267
|
+
("company_id", "=", cls.company.id),
|
|
260
268
|
],
|
|
261
269
|
limit=1,
|
|
262
270
|
)
|
|
263
271
|
invoice_line_account = (
|
|
264
|
-
|
|
272
|
+
cls.env["account.account"]
|
|
265
273
|
.search(
|
|
266
274
|
[
|
|
267
275
|
("account_type", "=", "expense"),
|
|
268
|
-
("company_id", "=",
|
|
276
|
+
("company_id", "=", cls.company.id),
|
|
269
277
|
],
|
|
270
278
|
limit=1,
|
|
271
279
|
)
|
|
272
280
|
.id
|
|
273
281
|
)
|
|
274
|
-
|
|
275
282
|
invoice_vals = [
|
|
276
283
|
(
|
|
277
284
|
0,
|
|
278
285
|
0,
|
|
279
286
|
{
|
|
280
|
-
"product_id":
|
|
287
|
+
"product_id": cls.env.ref("product.product_product_4").id,
|
|
281
288
|
"quantity": 1.0,
|
|
282
289
|
"account_id": invoice_line_account,
|
|
283
290
|
"price_unit": 200.00,
|
|
284
291
|
},
|
|
285
292
|
)
|
|
286
293
|
]
|
|
287
|
-
|
|
288
|
-
self.invoice = self.env["account.move"].create(
|
|
294
|
+
cls.invoice = cls.env["account.move"].create(
|
|
289
295
|
{
|
|
290
|
-
"partner_id":
|
|
296
|
+
"partner_id": cls.partner.id,
|
|
291
297
|
"move_type": "out_invoice",
|
|
292
|
-
"company_id":
|
|
293
|
-
"journal_id":
|
|
298
|
+
"company_id": cls.company.id,
|
|
299
|
+
"journal_id": cls.env["account.journal"]
|
|
294
300
|
.search(
|
|
295
|
-
[("type", "=", "sale"), ("company_id", "=",
|
|
301
|
+
[("type", "=", "sale"), ("company_id", "=", cls.company.id)],
|
|
296
302
|
limit=1,
|
|
297
303
|
)
|
|
298
304
|
.id,
|
|
299
305
|
"invoice_line_ids": invoice_vals,
|
|
300
306
|
}
|
|
301
307
|
)
|
|
302
|
-
|
|
303
308
|
return res
|
|
@@ -5,24 +5,39 @@ from datetime import timedelta
|
|
|
5
5
|
|
|
6
6
|
from odoo import fields
|
|
7
7
|
from odoo.exceptions import UserError, ValidationError
|
|
8
|
-
from odoo.tests.common import TransactionCase
|
|
8
|
+
from odoo.tests.common import TransactionCase, tagged
|
|
9
9
|
|
|
10
|
+
from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
|
|
10
11
|
|
|
12
|
+
|
|
13
|
+
@tagged("post_install", "-at_install")
|
|
11
14
|
class TestMandate(TransactionCase):
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
@classmethod
|
|
16
|
+
def setUpClass(cls):
|
|
17
|
+
res = super(TestMandate, cls).setUpClass()
|
|
18
|
+
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
|
|
19
|
+
cls.company = cls.env.ref("base.main_company")
|
|
20
|
+
if not cls.company.chart_template_id:
|
|
21
|
+
# Load a CoA if there's none in the company
|
|
22
|
+
coa = cls.env.ref("l10n_generic_coa.configurable_chart_template", False)
|
|
23
|
+
if not coa:
|
|
24
|
+
# Load the first available CoA
|
|
25
|
+
coa = cls.env["account.chart.template"].search(
|
|
26
|
+
[("visible", "=", True)], limit=1
|
|
27
|
+
)
|
|
28
|
+
coa.try_loading(company=cls.company, install_demo=False)
|
|
29
|
+
cls.company_2 = cls.env["res.company"].create({"name": "Company 2"})
|
|
30
|
+
cls.company_2.partner_id.company_id = cls.company_2.id
|
|
31
|
+
cls.bank_account = cls.env.ref("account_payment_mode.res_partner_12_iban")
|
|
32
|
+
cls.bank_account.partner_id.company_id = cls.company.id
|
|
33
|
+
cls.mandate = cls.env["account.banking.mandate"].create(
|
|
20
34
|
{
|
|
21
|
-
"partner_bank_id":
|
|
35
|
+
"partner_bank_id": cls.bank_account.id,
|
|
22
36
|
"signature_date": "2015-01-01",
|
|
23
|
-
"company_id":
|
|
37
|
+
"company_id": cls.company.id,
|
|
24
38
|
}
|
|
25
39
|
)
|
|
40
|
+
return res
|
|
26
41
|
|
|
27
42
|
def test_mandate_01(self):
|
|
28
43
|
self.assertEqual(self.mandate.state, "draft")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-account_banking_mandate
|
|
3
|
-
Version: 16.0.1.3.
|
|
3
|
+
Version: 16.0.1.3.4
|
|
4
4
|
Summary: Banking mandates
|
|
5
5
|
Home-page: https://github.com/OCA/bank-payment
|
|
6
6
|
Author: Compassion CH, Tecnativa, Akretion, Therp B.V., Odoo Community Association (OCA)
|
|
@@ -12,8 +12,8 @@ Classifier: Framework :: Odoo :: 16.0
|
|
|
12
12
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Requires-Python: >=3.10
|
|
15
|
-
Requires-Dist: odoo-addon-account-payment-order
|
|
16
|
-
Requires-Dist: odoo
|
|
15
|
+
Requires-Dist: odoo-addon-account-payment-order<16.1dev,>=16.0dev
|
|
16
|
+
Requires-Dist: odoo<16.1dev,>=16.0a
|
|
17
17
|
|
|
18
18
|
=======================
|
|
19
19
|
Account Banking Mandate
|
|
@@ -24,7 +24,7 @@ Account Banking Mandate
|
|
|
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:3601215eba30294d27cc9f7354971231ba35c0590892640eabdc73468fe40405
|
|
28
28
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
29
29
|
|
|
30
30
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
odoo/addons/account_banking_mandate/README.rst,sha256
|
|
1
|
+
odoo/addons/account_banking_mandate/README.rst,sha256=ZW4RfUqdlg3vRInK9zkJqKrEPTTpkPLORYoIGJGL9b4,3917
|
|
2
2
|
odoo/addons/account_banking_mandate/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
|
3
|
-
odoo/addons/account_banking_mandate/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/account_banking_mandate/__manifest__.py,sha256=A5LR3BOHdgdwEVPG0kBMwyo5aHoZJulZBkyiqngasvM,1199
|
|
4
4
|
odoo/addons/account_banking_mandate/data/mandate_reference_sequence.xml,sha256=Pne_W7tMPmZPLXorBXyeP30OhAUl6tJaAoPFDCg4_ug,381
|
|
5
5
|
odoo/addons/account_banking_mandate/i18n/account_banking_mandate.pot,sha256=M4ArxbaxjQDHrJNRuqwx43B_512mQFcdqU3LvyKgTvg,22264
|
|
6
6
|
odoo/addons/account_banking_mandate/i18n/am.po,sha256=LxemBs85czlD6QwYmL27bXmdCMzQz8nKAsWKT5L9HXs,22648
|
|
@@ -53,17 +53,17 @@ odoo/addons/account_banking_mandate/readme/USAGE.rst,sha256=bGf8r-kiaS29WfWjwEZL
|
|
|
53
53
|
odoo/addons/account_banking_mandate/security/ir.model.access.csv,sha256=66g45xnkyv9SFcqo06-lhF_ffqxLVDfTSiChc_MSxNQ,358
|
|
54
54
|
odoo/addons/account_banking_mandate/security/mandate_security.xml,sha256=WbewZ27MzIpwIwNm22uZSxgDPejYQ7fkCtAdaJJqIwc,762
|
|
55
55
|
odoo/addons/account_banking_mandate/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
56
|
-
odoo/addons/account_banking_mandate/static/description/index.html,sha256=
|
|
56
|
+
odoo/addons/account_banking_mandate/static/description/index.html,sha256=vDqJ1qMuOaLk4cKXSHcLsvKE1URKKQOulwOmsFzBJKc,14487
|
|
57
57
|
odoo/addons/account_banking_mandate/tests/__init__.py,sha256=VYtfoW8h3bB01yKyMfXK9lLWooWPaxF2lTd40c5xwUo,62
|
|
58
|
-
odoo/addons/account_banking_mandate/tests/test_invoice_mandate.py,sha256=
|
|
59
|
-
odoo/addons/account_banking_mandate/tests/test_mandate.py,sha256=
|
|
58
|
+
odoo/addons/account_banking_mandate/tests/test_invoice_mandate.py,sha256=uovTHagdJPjVtcRSjA2vYZ68vOAocZDYKjhVi_noI_w,11024
|
|
59
|
+
odoo/addons/account_banking_mandate/tests/test_mandate.py,sha256=gf13DoLfw1qiCZmnmQjdHPpAuRkhiG14wzTncPusjQ4,8364
|
|
60
60
|
odoo/addons/account_banking_mandate/views/account_banking_mandate_view.xml,sha256=r97sI5fq2CmeDQl8WefgvTBaOinOCa9SQjAO0h2bjME,9995
|
|
61
61
|
odoo/addons/account_banking_mandate/views/account_move_view.xml,sha256=9MLc5hLMk1BLxBWoduB_0PeWPErkza6CkjThqqlSGeU,1103
|
|
62
62
|
odoo/addons/account_banking_mandate/views/account_payment_line.xml,sha256=t_tnl1-Kf8oPfwhRcy6zSfApiaETeVI_muBT8oNhJEo,1763
|
|
63
63
|
odoo/addons/account_banking_mandate/views/account_payment_method.xml,sha256=xjrdpvlyMtnAWsUz34EkTqqlferFW-kDKb9y653hncQ,711
|
|
64
64
|
odoo/addons/account_banking_mandate/views/res_partner.xml,sha256=GpZpEIPSBQhYNhKlGIthnkYABy4rNMF1z2keGRq0nH4,1087
|
|
65
65
|
odoo/addons/account_banking_mandate/views/res_partner_bank_view.xml,sha256=5RMHyCc4ouinkLNbHGJb9APNodbBLP3kB7JBFmY39oM,1439
|
|
66
|
-
odoo_addon_account_banking_mandate-16.0.1.3.
|
|
67
|
-
odoo_addon_account_banking_mandate-16.0.1.3.
|
|
68
|
-
odoo_addon_account_banking_mandate-16.0.1.3.
|
|
69
|
-
odoo_addon_account_banking_mandate-16.0.1.3.
|
|
66
|
+
odoo_addon_account_banking_mandate-16.0.1.3.4.dist-info/METADATA,sha256=Ef5NWcIL7ErKXIlA9M2yI1NhphwnHLNP7E-g5MaF-dE,4589
|
|
67
|
+
odoo_addon_account_banking_mandate-16.0.1.3.4.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
68
|
+
odoo_addon_account_banking_mandate-16.0.1.3.4.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
69
|
+
odoo_addon_account_banking_mandate-16.0.1.3.4.dist-info/RECORD,,
|