Run big selections in batches, not in one request.
Server actions and reports from the Actions and Print menus run in slices of a size you choose, behind a progress bar — and each slice is its own transaction.
One request per batch, so thousands of selected records never have to fit into a single call.
A progress bar counts the batches and estimates the time left while the run is under way.
A batched report downloads a PDF for every selected record instead of one merged document.
The menus you know, run in slices
Nothing new to learn for the people who click. You flag an action or a report once, and from then on it runs in batches from the list, the kanban and the form.
Each server action sets how many records go to the server per request, one hundred unless you change it.
With the whole domain selected, the ids are resolved on the server first and then sent in batches like any other selection.
Each batch commits on its own. If one fails, the run stops with the error and the batches before it stay saved.
Actions and reports without Execute in Batch behave exactly as they do in standard Odoo.
Two fields, next to the model
Turn on Execute in Batch on any server action in the Actions menu of its model and set the Batch Size. Run it on 640 contacts with a size of fifty and the server sees thirteen short requests instead of one long one — each small enough to finish well inside the timeout.
One PDF per record
Select twenty quotations, pick the report from the Print menu, and you get twenty files named after their orders — ready to file or send one by one, instead of a single document you have to split by hand.
The toggle is offered on PDF and text reports. An HTML report opens in the browser, so it has none.
Help and support
What you get for free, and what has to be paid work.
Issues and merge requests are welcome on the public repository. They are read — but no response time is promised.
A mass update built for your process, or a fix on a deadline, is paid work — quoted up front. Write to sale@mukit.at.
LGPL-3. Use it, change it, ship it inside your own work — no licence key, no database count.
Want more?
MuK IT — Austrian Odoo partner, ViennaModules written for your process, on your Odoo version.
Odoo joined up with the systems you already run.
Hosting, deployment and upgrades you do not have to watch.
Your team taught the parts of Odoo they actually use.
An agreement, so an answer does not depend on who is free.
Documentation
The full text is on the Documentation tab, and in doc/ inside the download.Odoo.sh or on-premise, Community or Enterprise.
In debug mode, turn on Execute in Batch on a server action or a PDF report that is in the Actions or Print menu of its model.
Depends on muk_web_utils for the progress bar, nothing external.
Select records in a list, a kanban or a form and pick the action or report as usual; the progress bar does the rest.
The flags are fields on the actions and reports, so they carry over with the database.
MuK IT GmbH, Vienna. Author and maintainer.
Still running mass updates overnight?
Tell us which jobs run into the timeout and how many records they touch, and we will tell you what batching solves and what wants a scheduled job instead. MuK IT — Austrian Odoo partner, Vienna.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Community Apps Dependencies | Show |
| Lines of code | 843 |
| Technical Name |
muk_web_actions |
| License | LGPL-3 |
| Website | http://www.mukit.at |
MuK Batch Actions
Runs server actions and reports from the Actions and Print menus in batches instead of in one request. A server action set to Execute in Batch processes the selected records in slices of a configurable size, and a report set to Execute in Batch downloads one file per record, both behind a progress bar. Each batch is its own transaction, so large selections stay below the server timeout and a failing batch keeps the batches before it saved.
Installation
To install this module, you need to:
Download the module and add it to your Odoo addons folder. Afterward, log on to your Odoo server and go to the Apps menu. Trigger the debug mode and update the list by clicking on the "Update Apps List" link. Now install the module by clicking on the install button.
Upgrade
To upgrade this module, you need to:
Download the module and add it to your Odoo addons folder. Restart the server and log on to your Odoo server. Select the Apps menu and upgrade the module by clicking on the upgrade button.
Configuration
Batching is set per action, in debug mode:
- Server actions (Settings > Technical > Server Actions): turn on Execute in Batch and set the Batch Size, the number of records sent to the server per request. Such an action should not return an action to open, as it runs once per batch.
- Reports (Settings > Technical > Reports): turn on Execute in Batch on a PDF or text report. HTML reports cannot be batched.
The action or report has to be in the Actions or Print menu of its model (Create Contextual Action or Add to the 'Print' menu).
Usage
- Select records in a list or kanban view, or open a single record, and pick the action from the Actions menu or the report from the Print menu.
- A progress bar shows the current batch and the estimated time left. Server actions run in slices of the batch size; reports download one file per record.
- When all records of the domain are selected, the ids are resolved on the server first, up to the active ids limit.
- If a batch fails, the run stops with the error; the batches before it stay saved.
Actions and reports without the flag keep the standard behaviour.
Credits
Contributors
- Mathias Markl <mathias.markl@mukit.at>
Author & Maintainer
This module is maintained by the MuK IT GmbH.
MuK IT is an Austrian company specialized in customizing and extending Odoo. We develop custom solutions for your individual needs to help you focus on your strength and expertise to grow your business.
If you want to get in touch please contact us via mail (sale@mukit.at) or visit our website (https://mukit.at).
Please log in to comment on this module