Render Modules#

This module cover a series of function that can be used to render the html description of the module based on static content and the description string in the manifest.

This behaves in similar ways as how Odoo render the description string for modules within Odoo.

You may want to render html description of the module when you need to display the module description to Odoo users or potentially in a web store.

class odoo_tools.modules.render.MyFilterMessages(document, startnode=None)[source]#

Custom docutils transform to remove system message for a document and generate warnings.

(The standard filter removes them based on some report_level passed in the settings_override dictionary, but if we use it, we can’t see them and generate warnings.)

apply()[source]#

Override to apply the transform to the document tree.

default_priority = 870#

Numerical priority of this transform, 0 through 999 (override).

class odoo_tools.modules.render.MyWriter[source]#

Custom docutils html4ccs1 writer that doesn’t add the warnings to the output document.

get_transforms()[source]#

Transforms required by this class. Override in subclasses.

odoo_tools.modules.render.render_description_str(path, description='')[source]#