account-invoicing
account-invoicing copied to clipboard
[16.0][MIG] account_invoice_validation_queued
Standard MIgrated and Update readme
@Saran440 (and @pedrobaeza as module author): do you know if there is a specific reason why it's not possible to validate 2 invoices with a different value in field "date"?
If this is done to preserve invoicing sequence from job queue completion order, seems to me the check could be done on invoice_date field. Is there something I'm missing?
I can't say, as I'm not using this module in newer versions (the speed improvements done on core have been enough for our customers).
@francesco-ooops That's a good question. I'm not sure myself. I migrated from standard. However, In my project I inherit this module for delete code validation too.
Should we delete it in this module because job queue processes tasks one by one? @pedrobaeza
@Saran440 I think the only thing we must make sure is not to validate together invoices with different invoice date as to preserve sequence
currently this check is done on field "date" which is not a visible field in the form and AFAIU is = creation date (not sure what is the purpose of this field)
@Saran440 @hbrunn How is the migration of this module going? Could we help somehow in this migration? Thanks!
@adriapalleja Could you please review and approve this PR if it works? We can merge once 2 reviewers approve.
@Saran440 I've just reviewed and tested the module. Everything is working fine on my side, except from this topic in "Usage":
- If any of the invoices is already enqueued, there will be a message saying so and avoiding to perform the process
The process is working as expected, but I would remove "there will be a message saying so" from the Usage Readme.
Hi @Saran440 ! Could you apply the minor changes suggested in order to move forward with this PR? Thanks!
For the record, we edited this module internally by implementing the error message "You can't enqueue invoices with different dates." (seems to appear only in translation files at the moment) and forcing the user to validate invoices grouped by date (from older to newer in order to preserve sequence)
If date is not set in invoice, then "today" is used
@francesco-ooops I tested and I think this version can use invoice with multiple dates. if you find any bugs, please explain and provide the steps to reproduce the error, and we will fix it.
For this module, it runs 1 queue per document, so the sequence will function correctly. I have removed the validation error in this module because I couldn't find a reason for check.
@adriapalleja I updated readme, please recheck.
@Saran440 if you're positive that enqueuing invoices with different dates results in invoice numbers following sequence correctly, then it's good for me 👍
merge?
@hbrunn Hi, Can you help merge, please?
/ocabot merge nobump
What a great day to merge this nice PR. Let's do it! Prepared branch 16.0-ocabot-merge-pr-1694-by-hbrunn-bump-nobump, awaiting test results.
Congratulations, your PR was merged at 8c8b206c48e930f35b91bb3cf163afe781335573. Thanks a lot for contributing to OCA. ❤️