account_invoice_constraint_chronology - Check chronology when revalidate an invoice
SoniaViciana opened this issue · 4 comments
Odoo v16
Module
account_invoice_constraint_chronology -> #1474
Describe the bug
When I turn an invoice to draft, chronology check not performed on revalidate. Steps to reproduce:
https://www.awesomescreenshot.com/video/17885439?key=2828369cbb8bd0ebd30e503bbb70a3ca
Hi Sonia,
In my opinion, the behavior that you describe is not a 'bug'.
Because (in the code) when you turn back an invoice to draft, it already has a name set so it will keep it and we won't check the constraint chronology in this case.
I don't know what others think about it?
A feature of this module ensures that when an invoice is validated, no other invoice with a larger date is validated. If this is the case, an error is triggered. When an already validated invoice is put back into draft, this check is deactivated, as it is almost certain that an invoice with a higher date has already been validated. Feel free to reopen if necessary.
Hello @AnizR @adrienpeiffer ,
Please let me reopen the issue.
We have 2 use cases that this module were controlling before
-
If you have a draft invoice with past date like 30th may and today is 22th june, when you create an invoice today and try to validate it don't allow.
- This and only this works
-
If you have and
-
Invoice MAY 15th INV/2023/0001
-
Invoice MAY 20th INV/2023/0002
-
Invoice MAY 25th INV/2023/0003
-
This module should control that you never you can change date in the invoice INV/2023/0002 to the MAY 14th or the MAY 26th
-
In any case I think that it is a improvement of the module really desired 😄
I agree with improvement #1666
Let me know please
Thank you!