Files
shcool/college/data/shixun_module_data.xml
T

49 lines
4.4 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- ===================== 动作:打开应用列表(ir.module.module) ===================== -->
<!-- kanban 是第一个 view_mode,直接用 view_id 指定实训模块专用看板视图;
list/form 走系统默认,无需额外的 ir.actions.act_window.view 记录 -->
<record id="action_shixun_module" model="ir.actions.act_window">
<field name="name">实训模块</field>
<field name="res_model">ir.module.module</field>
<field name="view_mode">kanban,list,form</field>
<field name="view_id" ref="shixun_module_kanban_view"/>
<!-- 过滤目标:白名单制——只有列在下方 name 清单里的模块才显示(只过滤、不删模块),
使应用列表精确收敛到 50 条(limit=50,无第 2 页)。
方案演变:2026-10-16 曾用「类目 ID 排除 + 模块名排除」收敛到 50,但类目 ID
跨数据库不一致(企业库与本地库映射完全不同,极易误伤,旧注释的映射已作废);
2026-10-19 改为白名单:按模块名(跨库稳定),且显示内容完全可控。
名单构成(共 50 个):
1) 自有模块 24 个——agent_* 智能体平台、college(教育)、school_base、
student_organization、learning_center、odoosh_connector、yuthon_* 人事薪酬系列、
game_* / yt_world / yusen_website 宇森游戏与官网;
2) Odoo 原生精选 26 个——销售/CRM/采购/库存/财务/POS/项目/人事/制造/质量/
维护/服务台/知识/网站/在线学习/车辆/维修/员工合同等教学实训常用套件。
未列入的说明:
- school(未安装,且与 college 重名「教育」,避免列表出现两张同名卡片);
- lucky_theme_backend / many2many_tags_preview / omux_menu_center(第三方 UI 模块);
- 其余 Odoo 原生小应用(estate/will_task/data_recycle/room/lunch 等)。
血泪教训(2026-10-19 实测后补充):domain 含 ('application','=',True),
**manifest 里 application=False 的模块列进白名单也不会显示**——曾因此只显示 47 个
(yuthon_contract / yuthon_hr_employee / yuthon_web 三个功能扩展模块不显示,
已移出名单,换入 fleet / repair / hr_contract 三个 application=True 的补足 50)。
今后新增名单条目时,务必先在目标库确认 application=True。
维护:新装的自有模块必须往本清单里加,否则不会显示;总数超过 50 时
module_list_cap.js 把显示硬顶在 50(第 2 页点不动、每页数锁定)。 -->
<field name="domain">[('application', '=', True), ('name', 'in', ['account', 'accountant', 'agent_api', 'agent_channel', 'agent_core', 'agent_market', 'agent_payment', 'agent_portal', 'college', 'crm', 'fleet', 'game_ai_npc', 'game_base', 'helpdesk', 'hr', 'hr_attendance', 'hr_contract', 'hr_expense', 'hr_holidays', 'hr_recruitment', 'knowledge', 'learning_center', 'maintenance', 'mrp', 'mrp_workorder', 'odoosh_connector', 'point_of_sale', 'pos_restaurant', 'project', 'purchase', 'quality_control', 'repair', 'sale_management', 'school_base', 'stock', 'student_organization', 'survey', 'website', 'website_slides', 'yt_world', 'yusen_website', 'yuthon_applicant', 'yuthon_attendance', 'yuthon_employee', 'yuthon_hr_attendance', 'yuthon_notice', 'yuthon_salary', 'yuthon_school', 'yuthon_wage', 'yuthon_will_task'])]</field>
<!-- shixun_hide_empty_categories:搜索面板「类别」列过滤掉计数为 0 的类别
(见 models/ir_module_module_info.py 对 search_panel_select_range 的包装) -->
<field name="context">{'shixun_hide_empty_categories': True}</field>
<field name="search_view_id" ref="shixun_module_search_view"/>
<field name="limit">50</field>
</record>
<!-- ===================== 菜单:一级菜单,点进去显示 ir.module.module 的应用列表 ===================== -->
<menuitem id="menu_shixun_module"
name="实训模块"
web_icon="college,static/src/img/shixun_module.png"
action="action_shixun_module"
sequence="30"
groups="college.group_teacher,college.group_student,base.group_system"/>
</odoo>