[14.0]account_lock_to_date : Error when defining new lock to date
Opened this issue · 0 comments
olimalt commented
Module
account_lock_to_date
Describe the bug
When we change the lock to date for a new one (after the old one) it launches the error "The new lock to date for advisors must be set after the previous lock to date"
To Reproduce
Define a lock to date and make another one after the previous one and you get the error.
Affected versions:
14.0 and probably 15.0
Expected behavior
It should let you define a date that is after the old one
Additional context
it is in this code :
File : account_lock_to_date/models/res_company.py
if (
old_fiscalyear_lock_to_date
and fiscalyear_lock_to_date
and fiscalyear_lock_to_date > old_fiscalyear_lock_to_date
):
raise ValidationError(
_(
"The new lock to date for advisors must be set after "
"the previous lock to date."
)
)
It should be the raised the ValidationError if the fiscalyear_lock_to_date < old_fiscalyear_lock_to_date
If someone could fix it please :)