Files
gzth/yuthon_notice/views/yuthon_ntice_views.xml
T
2024-08-02 17:47:33 +08:00

207 lines
9.3 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_yuthon_notice_tree" model="ir.ui.view">
<field name="name">yuthon.notice.tree</field>
<field name="model">yuthon.notice</field>
<field name="arch" type="xml">
<tree string="公告管理">
<field name="name"/>
<field name="user_id"/>
<field name="department_ids" optional="hidden"/>
<field name="employee_ids" optional="hidden"/>
<field name="users_role_ids" optional="hidden"/>
<field name="notice_type_id"/>
<field name="create_date"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="statu"/>
<button name="on_sequence" string="置顶" invisible="sequence != 0" type="object" class="btn-primary"/>
<button name="no_sequence" string="取消置顶" invisible="sequence != 1" type="object" class="btn-primary"/>
<button name="stop_notice" string="终止" type="object" class="btn-primary"/>
<field name="sequence" column_invisible="1"/>
</tree>
</field>
</record>
<record id="view_yuthon_notice_form" model="ir.ui.view">
<field name="name">yuthon.notice.form</field>
<field name="model">yuthon.notice</field>
<field name="arch" type="xml">
<form string="公告管理">
<header>
<button name="look_up_notice_users" string="查看确认信息" invisible="statu != 'done'" type="object" class="btn-primary"/>
<button name="confirm_notice" string="确认收到" invisible="statu != 'done'" type="object" class="btn-primary"/>
<button name="notice_publish" string="发布" invisible="statu != 'no'" type="object" class="btn-primary"/>
<field name="statu" widget="statusbar"/>
</header>
<sheet>
<div class="oe_title">
<label for="name"/>
<h1>
<field name="name" required="1"/>
</h1>
</div>
<group>
<group>
<field name="code"/>
<field name="user_id"/>
<field name="department_ids" widget="many2many_tags"/>
<field name="employee_ids" widget="many2many_tags"/>
<field name="users_role_ids" widget="many2many_tags"/>
<field name="notice_type_id"/>
<field name="is_notice_roger"/>
</group>
<group>
<field name="create_date"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="notice_documents_ids">
<tree>
<field name="name"/>
</tree>
</field>
</group>
</group>
<group>
<field name="notice_text" widget="tinymce"/>
<field name="sequence" invisible="1"/>
</group>
</sheet>
<div class="o_attachment_preview"/>
<div class="oe_chatter">
<field name="message_follower_ids" groups="base.group_user"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<record id="view_yuthon_notice_filter" model="ir.ui.view">
<field name="name">yuthon.notice.search</field>
<field name="model">yuthon.notice</field>
<field name="arch" type="xml">
<search string="公告查询">
<filter string="草稿" name="new " domain="[('statu', '=', 'new')]"/>
<filter string="审批中" name="approval " domain="[('statu', '=', 'approval')]"/>
<filter string="未发布" name="no " domain="[('statu', '=', 'no')]"/>
<filter string="已发布" name="done " domain="[('statu', '=', 'done')]"/>
<filter string="发布日期" name="create_date"/>
<group expand="0">
<filter name="group_statu" string="发布状态" context="{'group_by': 'statu'}"/>
<filter name="group_type" string="发布类型" context="{'group_by': 'notice_type_id'}"/>
<filter name="group_date" string="发布日期" context="{'group_by': 'create_date'}"/>
</group>
</search>
</field>
</record>
<record id="approval_notice_action" model="ir.actions.act_window">
<field name="name">通知公告管理</field>
<field name="res_model">yuthon.notice</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_yuthon_notice_filter"/>
</record>
<record id="view_yuthon_notice_tree2" model="ir.ui.view">
<field name="name">yuthon.notice.tree</field>
<field name="model">yuthon.notice</field>
<field name="arch" type="xml">
<tree string="公告管理">
<field name="name"/>
<field name="user_id"/>
<field name="department_ids" optional="hidden"/>
<field name="employee_ids" optional="hidden"/>
<field name="users_role_ids" optional="hidden"/>
<field name="notice_type_id"/>
<field name="create_date"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="statu"/>
<field name="is_notice_roger"/>
</tree>
</field>
</record>
<record id="view_yuthon_notice_form2" model="ir.ui.view">
<field name="name">yuthon.notice.form2</field>
<field name="model">yuthon.notice</field>
<field name="arch" type="xml">
<form create="false" edit="false" string="公告管理">
<div class="col-12 text-center">
<h1>
<field name="name" required="1"/>
</h1>
</div>
<group>
<group>
<field name="code"/>
<field name="user_id"/>
<field name="department_ids" widget="many2many_tags"/>
<field name="employee_ids" widget="many2many_tags"/>
<field name="users_role_ids" widget="many2many_tags"/>
<field name="notice_type_id"/>
<field name="is_notice_roger"/>
</group>
<group>
<field name="create_date"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="notice_documents_ids">
<tree>
<field name="name"/>
</tree>
</field>
</group>
</group>
<group>
<field name="notice_text" widget="html"/>
<field name="sequence" invisible="1"/>
</group>
</form>
</field>
</record>
<record id="view_yuthon_notice_filter2" model="ir.ui.view">
<field name="name">yuthon.notice.search</field>
<field name="model">yuthon.notice</field>
<field name="arch" type="xml">
<search string="公告查询">
<group expand="0">
<filter name="group_by_is_notice_roger" string="已读" context="{'group_by': 'is_notice_roger'}"/>
</group>
</search>
</field>
</record>
<record id="approval_notice_action2" model="ir.actions.act_window">
<field name="name">我的通知公告</field>
<field name="res_model">yuthon.notice</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_yuthon_notice_filter2"/>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_notice.view_yuthon_notice_tree2')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_notice.view_yuthon_notice_form2')})]"/>
<field name="context">{'search_default_group_by_is_notice_roger': True,}</field>
</record>
<menuitem
id="yuthon_notice_menu_config_root"
name="通知公告"
web_icon="yuthon_notice,static/description/icon.png"
sequence="1"/>
<menuitem
id="yuthon_notice_my_menu"
parent="yuthon_notice_menu_config_root"
name="我的通知公告"
action="approval_notice_action2"
sequence="2"/>
<menuitem
id="yuthon_notice_menu"
parent="yuthon_notice_menu_config_root"
name="通知公告管理"
action="approval_notice_action"
sequence="5"/>
</odoo>