<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="view_work_acceptance_evaluation_tree" model="ir.ui.view">
        <field name="name">work.acceptance.evaluation.tree</field>
        <field name="model">work.acceptance.evaluation</field>
        <field name="arch" type="xml">
            <tree>
                <field name="name" />
                <field name="state_required" />
            </tree>
        </field>
    </record>
    <record id="view_work_acceptance_evaluation_form" model="ir.ui.view">
        <field name="name">work.acceptance.evaluation.form</field>
        <field name="model">work.acceptance.evaluation</field>
        <field name="arch" type="xml">
            <form string="Work Acceptance Evaluation">
                <sheet>
                    <widget
                        name="web_ribbon"
                        title="Archived"
                        bg_color="bg-danger"
                        attrs="{'invisible': [('active', '=', True)]}"
                    />
                    <field name="active" invisible="1" />
                    <group>
                        <group>
                            <field name="name" />
                        </group>
                        <group>
                            <field name="state_required" />
                        </group>
                    </group>
                    <notebook>
                        <page string="Score" name="score">
                            <field name="score_ids">
                                <tree editable="bottom">
                                    <field name="name" optional="show" />
                                    <field name="score" />
                                </tree>
                            </field>
                        </page>
                    </notebook>
                </sheet>
            </form>
        </field>
    </record>
    <record id="view_work_acceptance_evaluation_search" model="ir.ui.view">
        <field name="model">work.acceptance.evaluation</field>
        <field name="arch" type="xml">
            <search string="Work Acceptance Evaluation">
                <field name="name" />
                <field name="score_ids" />
            </search>
        </field>
    </record>
    <record id="work_acceptance_evaluation_action" model="ir.actions.act_window">
        <field name="name">Work Acceptance Evaluation</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">work.acceptance.evaluation</field>
        <field name="view_mode">tree,form</field>
        <field name="search_view_id" ref="view_work_acceptance_evaluation_search" />
        <field name="view_id" ref="view_work_acceptance_evaluation_tree" />
    </record>
    <menuitem
        id="menu_work_acceptance_evaluation"
        name="Work Acceptance Evaluation"
        parent="purchase.menu_purchase_config"
        action="work_acceptance_evaluation_action"
        groups="purchase_work_acceptance_evaluation.group_enable_eval_on_wa"
    />
</odoo>
