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] sale_automatic_workflow_job #2348

Merged

Conversation

amarcosg
Copy link
Contributor

guewen and others added 21 commits January 23, 2023 18:20
Use Queue Jobs to process the Sales Automatic Workflow actions.

The default behavior of the automatic workflow module is to use a
scheduled action that searches all the record that need a workflow
action and sequentially process all of them.

It can hit some limits when the number of records is too high.

This module keeps the scheduled action to search the records, but
instead of directly executing the actions (confirm a sales order,
create invoices for a sales order, validate invoices, ...), it
creates one job per operation to do.

It uses an identity key on the jobs so it will not create the same
job for the same record and same operation twice.

~

I needed to extract methods in `sale_automatic_workflow` in order
to be able to execute them as jobs.

A new decorator "job_auto_delay" (to eventually move in queue_job) makes
these methods automatically delayed when called.
@amarcosg amarcosg mentioned this pull request Jan 30, 2023
100 tasks
@rousseldenis
Copy link
Contributor

/ocabot migration sale_automatic_workflow_job

Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Copy link
Contributor

@hugo-cordoba hugo-cordoba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! (Code Review)

@hugo-cordoba
Copy link
Contributor

Hello @rousseldenis, could you merge it?? Thanks!

@rousseldenis
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-2348-by-rousseldenis-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 413ccfd into OCA:16.0 May 3, 2023
@OCA-git-bot
Copy link
Contributor

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

@amarcosg amarcosg deleted the 16.0-mig-sale_automatic_workflow_job branch May 25, 2023 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants