Skip to content

[19.0][MIG] sale_automatic_workflow_payment_mode: Migration to 19.0#4198

Open
sergijPf wants to merge 44 commits intoOCA:19.0from
DeineTuer-GmbH:19.0-mig-sale_automatic_workflow_payment_mode
Open

[19.0][MIG] sale_automatic_workflow_payment_mode: Migration to 19.0#4198
sergijPf wants to merge 44 commits intoOCA:19.0from
DeineTuer-GmbH:19.0-mig-sale_automatic_workflow_payment_mode

Conversation

@sergijPf
Copy link
Copy Markdown

@sergijPf sergijPf commented Mar 9, 2026

as source 16.0 version module has been used for migration.

Few changes were done:

  • improved if-statement check - make sure invoice has payment_mode set inside _register_payment_invoice() method. Without it, 'sale_automatic_workflow' tests will fail;
  • remove 'picking_ids' in tests as functionality has been moved to different place;
  • added 'pre_compute=True' for sale_order's 'workflow_process_id' field.
    'wokrflow_process_id' is set as computed field here and originally, it is added as dependency to '_compute_team_id()', which is pre-computed, as result it leads to issue that precomputed field cannot depend on non-precomputed, the relevant warning message is logged in console.

Guewen Baconnier and others added 30 commits March 9, 2026 13:34
[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
...payment when no fixed journal and remove sale_workflow_process
oca-ci and others added 13 commits March 9, 2026 13:34
Currently translated at 100.0% (7 of 7 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_automatic_workflow_payment_mode/es/
Currently translated at 100.0% (7 of 7 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_automatic_workflow_payment_mode/pt_BR/
Currently translated at 100.0% (7 of 7 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_automatic_workflow_payment_mode/it/
Currently translated at 100.0% (7 of 7 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_automatic_workflow_payment_mode/it/
Currently translated at 100.0% (7 of 7 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_automatic_workflow_payment_mode/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_automatic_workflow_payment_mode/
Currently translated at 100.0% (4 of 4 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_automatic_workflow_payment_mode/it/
Currently translated at 100.0% (4 of 4 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_automatic_workflow_payment_mode/it/
Currently translated at 100.0% (4 of 4 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_automatic_workflow_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_automatic_workflow_payment_mode/hr/
@sergijPf sergijPf force-pushed the 19.0-mig-sale_automatic_workflow_payment_mode branch from fbd61b0 to 7f86134 Compare March 9, 2026 16:56
@rousseldenis
Copy link
Copy Markdown
Contributor

/ocabot migration sale_automatic_workflow_payment_mode

@@ -1,2 +0,0 @@
The migration of this module from 13.0 to 14.0 was financially supported
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IMHO, this should not be removed (nothing to do with migration scripts)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

revert it back now, no other changes

@sergijPf sergijPf force-pushed the 19.0-mig-sale_automatic_workflow_payment_mode branch from 7f86134 to 7de5e43 Compare March 17, 2026 12:47
@sergijPf sergijPf force-pushed the 19.0-mig-sale_automatic_workflow_payment_mode branch from 7de5e43 to 31edd7b Compare March 17, 2026 12:49
Copy link
Copy Markdown
Contributor

@BhaveshHeliconia BhaveshHeliconia left a comment

Choose a reason for hiding this comment

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

LGTM!

@OCA-git-bot
Copy link
Copy Markdown
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). 🤖

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.