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

[16.0][MIG] account_invoice_validation_queued #1694

Open
wants to merge 24 commits into
base: 16.0
Choose a base branch
from

Conversation

Saran440
Copy link
Member

@Saran440 Saran440 commented Mar 28, 2024

Standard MIgrated and Update readme

@Saran440 Saran440 force-pushed the 16.0-mig-account_invoice_validation_queued branch 2 times, most recently from 0f64db6 to cbd1239 Compare March 28, 2024 06:41
Copy link
Member

@hbrunn hbrunn left a 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

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Mar 28, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Mar 28, 2024
60 tasks
@francesco-ooops
Copy link
Contributor

francesco-ooops commented Apr 8, 2024

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

@pedrobaeza
Copy link
Member

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

@Saran440
Copy link
Member Author

Saran440 commented Apr 9, 2024

@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

@francesco-ooops
Copy link
Contributor

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

pedrobaeza and others added 21 commits May 13, 2024 14:03
…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/
@Saran440 Saran440 force-pushed the 16.0-mig-account_invoice_validation_queued branch from cbd1239 to fe70d72 Compare May 13, 2024 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet