Dynamic Progress Barby Grzegorz Marczyński
Dynamic Progress Bar
Progress bar for Odoo waiting screen, possibility to cancel an ongoing operation and a system tray menu for all operations in progress.
web_progress exists for Odoo 11.0 and 12.0 (CE and EE).
Author: Grzegorz Marczyński
Copyright © 2019 Grzegorz Marczyński
- progress reporting for all standard Odoo import and export operations
- system tray menu that lists ongoing operations initiated by the logged user (all operations visible to Administrator)
- support for all operations initiated through UI and executed by planned activities (cron)
- generator-like method to simply add progress reporting to any iteration (support for sub-iterations)
Typically when your code executes any long-term operation there is a loop over a
In order to report progress of the operation, wrap the
self.web_progress_iter(collection, msg="Message") or,
self (or other recordset),
use a simpler version
Say, your operation's main method looks as follows:
@api.multi def action_operation(self): for rec in self: rec.do_somethig()
then a progress-reporting-ready version would be:
@api.multi def action_operation(self): for rec in self.web_progress_iter(self, msg="Message"): rec.do_something()
or a simpler version for recordsets:
@api.multi def action_operation(self): for rec in self.with_progress(msg="Message"): rec.do_something()
Progress tracking may be added to sub-operations as well:
@api.multi def action_operation(self): for rec in self.with_progress(msg="Message"): lines = rec.get_lines() for line in lines.with_progress("Sub-operation") line.do_something()
Release Notes1.3 - 2019-07-15 - new functionality
- estimated time left / total
- refactor global progress data
- change progress template name to avoid clash with progressbar widget
- remove unecessary dependency on multiprocessing
- fix memory leak in time-tracking internal data
Please log in to comment on this module
- This section is meant to ask simple questions or leave a rating.
- This author can leave a single reply to each comment.
- If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.