Skip to content

Fix test case module sale_automatic_workflow_payment_mode#6

Open
kv1612 wants to merge 8 commits intooca-port-pr-1782-from-13.0-to-14.0from
oca-port-sale-automatic-workflow-from-13.0-to-14.0
Open

Fix test case module sale_automatic_workflow_payment_mode#6
kv1612 wants to merge 8 commits intooca-port-pr-1782-from-13.0-to-14.0from
oca-port-sale-automatic-workflow-from-13.0-to-14.0

Conversation

@kv1612
Copy link
Owner

@kv1612 kv1612 commented Nov 30, 2021

No description provided.

Guewen Baconnier and others added 8 commits November 27, 2021 15:18
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.
update on user causes locking for jobs, so only 1 tread is allowed
for channel, but core implementation was updated and now it relying on
first on given context instead of the user
Change to the correct company in environment to pick up the correct company dependent fields

TT28906
- Move register_payment option from sale_automatic_workflow_payment_mode to
sale_automatic_workflow.
- Add _register_payments function in sale_automatic_workflow.
TT31208
@kv1612 kv1612 changed the title Fix test case modle sale_automatic_workflow_payment_mode Fix test case module sale_automatic_workflow_payment_mode Nov 30, 2021
@kv1612 kv1612 force-pushed the oca-port-pr-1782-from-13.0-to-14.0 branch 2 times, most recently from b94db2d to f47587d Compare December 6, 2021 09:11
@kv1612 kv1612 force-pushed the oca-port-pr-1782-from-13.0-to-14.0 branch 2 times, most recently from 4fd426e to ad999eb Compare December 14, 2021 04:37
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.

5 participants