Tryton Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(329)

Issue 439791003: account_payment_sepa: Validate signature date

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 months, 2 weeks ago by nicoe
Modified:
6 months, 2 weeks ago
Reviewers:
ced, reviewbot
Visibility:
Public.

Description

account_payment_sepa: Validate signature date issue11897

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -1 line) Patch
M modules/account_payment_sepa/exceptions.py View 1 chunk +9 lines, -1 line 0 comments Download
M modules/account_payment_sepa/message.xml View 1 chunk +3 lines, -0 lines 1 comment Download
M modules/account_payment_sepa/payment.py View 2 chunks +41 lines, -0 lines 5 comments Download

Messages

Total messages: 3
nicoe
6 months, 2 weeks ago (2022-11-18 18:17:34 UTC) #1
reviewbot
patch is not applicable URL: https://codereview.tryton.org/439791003
6 months, 2 weeks ago (2022-11-18 18:19:29 UTC) #2
ced
6 months, 2 weeks ago (2022-11-18 18:37:06 UTC) #3
https://codereview.tryton.org/439791003/diff/420151003/modules/account_paymen...
File modules/account_payment_sepa/message.xml (right):

https://codereview.tryton.org/439791003/diff/420151003/modules/account_paymen...
modules/account_payment_sepa/message.xml:31: <field name="text">The mandate
"%(mandate)s" is using a signature date in the future.</field>
For me "is using" is not correct because it is a not an event but it is a fact
so it should be  like for stock "The mandate has a signature date in the
future".

https://codereview.tryton.org/439791003/diff/420151003/modules/account_paymen...
File modules/account_payment_sepa/payment.py (right):

https://codereview.tryton.org/439791003/diff/420151003/modules/account_paymen...
modules/account_payment_sepa/payment.py:691:
cls._validate_signature_date(records, field_names)
As this is a temporal condition, for me it is better to enforce it only on
validated transition.

https://codereview.tryton.org/439791003/diff/420151003/modules/account_paymen...
modules/account_payment_sepa/payment.py:712: raise_warning = user_id == 0 or
account_group in user.groups
Finally I'm wondering if using a warning for everyone is not simpler. This is
not that much critical.

https://codereview.tryton.org/439791003/diff/420151003/modules/account_paymen...
modules/account_payment_sepa/payment.py:713: tomorrow = Date.today() +
datetime.timedelta(days=1)
Should compute today with the mandate company in the context.

https://codereview.tryton.org/439791003/diff/420151003/modules/account_paymen...
modules/account_payment_sepa/payment.py:714: for mandate in records:
I think it is better to make a unique warning for all the records.

https://codereview.tryton.org/439791003/diff/420151003/modules/account_paymen...
modules/account_payment_sepa/payment.py:717: warning_name = '%s.signature_date'
% mandate
Use Warning.format
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld d9ca037-tainted