You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
575 B
Python

from odoo import models
from odoo.tools import config
init = config['init']
class IrQweb(models.AbstractModel):
_inherit = 'ir.qweb'
def _register_hook(self):
super()._register_hook()
# if this module is installed, we are in a test environement, this is
# especially true on runbot where all modules are installed.
# pregenerate assets at the end of the loading to speedup tests
registry = self.env.registry
if init and registry.updated_modules and not registry.ready:
self._pregenerate_assets_bundles()