Files
shcool/college/data/shixun_module_data.xml
T

64 lines
5.7 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 页,module_list_cap.js 也硬顶 50)。
方案:2026-10-19 起改用白名单(按模块名,跨库稳定),不再用类目 ID 排除。
2026-10-23 按"只保留 Odoo 非企业版原生模块(可安装)+ 3 个校园自研例外"重新筛选;
2026-10-26 校验可安装性:从 41 剔除 5 个企业版/幽灵模块
(accountant、helpdesk、knowledge、mrp_workorder、quality_control)——它们在本机 CE 源码的
addons_path 中无文件夹、state=uninstallable,学生无法安装,不属于"非企业版可安装"范围。
2026-10-26(二次)用户要求把 gzth 提供的 14 个自研模块也加进培训页(位于 gzth_addons,
已挂进 odoo.conf 的 addons_path):其中 12 个可直接安装,另 2 个
(yuthon_property_report 缺 yuthon_property、yuthon_sps_approval 缺 yuthon_issue)依赖缺失、
学生点安装会报错,但用户仍要求列入白名单让学生看到。
名单构成(共 50 个):
1) Odoo 原生 33 个
· 财务会计 1:account
· 采购与库存 2:purchase、stock
· 生产制造 2:mrp、maintenance
· 资产运维 2:fleet、repair
· 销售与前台 7:crm、sale_management、point_of_sale、pos_restaurant、
website_sale、delivery、payment
· 人力资源 8:hr、hr_attendance、hr_expense、hr_holidays、hr_recruitment、
hr_contract、hr_timesheet、hr_work_entry
· 网站与营销 8:website、website_slides、website_event、im_livechat、
mass_mailing、survey、membership、website_blog
· 协作与知识 3:project、calendar、contacts
2) 校园自研例外 3 个(用户指定保留):yuthon_employee、yuthon_notice、yuthon_will_task
3) gzth 自研 14 个:soong_workflow_stub、yuthon_account_report、yuthon_datetime_rounding、
yuthon_inspection、yuthon_noprint_county、yuthon_partner、yuthon_party、
yuthon_property_report、yuthon_required_mark、yuthon_sps_approval、yuthon_tianhe、
yuthon_ui_custom、yuthon_web_notice、yuthon_work
被筛除:所有 Agent 智能体平台(agent_*)、教学线自研(college、learning_center、
student_organization、odoosh_connector)、宇森游戏自研(game_base、yt_world、
yusen_website)、人事薪酬自研(yuthon_salary、yuthon_hr_attendance)、
以及 5 个企业版模块(accountant、helpdesk、knowledge、mrp_workorder、quality_control)。
注意:domain 已去掉 ('application','=',True),白名单里 application=False 的原生子模块
(delivery/payment/hr_timesheet/hr_work_entry/membership/website_blog)也会显示,故页面=50。
维护:新装的自有模块必须往本清单加,否则不显示;总数超过 50 时
module_list_cap.js 把显示硬顶在 50。 -->
<field name="domain">[('name', 'in', ['account', 'calendar', 'contacts', 'crm', 'delivery', 'fleet', 'hr', 'hr_attendance', 'hr_contract', 'hr_expense', 'hr_holidays', 'hr_recruitment', 'hr_timesheet', 'hr_work_entry', 'im_livechat', 'maintenance', 'mass_mailing', 'membership', 'mrp', 'payment', 'point_of_sale', 'pos_restaurant', 'project', 'purchase', 'repair', 'sale_management', 'soong_workflow_stub', 'stock', 'survey', 'website', 'website_blog', 'website_event', 'website_sale', 'website_slides', 'yuthon_account_report', 'yuthon_datetime_rounding', 'yuthon_employee', 'yuthon_inspection', 'yuthon_noprint_county', 'yuthon_notice', 'yuthon_party', 'yuthon_partner', 'yuthon_property_report', 'yuthon_required_mark', 'yuthon_sps_approval', 'yuthon_tianhe', 'yuthon_ui_custom', 'yuthon_web_notice', 'yuthon_will_task', 'yuthon_work'])]</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>