Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
erp5
Commits
72b6cb84
Commit
72b6cb84
authored
Jun 02, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
payment_mean_sepa: refuse generating file when payments are still being selected
parent
089c8a92
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
bt5/erp5_payment_mean_sepa/SkinTemplateItem/portal_skins/erp5_payment_mean_sepa/PaymentTransactionGroup_generateSEPACreditTransferFile.py
...PaymentTransactionGroup_generateSEPACreditTransferFile.py
+7
-0
bt5/erp5_payment_mean_sepa/TestTemplateItem/portal_components/test.erp5.testPaymentTransactionGroupSEPA.py
...l_components/test.erp5.testPaymentTransactionGroupSEPA.py
+12
-1
No files found.
bt5/erp5_payment_mean_sepa/SkinTemplateItem/portal_skins/erp5_payment_mean_sepa/PaymentTransactionGroup_generateSEPACreditTransferFile.py
View file @
72b6cb84
from
Products.ERP5Type.Message
import
translateString
# Same check as in PaymentTransactionGroup_selectPaymentTransactionLineList
tag
=
'PaymentTransactionGroup_selectPaymentTransactionList'
context
.
serialize
()
if
context
.
getPortalObject
().
portal_activities
.
countMessageWithTag
(
tag
,):
return
context
.
Base_redirect
(
form_id
,
keep_items
=
dict
(
portal_status_message
=
translateString
(
"Some payments are still beeing processed in the background, please retry later"
)))
assert
version
==
'pain.001.001.02'
,
'Unsupported version'
portal
=
context
.
getPortalObject
()
...
...
bt5/erp5_payment_mean_sepa/TestTemplateItem/portal_components/test.erp5.testPaymentTransactionGroupSEPA.py
View file @
72b6cb84
...
...
@@ -198,7 +198,6 @@ class TestPaymentTransactionGroupPaymentSEPA(AccountingTestCase):
[
'PT-1'
,
'PT-2'
],
)
def
test_generate_sepa_credit_transfer_action
(
self
):
ptg
=
self
.
_createPTG
()
ret
=
ptg
.
PaymentTransactionGroup_generateSEPACreditTransferFile
(
...
...
@@ -224,6 +223,18 @@ class TestPaymentTransactionGroupPaymentSEPA(AccountingTestCase):
[
'300.00'
],
)
def
test_generate_sepa_credit_transfer_refused_when_activities_are_pending
(
self
):
ptg
=
self
.
_createPTG
()
ptg
.
PaymentTransactionGroup_selectPaymentTransactionLineList
(
select_mode
=
'stopped_or_delivered'
)
self
.
commit
()
ret
=
ptg
.
PaymentTransactionGroup_generateSEPACreditTransferFile
(
version
=
'pain.001.001.02'
)
self
.
assertEqual
(
urlparse
.
parse_qs
(
urlparse
.
urlparse
(
ret
).
query
)[
'portal_status_message'
],
[
'Some payments are still beeing processed in the background, please retry later'
])
self
.
tic
()
class
TestSEPAConstraints
(
AccountingTestCase
):
def
afterSetUp
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment