refactor(fusion_portal): rename from fusion_authorizer_portal + modern photo cards on accessibility selector
Rename module fusion_authorizer_portal -> fusion_portal everywhere: manifest/assets, controllers, models, views, JS (odoo.define + asset URLs), migration MODULE constants; plus cross-module refs in fusion_schedule, fusion_repairs, fusion_quotations (depends + inherit_id) and the pdf_filler import in fusion_claims. Add rename_module.sql for the one-time in-place DB rename (ir_module_module, ir_model_data, ir_ui_view.key, ir_module_module_dependency) required on installed envs before -u fusion_portal. Document the rename gotcha as rule 16 in CLAUDE.md. Redesign the Accessibility Assessment selector: replace Font Awesome icon tiles with photo-banner cards using 7 optimized images (1000x750 PNG -> 800x600 JPEG, ~8MB -> 488KB), per-type colour accent bar + centered pill button, hover lift/zoom. Images ship as module static files so they deploy/sync with the module. Drop the regenerable graphify-out cache from the module. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
36
fusion_portal/migrations/19.0.2.3.0/end-migrate.py
Normal file
36
fusion_portal/migrations/19.0.2.3.0/end-migrate.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Reactivate any views that Odoo silently deactivated.
|
||||
|
||||
Odoo deactivates inherited views when xpath validation fails (e.g. parent
|
||||
view structure changed between versions). Once deactivated, subsequent
|
||||
``-u`` runs never reactivate them. This end-migration script catches
|
||||
that scenario on every version bump.
|
||||
"""
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
MODULE = 'fusion_portal'
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
if not version:
|
||||
return
|
||||
|
||||
cr.execute("""
|
||||
UPDATE ir_ui_view v
|
||||
SET active = true
|
||||
FROM ir_model_data d
|
||||
WHERE d.res_id = v.id
|
||||
AND d.model = 'ir.ui.view'
|
||||
AND d.module = %s
|
||||
AND v.active = false
|
||||
RETURNING v.id, v.name, v.key
|
||||
""", [MODULE])
|
||||
|
||||
rows = cr.fetchall()
|
||||
if rows:
|
||||
_logger.warning(
|
||||
"Reactivated %d deactivated views for %s: %s",
|
||||
len(rows), MODULE, [r[2] or r[1] for r in rows],
|
||||
)
|
||||
36
fusion_portal/migrations/19.0.2.4.0/end-migrate.py
Normal file
36
fusion_portal/migrations/19.0.2.4.0/end-migrate.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Reactivate any views that Odoo silently deactivated.
|
||||
|
||||
Odoo deactivates inherited views when xpath validation fails (e.g. parent
|
||||
view structure changed between versions). Once deactivated, subsequent
|
||||
``-u`` runs never reactivate them. This end-migration script catches
|
||||
that scenario on every version bump.
|
||||
"""
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
MODULE = 'fusion_portal'
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
if not version:
|
||||
return
|
||||
|
||||
cr.execute("""
|
||||
UPDATE ir_ui_view v
|
||||
SET active = true
|
||||
FROM ir_model_data d
|
||||
WHERE d.res_id = v.id
|
||||
AND d.model = 'ir.ui.view'
|
||||
AND d.module = %s
|
||||
AND v.active = false
|
||||
RETURNING v.id, v.name, v.key
|
||||
""", [MODULE])
|
||||
|
||||
rows = cr.fetchall()
|
||||
if rows:
|
||||
_logger.warning(
|
||||
"Reactivated %d deactivated views for %s: %s",
|
||||
len(rows), MODULE, [r[2] or r[1] for r in rows],
|
||||
)
|
||||
36
fusion_portal/migrations/19.0.2.5.0/end-migrate.py
Normal file
36
fusion_portal/migrations/19.0.2.5.0/end-migrate.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Reactivate any views that Odoo silently deactivated.
|
||||
|
||||
Odoo deactivates inherited views when xpath validation fails (e.g. parent
|
||||
view structure changed between versions). Once deactivated, subsequent
|
||||
``-u`` runs never reactivate them. This end-migration script catches
|
||||
that scenario on every version bump.
|
||||
"""
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
MODULE = 'fusion_portal'
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
if not version:
|
||||
return
|
||||
|
||||
cr.execute("""
|
||||
UPDATE ir_ui_view v
|
||||
SET active = true
|
||||
FROM ir_model_data d
|
||||
WHERE d.res_id = v.id
|
||||
AND d.model = 'ir.ui.view'
|
||||
AND d.module = %s
|
||||
AND v.active = false
|
||||
RETURNING v.id, v.name, v.key
|
||||
""", [MODULE])
|
||||
|
||||
rows = cr.fetchall()
|
||||
if rows:
|
||||
_logger.warning(
|
||||
"Reactivated %d deactivated views for %s: %s",
|
||||
len(rows), MODULE, [r[2] or r[1] for r in rows],
|
||||
)
|
||||
65
fusion_portal/migrations/19.0.2.6.0/end-migrate.py
Normal file
65
fusion_portal/migrations/19.0.2.6.0/end-migrate.py
Normal file
@@ -0,0 +1,65 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Clean up schedule-related views moved to fusion_schedule module.
|
||||
|
||||
The portal_schedule_page, portal_schedule_book templates and
|
||||
appointment_invite_data have been moved to the standalone
|
||||
fusion_schedule module. This migration removes stale ir.model.data
|
||||
references so Odoo doesn't complain about orphaned records.
|
||||
|
||||
Also reactivates any views that Odoo silently deactivated.
|
||||
"""
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
MODULE = 'fusion_portal'
|
||||
|
||||
MOVED_XMLIDS = [
|
||||
'portal_schedule_page',
|
||||
'portal_schedule_book',
|
||||
'default_appointment_invite',
|
||||
]
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
if not version:
|
||||
return
|
||||
|
||||
cr.execute("""
|
||||
SELECT d.res_id FROM ir_model_data d
|
||||
WHERE d.module = %s AND d.name = 'default_appointment_invite'
|
||||
AND d.model = 'appointment.invite'
|
||||
""", [MODULE])
|
||||
row = cr.fetchone()
|
||||
if row:
|
||||
cr.execute("DELETE FROM appointment_invite WHERE id = %s", [row[0]])
|
||||
_logger.info("Deleted old appointment.invite id=%d (moving to fusion_schedule)", row[0])
|
||||
|
||||
for xmlid in MOVED_XMLIDS:
|
||||
cr.execute("""
|
||||
DELETE FROM ir_model_data
|
||||
WHERE module = %s AND name = %s
|
||||
""", [MODULE, xmlid])
|
||||
if cr.rowcount:
|
||||
_logger.info(
|
||||
"Removed stale ir.model.data %s.%s (moved to fusion_schedule)",
|
||||
MODULE, xmlid,
|
||||
)
|
||||
|
||||
cr.execute("""
|
||||
UPDATE ir_ui_view v
|
||||
SET active = true
|
||||
FROM ir_model_data d
|
||||
WHERE d.res_id = v.id
|
||||
AND d.model = 'ir.ui.view'
|
||||
AND d.module = %s
|
||||
AND v.active = false
|
||||
RETURNING v.id, v.name, v.key
|
||||
""", [MODULE])
|
||||
|
||||
rows = cr.fetchall()
|
||||
if rows:
|
||||
_logger.warning(
|
||||
"Reactivated %d deactivated views for %s: %s",
|
||||
len(rows), MODULE, [r[2] or r[1] for r in rows],
|
||||
)
|
||||
Reference in New Issue
Block a user