account-invoicing icon indicating copy to clipboard operation
account-invoicing copied to clipboard

[16.0][MIG] account_invoice_validation_queued

Open Saran440 opened this issue 1 year ago • 11 comments
trafficstars

Standard MIgrated and Update readme

Saran440 avatar Mar 28 '24 06:03 Saran440

@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?

francesco-ooops avatar Apr 08 '24 15:04 francesco-ooops

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

pedrobaeza avatar Apr 08 '24 16:04 pedrobaeza

@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 avatar Apr 09 '24 04:04 Saran440

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

francesco-ooops avatar Apr 09 '24 10:04 francesco-ooops

@Saran440 @hbrunn How is the migration of this module going? Could we help somehow in this migration? Thanks!

adriapalleja avatar Aug 15 '24 09:08 adriapalleja

@adriapalleja Could you please review and approve this PR if it works? We can merge once 2 reviewers approve.

Saran440 avatar Aug 15 '24 10:08 Saran440

@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.

adriapalleja avatar Aug 19 '24 11:08 adriapalleja

Hi @Saran440 ! Could you apply the minor changes suggested in order to move forward with this PR? Thanks!

adriapalleja avatar Sep 16 '24 19:09 adriapalleja

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 avatar Sep 23 '24 09:09 francesco-ooops

@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 avatar Sep 23 '24 09:09 Saran440

@Saran440 if you're positive that enqueuing invoices with different dates results in invoice numbers following sequence correctly, then it's good for me 👍

francesco-ooops avatar Sep 23 '24 10:09 francesco-ooops

merge?

sergiobstoj avatar Feb 20 '25 11:02 sergiobstoj

@hbrunn Hi, Can you help merge, please?

Saran440 avatar Feb 26 '25 10:02 Saran440

/ocabot merge nobump

hbrunn avatar Mar 03 '25 06:03 hbrunn

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.

OCA-git-bot avatar Mar 03 '25 06:03 OCA-git-bot

Congratulations, your PR was merged at 8c8b206c48e930f35b91bb3cf163afe781335573. Thanks a lot for contributing to OCA. ❤️

OCA-git-bot avatar Mar 03 '25 07:03 OCA-git-bot