odoo-addon-account-banking-mandate 15.0.2.1.1.2__py3-none-any.whl → 15.0.2.1.2__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/data/mandate_reference_sequence.xml +1 -0
- odoo/addons/account_banking_mandate/models/account_banking_mandate.py +11 -9
- odoo/addons/account_banking_mandate/models/account_move.py +14 -13
- odoo/addons/account_banking_mandate/static/description/index.html +1 -1
- odoo/addons/account_banking_mandate/tests/test_mandate.py +11 -12
- odoo/addons/account_banking_mandate/views/account_banking_mandate_view.xml +1 -1
- {odoo_addon_account_banking_mandate-15.0.2.1.1.2.dist-info → odoo_addon_account_banking_mandate-15.0.2.1.2.dist-info}/METADATA +2 -2
- {odoo_addon_account_banking_mandate-15.0.2.1.1.2.dist-info → odoo_addon_account_banking_mandate-15.0.2.1.2.dist-info}/RECORD +12 -12
- {odoo_addon_account_banking_mandate-15.0.2.1.1.2.dist-info → odoo_addon_account_banking_mandate-15.0.2.1.2.dist-info}/WHEEL +1 -1
- {odoo_addon_account_banking_mandate-15.0.2.1.1.2.dist-info → odoo_addon_account_banking_mandate-15.0.2.1.2.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:eb755240541744fb6aecf4579f806bc07acbed34de0f4f653adc8955caea4641
|
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
12
|
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
|
@@ -60,7 +60,7 @@ class AccountBankingMandate(models.Model):
|
|
|
60
60
|
required=True,
|
|
61
61
|
default=lambda self: self.env.company,
|
|
62
62
|
)
|
|
63
|
-
unique_mandate_reference = fields.Char(tracking=10, copy=False)
|
|
63
|
+
unique_mandate_reference = fields.Char(tracking=10, copy=False, default="/")
|
|
64
64
|
signature_date = fields.Date(
|
|
65
65
|
string="Date of Signature of the Mandate",
|
|
66
66
|
tracking=50,
|
|
@@ -173,14 +173,16 @@ class AccountBankingMandate(models.Model):
|
|
|
173
173
|
% mandate.unique_mandate_reference
|
|
174
174
|
)
|
|
175
175
|
|
|
176
|
-
@api.
|
|
177
|
-
def create(self,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
176
|
+
@api.model_create_multi
|
|
177
|
+
def create(self, vals_list):
|
|
178
|
+
for vals in vals_list:
|
|
179
|
+
unique_mandate_reference = vals.get("unique_mandate_reference", "/")
|
|
180
|
+
if unique_mandate_reference == "/":
|
|
181
|
+
vals["unique_mandate_reference"] = (
|
|
182
|
+
self.env["ir.sequence"].next_by_code("account.banking.mandate")
|
|
183
|
+
or "New"
|
|
184
|
+
)
|
|
185
|
+
return super().create(vals_list)
|
|
184
186
|
|
|
185
187
|
@api.onchange("partner_bank_id")
|
|
186
188
|
def mandate_partner_bank_change(self):
|
|
@@ -20,25 +20,26 @@ class AccountMove(models.Model):
|
|
|
20
20
|
related="payment_mode_id.payment_method_id.mandate_required", readonly=True
|
|
21
21
|
)
|
|
22
22
|
|
|
23
|
-
@api.
|
|
24
|
-
def create(self,
|
|
23
|
+
@api.model_create_multi
|
|
24
|
+
def create(self, vals_list):
|
|
25
25
|
"""Fill the mandate_id from the partner if none is provided on
|
|
26
26
|
creation, using same method as upstream."""
|
|
27
27
|
onchanges = {
|
|
28
28
|
"_onchange_partner_id": ["mandate_id"],
|
|
29
29
|
"_onchange_payment_mode_id": ["mandate_id"],
|
|
30
30
|
}
|
|
31
|
-
for
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
for vals in vals_list:
|
|
32
|
+
for onchange_method, changed_fields in list(onchanges.items()):
|
|
33
|
+
if any(f not in vals for f in changed_fields):
|
|
34
|
+
move = self.new(vals)
|
|
35
|
+
move = move.with_company(move.company_id.id)
|
|
36
|
+
getattr(move, onchange_method)()
|
|
37
|
+
for field in changed_fields:
|
|
38
|
+
if field not in vals and move[field]:
|
|
39
|
+
vals[field] = move._fields[field].convert_to_write(
|
|
40
|
+
move[field], move
|
|
41
|
+
)
|
|
42
|
+
return super().create(vals_list)
|
|
42
43
|
|
|
43
44
|
def set_mandate(self):
|
|
44
45
|
if self.payment_mode_id.payment_method_id.mandate_required:
|
|
@@ -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:eb755240541744fb6aecf4579f806bc07acbed34de0f4f653adc8955caea4641
|
|
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/15.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-15-0/bank-payment-15-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=15.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.
|
|
@@ -175,9 +175,8 @@ class TestMandate(TransactionCase):
|
|
|
175
175
|
|
|
176
176
|
def test_mandate_reference_03(self):
|
|
177
177
|
"""
|
|
178
|
-
Test case: create a mandate with "
|
|
179
|
-
Expected result: the reference of the created mandate is
|
|
180
|
-
is not "New"
|
|
178
|
+
Test case: create a mandate with "TEST" as reference
|
|
179
|
+
Expected result: the reference of the created mandate is "TEST"
|
|
181
180
|
"""
|
|
182
181
|
bank_account = self.env.ref("account_payment_mode.res_partner_12_iban")
|
|
183
182
|
mandate = self.env["account.banking.mandate"].create(
|
|
@@ -185,16 +184,16 @@ class TestMandate(TransactionCase):
|
|
|
185
184
|
"partner_bank_id": bank_account.id,
|
|
186
185
|
"signature_date": "2015-01-01",
|
|
187
186
|
"company_id": self.company.id,
|
|
188
|
-
"unique_mandate_reference": "
|
|
187
|
+
"unique_mandate_reference": "TEST",
|
|
189
188
|
}
|
|
190
189
|
)
|
|
191
190
|
self.assertTrue(mandate.unique_mandate_reference)
|
|
192
|
-
self.
|
|
191
|
+
self.assertEqual(mandate.unique_mandate_reference, "TEST")
|
|
193
192
|
|
|
194
|
-
def
|
|
193
|
+
def test_mandate_reference_04(self):
|
|
195
194
|
"""
|
|
196
|
-
Test case: create a mandate with
|
|
197
|
-
Expected result: the reference of the created mandate is not
|
|
195
|
+
Test case: create a mandate with "/" as reference
|
|
196
|
+
Expected result: the reference of the created mandate is not "/"
|
|
198
197
|
"""
|
|
199
198
|
bank_account = self.env.ref("account_payment_mode.res_partner_12_iban")
|
|
200
199
|
mandate = self.env["account.banking.mandate"].create(
|
|
@@ -202,14 +201,15 @@ class TestMandate(TransactionCase):
|
|
|
202
201
|
"partner_bank_id": bank_account.id,
|
|
203
202
|
"signature_date": "2015-01-01",
|
|
204
203
|
"company_id": self.company.id,
|
|
205
|
-
"unique_mandate_reference":
|
|
204
|
+
"unique_mandate_reference": "/",
|
|
206
205
|
}
|
|
207
206
|
)
|
|
208
207
|
self.assertTrue(mandate.unique_mandate_reference)
|
|
208
|
+
self.assertNotEqual(mandate.unique_mandate_reference, "/")
|
|
209
209
|
|
|
210
|
-
def
|
|
210
|
+
def test_mandate_reference_05(self):
|
|
211
211
|
"""
|
|
212
|
-
Test case: create a mandate
|
|
212
|
+
Test case: create a mandate without reference
|
|
213
213
|
Expected result: the reference of the created mandate is not empty
|
|
214
214
|
"""
|
|
215
215
|
bank_account = self.env.ref("account_payment_mode.res_partner_12_iban")
|
|
@@ -218,7 +218,6 @@ class TestMandate(TransactionCase):
|
|
|
218
218
|
"partner_bank_id": bank_account.id,
|
|
219
219
|
"signature_date": "2015-01-01",
|
|
220
220
|
"company_id": self.company.id,
|
|
221
|
-
"unique_mandate_reference": "",
|
|
222
221
|
}
|
|
223
222
|
)
|
|
224
223
|
self.assertTrue(mandate.unique_mandate_reference)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-account-banking-mandate
|
|
3
|
-
Version: 15.0.2.1.
|
|
3
|
+
Version: 15.0.2.1.2
|
|
4
4
|
Summary: Banking mandates
|
|
5
5
|
Home-page: https://github.com/OCA/bank-payment
|
|
6
6
|
Author: Compassion CH, Tecnativa, Akretion, Odoo Community Association (OCA)
|
|
@@ -25,7 +25,7 @@ Account Banking Mandate
|
|
|
25
25
|
!! This file is generated by oca-gen-addon-readme !!
|
|
26
26
|
!! changes will be overwritten. !!
|
|
27
27
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
28
|
-
!! source digest: sha256:
|
|
28
|
+
!! source digest: sha256:eb755240541744fb6aecf4579f806bc07acbed34de0f4f653adc8955caea4641
|
|
29
29
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
30
30
|
|
|
31
31
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
odoo/addons/account_banking_mandate/README.rst,sha256=
|
|
1
|
+
odoo/addons/account_banking_mandate/README.rst,sha256=prDZWDqZkRCW1JUalQqXYAs4rSmoU0Rpne3gJ9IYI3E,3855
|
|
2
2
|
odoo/addons/account_banking_mandate/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
|
3
|
-
odoo/addons/account_banking_mandate/__manifest__.py,sha256=
|
|
4
|
-
odoo/addons/account_banking_mandate/data/mandate_reference_sequence.xml,sha256=
|
|
3
|
+
odoo/addons/account_banking_mandate/__manifest__.py,sha256=DUPvvywSOr1PzBJBhu9TjWeEhjijdqAeLyAhUA4gJ6Q,1155
|
|
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=sqlXsg499kZKKLOVZ5olAoJfhP-URACI15DwDJAPWCE,22762
|
|
6
6
|
odoo/addons/account_banking_mandate/i18n/am.po,sha256=ANqxmslz1nbPj0vFjr8d1nkp-QlLKoacrcrV18EloME,23146
|
|
7
7
|
odoo/addons/account_banking_mandate/i18n/ar.po,sha256=R8X_F9dxNfMHgaQoMIqgy2iDdf4Os1qBphEcQe5DYYY,23162
|
|
@@ -39,8 +39,8 @@ odoo/addons/account_banking_mandate/i18n/th.po,sha256=YFAEfQk9pIszxayVvKM7inFgSP
|
|
|
39
39
|
odoo/addons/account_banking_mandate/i18n/tr.po,sha256=mqxXNolM5QuId3QJbQUy7qbPlMRQadKrDqXWK2YlQN8,23128
|
|
40
40
|
odoo/addons/account_banking_mandate/i18n/vi.po,sha256=GonFe38o1nztqeqOXL-bxN48ePmTG7uWgT2ABpCIg5M,23073
|
|
41
41
|
odoo/addons/account_banking_mandate/models/__init__.py,sha256=h7Yg6QxhBEd_GVy6HfsDLkYks22cRkdZo9xvLwhuwFU,226
|
|
42
|
-
odoo/addons/account_banking_mandate/models/account_banking_mandate.py,sha256=
|
|
43
|
-
odoo/addons/account_banking_mandate/models/account_move.py,sha256=
|
|
42
|
+
odoo/addons/account_banking_mandate/models/account_banking_mandate.py,sha256=mx8RCm7387ytI3442Gl-cb9evjRr2njBrR50eL5U2qM,7767
|
|
43
|
+
odoo/addons/account_banking_mandate/models/account_move.py,sha256=K7HQGKYPz83le9E0sQI36Wusr7u8aLYwrdHZnh-mIIM,2130
|
|
44
44
|
odoo/addons/account_banking_mandate/models/account_move_line.py,sha256=7-IIKtt2-6xTerBapvGXria5lxWIpm31yIoibfQiADo,1214
|
|
45
45
|
odoo/addons/account_banking_mandate/models/account_payment_line.py,sha256=0q6nHZht--Il3U3ryjdAJD6WHloA1VYupJelD6sLf6M,2724
|
|
46
46
|
odoo/addons/account_banking_mandate/models/account_payment_method.py,sha256=Ffp7g6a6tQs4UrxSJb7lvVz4e8fP98kDngPEQm0GsSQ,458
|
|
@@ -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=KdYeJthULguOg_xDbofH2uNaSj0ht4DKtOQ43_00ZGM,14287
|
|
57
57
|
odoo/addons/account_banking_mandate/tests/__init__.py,sha256=VYtfoW8h3bB01yKyMfXK9lLWooWPaxF2lTd40c5xwUo,62
|
|
58
58
|
odoo/addons/account_banking_mandate/tests/test_invoice_mandate.py,sha256=TmGQqglsJ_csl6xKANTkfAnRuEThiGgeus-5f-88ASU,10982
|
|
59
|
-
odoo/addons/account_banking_mandate/tests/test_mandate.py,sha256=
|
|
60
|
-
odoo/addons/account_banking_mandate/views/account_banking_mandate_view.xml,sha256=
|
|
59
|
+
odoo/addons/account_banking_mandate/tests/test_mandate.py,sha256=u3zJEOYT3-7JZ7AlY8OU9Sqv5zY_6gWTt64Hm7SsTO0,9067
|
|
60
|
+
odoo/addons/account_banking_mandate/views/account_banking_mandate_view.xml,sha256=0BBJ6EoGeuueIRdaNepqkNIZMSNN0OLGsRNRnxqa-eU,10059
|
|
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=-OG2FYOgvx8quFVoJSuVkK7aHd9BMNsfdBFociW0zZk,1364
|
|
66
|
-
odoo_addon_account_banking_mandate-15.0.2.1.
|
|
67
|
-
odoo_addon_account_banking_mandate-15.0.2.1.
|
|
68
|
-
odoo_addon_account_banking_mandate-15.0.2.1.
|
|
69
|
-
odoo_addon_account_banking_mandate-15.0.2.1.
|
|
66
|
+
odoo_addon_account_banking_mandate-15.0.2.1.2.dist-info/METADATA,sha256=TzOA2tDZmwG-kx0mqE9lT5eQU8EotwpCX2IU2VXoArI,4536
|
|
67
|
+
odoo_addon_account_banking_mandate-15.0.2.1.2.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
|
|
68
|
+
odoo_addon_account_banking_mandate-15.0.2.1.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
69
|
+
odoo_addon_account_banking_mandate-15.0.2.1.2.dist-info/RECORD,,
|