<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <record id="wxwork_settings_tree_view" model="ir.ui.view">
        <field name="name">企业微信设置</field>
        <field name="model">wxwork.settings</field>
        <field name="arch" type="xml">
            <tree>
                <field name="wx_work_app"/>
                <field name="wx_work_corp_id"/>
                <field name="wx_work_secret"/>
                <field name="wx_work_template_ids"/>
            </tree>
        </field>
    </record>
    <record id="wxwork_settings_form" model="ir.ui.view">
		<field name="name">企业微信设置</field>
		<field name="model">wxwork.settings</field>
		<field name="arch" type="xml">
            <form>
            <group>
                <field name="wx_work_app"/>
                <field name="wx_work_corp_id"/>
                <field name="wx_work_secret"/>
                <field name="wx_work_template_ids"/>

            </group>
            <button name="update_template" type="object" string="更新模板"/>

            </form>
		</field>
	</record>

	<record id="wxwork_template_settings_tree_view" model="ir.ui.view">
        <field name="name">企业微信模板设置</field>
        <field name="model">wxwork.template.settings</field>
        <field name="arch" type="xml">
            <tree>
<!--                 <field name="wxwork_id"/> -->
                <field name="sp_name"/>
                <field name="template_id"/>

            </tree>
        </field>
    </record>
    <record id="wxwork_template_settings_form" model="ir.ui.view">
		<field name="name">企业微信模板设置</field>
		<field name="model">wxwork.template.settings</field>
		<field name="arch" type="xml">
            <form>
            <group>
<!--                 <field name="wxwork_id"/> -->
                <field name="sp_name"/>
                <field name="template_id"/>

            </group>
            </form>
		</field>
	</record>

    <record id="wx_work_action" model="ir.actions.act_window">
        <field name="name">企业微信设置</field>
        <field name="res_model">wxwork.settings</field>
        <field name="view_mode">tree,form</field>
        <field name="help" type="html">
            <p class="o_view_nocontent_smiling_face">
                请设置企业微信参数！！！
            </p>
        </field>
    </record>

    <record id="wx_work_template_action" model="ir.actions.act_window">
        <field name="name">企业微信模板设置</field>
        <field name="res_model">wxwork.template.settings</field>
        <field name="view_mode">tree,form</field>
        <field name="help" type="html">
            <p class="o_view_nocontent_smiling_face">
                请设置企业微信模板参数！！！
            </p>
        </field>
    </record>

    <menuitem id="wx_work_menu" name="企业微信设置" parent="menu_wxwork_approval" sequence="21"
              action="wx_work_action"/>
    <menuitem id="wx_work_template_menu" name="企业微信模板设置" parent="menu_wxwork_approval" sequence="22"
              action="wx_work_template_action"/>

</odoo>
