<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="project_type_form" model="ir.ui.view">
        <field name="model">project.type</field>
        <field name="arch" type="xml">
            <form string="Project Type">
                <sheet>
                    <div class="oe_title">
                        <label for="name" class="oe_edit_only" />
                        <h1>
                            <field name="name" />
                        </h1>
                        <div>
                            <field name="project_ok" />
                            <label for="project_ok" />
                        </div>
                        <div>
                            <field name="task_ok" />
                            <label for="task_ok" />
                        </div>
                    </div>
                    <group>
                        <group>
                            <field name="parent_id" />
                            <field name="code" />
                        </group>
                    </group>
                    <notebook>
                        <page string="Description" name="page_description">
                            <field
                                name="description"
                                placeholder="Add a description..."
                            />
                        </page>
                        <page string="Subtypes" name="page_subtypes">
                            <field name="child_ids">
                                <tree>
                                    <field name="name" />
                                </tree>
                            </field>
                        </page>
                    </notebook>
                </sheet>
            </form>
        </field>
    </record>
    <record id="project_type_search" model="ir.ui.view">
        <field name="model">project.type</field>
        <field name="inherit_id" eval="False" />
        <field name="arch" type="xml">
            <search string="Type">
                <field name="complete_name" />
                <field name="parent_id" />
                <filter
                    name="project_ok"
                    string="Can be applied for projects"
                    domain="[('project_ok','=',True)]"
                />
                <filter
                    name="task_ok"
                    string="Can be applied for tasks"
                    domain="[('task_ok','=',True)]"
                />
            </search>
        </field>
    </record>
    <record id="action_project_type" model="ir.actions.act_window">
        <field name="name">Project Types</field>
        <field name="res_model">project.type</field>
        <field name="view_mode">tree,form</field>
    </record>
    <menuitem
        name="Project Types"
        id="project_category"
        parent="project.menu_project_config"
        action="action_project_type"
        sequence="20"
    />
</odoo>
