Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0]account_lock_to_date : Error when defining new lock to date #1844

Open
olimalt opened this issue Apr 2, 2024 · 0 comments
Open

[14.0]account_lock_to_date : Error when defining new lock to date #1844

olimalt opened this issue Apr 2, 2024 · 0 comments
Labels

Comments

@olimalt
Copy link

olimalt commented Apr 2, 2024

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 :)

@olimalt olimalt added the bug label Apr 2, 2024
@olimalt olimalt changed the title [14.0]account_lock_to_date [14.0]account_lock_to_date : Error when defining new lock to date Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant