- fusion_claims: separated field service logic, updated controllers/views - fusion_tasks: updated task views and map integration - fusion_authorizer_portal: added page 11 signing, schedule booking, migrations - fusion_shipping: new standalone shipping module (Canada Post, FedEx, DHL, Purolator) - fusion_ltc_management: new standalone LTC management module
31 lines
1005 B
Python
31 lines
1005 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from . import models
|
|
from . import controllers
|
|
|
|
|
|
def _reactivate_views(env):
|
|
"""Ensure all module views are active after install/update.
|
|
|
|
Odoo silently deactivates inherited views when an xpath fails
|
|
validation (e.g. parent view structure changed between versions).
|
|
Once deactivated, subsequent -u runs never reactivate them.
|
|
This hook prevents that from silently breaking the portal.
|
|
"""
|
|
views = env['ir.ui.view'].sudo().search([
|
|
('key', 'like', 'fusion_authorizer_portal.%'),
|
|
('active', '=', False),
|
|
])
|
|
if views:
|
|
views.write({'active': True})
|
|
env.cr.execute("""
|
|
SELECT key FROM ir_ui_view
|
|
WHERE key LIKE 'fusion_authorizer_portal.%%'
|
|
AND id = ANY(%s)
|
|
""", [views.ids])
|
|
keys = [r[0] for r in env.cr.fetchall()]
|
|
import logging
|
|
logging.getLogger(__name__).warning(
|
|
"Reactivated %d deactivated views: %s", len(keys), keys
|
|
)
|