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_payment_mode #2321

Merged

Conversation

florian-dacosta
Copy link
Contributor

Standard Migration

@RodrigoBM RodrigoBM mentioned this pull request Jan 17, 2023
98 tasks
@florian-dacosta florian-dacosta force-pushed the 16.0-mig-sale_automatic_workflow_payment_mode branch from fbafc8e to ae48622 Compare January 27, 2023 15:12
@RodrigoBM
Copy link

@florian-dacosta sale_automatic_workflow is merged #2281.

Can you rebase it?

Thanks

guewen and others added 27 commits January 31, 2023 11:47
[ADD] sale_automatic_workflow_payment_mode
[MIG] Rename manifest files
[IMP] sale_automatic_workflow_payment_mode: Use related fields for payment_filter_domain & char_domain widget
Currently translated at 20.0% (2 of 10 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_automatic_workflow_payment_mode/zh_CN/
Currently translated at 30.0% (3 of 10 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_automatic_workflow_payment_mode/zh_CN/
Currently translated at 40.0% (4 of 10 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_automatic_workflow_payment_mode/zh_CN/
Currently translated at 100.0% (10 of 10 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_automatic_workflow_payment_mode/zh_CN/
Currently translated at 90.0% (9 of 10 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_automatic_workflow_payment_mode/es/
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.
Currently translated at 30.0% (3 of 10 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_automatic_workflow_payment_mode/sl/
Parts of `sale_automatic_workflow_payment_mode` have been merged into `sale_automatic_workflow`.
But these parts have been not removed from `sale_automatic_workflow_payment_mode`.

This PR clean both modules after this merge.

Originals PR of the merge: OCA#1789
…ng SO's workflow if payment.mode hasn't one set

It seems this feature was added during the 14.0 migration PR, here: 111bb97
But it wasn't like this before, and IMO it was ok.
- Move register_payment option from sale_automatic_workflow_payment_mode to
sale_automatic_workflow.
- Add _register_payments function in sale_automatic_workflow.
TT31208
@florian-dacosta florian-dacosta force-pushed the 16.0-mig-sale_automatic_workflow_payment_mode branch from ae48622 to 117c588 Compare January 31, 2023 10:56
@florian-dacosta
Copy link
Contributor Author

@RodrigoBM Done, thanks for the ping

@asierneiradev
Copy link

Hi @florian-dacosta !
Would it be possible for you to review the failed tests in order to speed up the migration?
Thank you very much

@florian-dacosta
Copy link
Contributor Author

Hi @asierneiradev It seems it is a incompatibility of tests between sale_automatic_workflow and account_payment_partner

I believe sale_automatic_workflow tests should be refactored here https://github.com/OCA/sale-workflow/blob/16.0/sale_automatic_workflow/tests/test_multicompany.py#L123
Because default company is changed on the user, but since v14, it is not the way to do this kind of stuff, I think it should be replace by with_company to change company of a user.

Sadly, I don't have time for now to work on this subject...

@florian-dacosta
Copy link
Contributor Author

@asierneiradev here it is, I've fix the test compatibility between sale_automatic_workflow and account_payment_partner
Can you review please ?

@asierneiradev
Copy link

@asierneiradev here it is, I've fix the test compatibility between sale_automatic_workflow and account_payment_partner Can you review please ?

Approved!
Thank you very much for your time @florian-dacosta and for adapting the test compatibility.

@sbidoul @guewen ,
Can we push this migration?
Thank you very much

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@bguillot
Copy link
Contributor

bguillot commented Mar 9, 2023

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-2321-by-bguillot-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 9a225e3 into OCA:16.0 Mar 9, 2023
@OCA-git-bot
Copy link
Contributor

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

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.