16 lines
467 B
Python
16 lines
467 B
Python
# -*- coding: utf-8 -*-
|
|
"""Module lifecycle hooks."""
|
|
|
|
def _refresh_root_menu_web_icon(env):
|
|
"""Re-read icon file from disk into web_icon_data (menu caches binary)."""
|
|
menu = env.ref("planner.menu_planner_root", raise_if_not_found=False)
|
|
if not menu or not menu.web_icon:
|
|
return
|
|
web_icon = menu.web_icon
|
|
menu.write({"web_icon": False})
|
|
menu.write({"web_icon": web_icon})
|
|
|
|
|
|
def post_init_hook(env):
|
|
_refresh_root_menu_web_icon(env)
|