odoo_clicks2cart/deep_search_cache.py
2026-03-02 21:31:24 +05:30

12 lines
477 B
Python

views = env['ir.ui.view'].search([('arch_db', 'like', 't-cache'), ('arch_db', 'like', 'is_edit')])
print(f"Total views with t-cache AND is_edit: {len(views)}")
for v in views:
print(f"ID: {v.id}, Key: {v.key}, Website ID: {v.website_id.id if v.website_id else 'None'}, Name: {v.name}")
print("MATCHED NODE:")
# find the node
import re
matches = re.findall(r'<t\s+t-cache="[^"]*is_edit[^"]*"[^>]*>', v.arch_db)
for m in matches:
print(f" {m}")