-
-
Notifications
You must be signed in to change notification settings - Fork 681
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
[16.0][MIG] account_invoice_validation_queued #1694
base: 16.0
Are you sure you want to change the base?
[16.0][MIG] account_invoice_validation_queued #1694
Conversation
0f64db6
to
cbd1239
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ocabot migration account_invoice_validation_queued
@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. Should we delete it in this module because job queue processes tasks one by one? |
@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) |
cbd1239
to
fe70d72
Compare
@adriapalleja Could you please review and approve this PR if it works? |
@Saran440 I've just reviewed and tested the module. Everything is working fine on my side, except from this topic in "Usage":
The process is working as expected, but I would remove "there will be a message saying so" from the Usage Readme. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looking good! Only a minor change requested in the "Usage" Readme.
Hi @Saran440 ! Could you apply the minor changes suggested in order to move forward with this PR? Thanks! |
…dation This module allows to enqueue in several jobs the account validation process to be executed in paralell on background, which is normally done serially and on foreground. Each invoice creates a job for performing the validation, but you will only be able to enqueue invoices for the same date. Installation ============ This module depends on *queue_job* module that is hosted on https://github.com/OCA/queue. Configuration ============= Jobs are enqueued in the channel ``root.account_invoice_validation_queued``, so you must adjust your `Odoo configuration <https://github.com/OCA/queue/tree/11.0/queue_job#configuration>`_ according this. If you want to see queued jobs, you need "Job Queue / Job Queue Manager" permission in your user. Usage ===== * Go to *Invoicing > Sales > Documents > Customer Invoices* or *Invoicing > Purchases > Documents > Vendor Bills*. * Mark at least one check on the left part of one draft invoice line in the list view. * Click on *Action > Confirm Draft Invoice*. * On the dialog popup that appears, click on "Enqueue Validation". * If any of the selected invoices are not in draft state, you will receive an error. * If any of the invoices is already enqueued, there will be a message saying so and avoiding to perform the process. * Once enqueued, and having the "Job Queue Manager" permission, you can go to the invoice, and see the tab "Validation Jobs". A list with all the jobs related to that invoice can be found there. Known issues / Roadmap ====================== * Allow to enqueue for validating invoices of different date. * There's a chance that if you perform several enqueues of invoice validations from different dates, the order of the validated invoices, and thus, the number given for it, will result disordered.
* Standard procedure * README updated * Promoted to Production/Stable
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-invoicing-13.0/account-invoicing-13.0-account_invoice_validation_queued Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-13-0/account-invoicing-13-0-account_invoice_validation_queued/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-invoicing-13.0/account-invoicing-13.0-account_invoice_validation_queued Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-13-0/account-invoicing-13-0-account_invoice_validation_queued/
Having other m2m pointing to queue.job will make them to share the same table and get akward results. We avoid it specifying a table. It includes migration script for moving data from one table to the other.
Currently translated at 100.0% (7 of 7 strings) Translation: account-invoicing-13.0/account-invoicing-13.0-account_invoice_validation_queued Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-13-0/account-invoicing-13-0-account_invoice_validation_queued/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-invoicing-15.0/account-invoicing-15.0-account_invoice_validation_queued Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-15-0/account-invoicing-15-0-account_invoice_validation_queued/
Currently translated at 100.0% (7 of 7 strings) Translation: account-invoicing-15.0/account-invoicing-15.0-account_invoice_validation_queued Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-15-0/account-invoicing-15-0-account_invoice_validation_queued/es/
44f652c
to
ce473b1
Compare
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. @adriapalleja I updated readme, please recheck. |
ce473b1
to
e61d7ed
Compare
@Saran440 if you're positive that enqueuing invoices with different dates results in invoice numbers following sequence correctly, then it's good for me 👍 |
Standard MIgrated and Update readme