Files
gzth/yuthon_catering/views/yuthon_catering.xml
T
2026-03-04 15:35:26 +08:00

46 lines
1.7 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<!-- tree视图 -->
<record id="yuthon_catering_tree_view" model="ir.ui.view">
<field name="name">yuthon.catering.tree</field>
<field name="model">yuthon.catering</field>
<field name="arch" type="xml">
<tree string="餐饮" editable="top">
<header>
<button name="batch_remind_catering" string="批量提醒" type="object" class="btn btn-primary"/>
<button name="task_catering" string="test" type="object" class="btn btn-primary"/>
</header>
<field name="date"/>
<field name="state"/>
<field name="dept_id"/>
<field name="employee_id"/>
<field name="breakfast"/>
<field name="lunch"/>
<field name="amount" readonly="1"/>
<field name="menu_day_id" column_invisible="True"/>
<field name="note"/>
<button name="action_confirm" class="btn btn-primary" type="object" string="确认" invisible="state != 'modifying'"/>
</tree>
</field>
</record>
<!-- 跳转菜单 -->
<record id="yuthon_catering_action_window" model="ir.actions.act_window">
<field name="name">餐饮收集任务</field>
<field name="res_model">yuthon.catering</field>
<field name="view_mode">tree,form</field>
<field name="context">{'default_order': 'date desc'}</field>
</record>
<!-- 二级菜单 -->
<menuitem
id="yuthon_catering_menu"
name="餐饮收集任务"
parent="yuthon_catering_root_menu"
sequence="1"
action="yuthon_catering_action_window"/>
</data>
</odoo>