Dynamic Progress Bar

by
Odoo          
v 12.0 Third Party 297
Download for 12.0 series Deploy on Odoo.sh
You bought this module and need support ? Click here !
Technical name web_progress
LicenseLGPL-3
Repositoryhttps://github.com/gmarczynski/odoo-web-progress.git#12.0
Read description for v 11.0
Technical name web_progress
LicenseLGPL-3
Repositoryhttps://github.com/gmarczynski/odoo-web-progress.git#12.0
Read description for v 11.0

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

License: LGPL-3.

Copyright © 2019 Grzegorz Marczyński

Features

  • 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)

For developers

Typically when your code executes any long-term operation there is a loop over a collection in your code.

In order to report progress of the operation, wrap the collection with self.web_progress_iter(collection, msg="Message") or, if the collection is self (or other recordset), use a simpler version self.with_progress("Message")

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 Notes

1.3 - 2019-07-15 - new functionality
  • estimated time left / total
1.2 - 2019-06-24 - fixes:
  • refactor global progress data
  • change progress template name to avoid clash with progressbar widget
1.1 - 2019-06-23 - fixes:
  • remove unecessary dependency on multiprocessing
  • fix memory leak in time-tracking internal data
1.0 - 2019-06-20 - initial version

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.
Please choose a rating from 1 to 5 for this module.